title: Draw equidistant points on a spiral
body: <p>I need an algorithm to calculate the distribution of points on a spiral path.</p>
  
  <p>The input parameters of this algorithm should be:</p>
  
  <ul>
  <li>Width of the loop (distance from the innermost loop)</li>
  <li>Fixed distance between the points</li>
  <li>The number of points to draw</li>
  </ul>
  
  <p>The spiral to draw is an <strong>archimedean spiral</strong> and the points obtained must be <strong>equidistant</strong> from each other.</p>
  
  <p>The algorithm should print out the sequence of the Cartesian coordinates of single points, for example:</p>
  
  <p>Point 1: (0.0)
  Point 2: (..., ...)
  ........
  Point N (..., ...)</p>
  
  <p>The programming language isn't important and all help greatly appreciated!</p>
  
  <p>EDIT:</p>
  
  <p>I already get and modify this example from this site:</p>
  
  <pre><code>    //
  //
  // centerX-- X origin of the spiral.
  // centerY-- Y origin of the spiral.
  // radius--- Distance from origin to outer arm.
  // sides---- Number of points or sides along the spiral's arm.
  // coils---- Number of coils or full rotations. (Positive numbers spin clockwise, negative numbers spin counter-clockwise)
  // rotation- Overall rotation of the spiral. ('0'=no rotation, '1'=360 degrees, '180/360'=180 degrees)
  //
  void SetBlockDisposition(float centerX, float centerY, float radius, float sides, float coils, float rotation)
  {
      //
      // How far to step away from center for each side.
      var awayStep = radius/sides;
      //
      // How far to rotate around center for each side.
      var aroundStep = coils/sides;// 0 to 1 based.
      //
      // Convert aroundStep to radians.
      var aroundRadians = aroundStep * 2 * Mathf.PI;
      //
      // Convert rotation to radians.
      rotation *= 2 * Mathf.PI;
      //
      // For every side, step around and away from center.
      for(var i=1; i&lt;=sides; i++){
  
          //
          // How far away from center
          var away = i * awayStep;
          //
          // How far around the center.
          var around = i * aroundRadians + rotation;
          //
          // Convert 'around' and 'away' to X and Y.
          var x = centerX + Mathf.Cos(around) * away;
          var y = centerY + Mathf.Sin(around) * away;
          //
          // Now that you know it, do it.
  
          DoSome(x,y);
      }
  }
  </code></pre>
  
  <p>But the disposition of point is wrong, the points aren't equidistant from each other.</p>
  
  <p><img src="https://i.stack.imgur.com/zUuY4.jpg" alt="Spiral with non equidistant distribution"></p>
  
  <p>The correct distribution example is is the image on the left:</p>
  
  <p><img src="https://i.stack.imgur.com/GTH65.jpg" alt="Sirals"></p>