title: How do I calculate the coordinates of the points of an helix?
body: <p>The following code is called every 50ms.</p>
  
  <pre><code>// Start point
  private double x;
  private double y;
  private double z;
  
  private double y1;
  @Override
  public void run() {
      double x1 = Math.cos(y1);
      double z1 = Math.sin(y1);
      double y2 = 4D - y1;
      double x2 = Math.sin(y2);
      double z2 = Math.cos(y2);
      // First new point
      double pX1 = x + x1;
      double pY1 = y + y1;
      double pZ1 = z + z1;
      // Second new point
      double pX2 = x + x2;
      double pY2 = y + y2;
      double pZ2 = z + z2;
  
      if (y1 &gt; 4D) {
          y1 = 0D;
      } else {
          y1 = y1 + 0.1D;
      }
  }
  </code></pre>
  
  <p>Here is the output in a game. It generates two helices.
  I cannot control more than the radius.</p>
  
  <p><img src="https://i.stack.imgur.com/VdKS1.png" alt=""></p>
  
  <p>I am looking for code I can easily customize to fit my preferences.
  How do I control the following aspects?</p>
  
  <ul>
  <li>How fast the helix rises.</li>
  </ul>
  
  <p><img src="https://i.stack.imgur.com/ShDVP.png" alt=""></p>
  
  <ul>
  <li>Where the helix begins.</li>
  </ul>
  
  <p><img src="https://i.stack.imgur.com/0XQHR.png" alt=""></p>