Plotting Parametric Equations

Hello,

I am busy with other concerns these days but this was a fun distraction.

Some observations about your code:

  • Formula is missing brackets in denominator:
    return ( (Math.sinh(v) * cos(tau * u) ) / (1 + Math.cosh(u) * Math.cosh(v)) );

  • I quickly ran out of memory; it was over 4GB!
    I modified this for the development phase to resolve memory issues:

  //beginShape();
  for (PVector v : HP) {
    strokeWeight(2);
    stroke(255, 255, 0);
    point(200*v.x, 200*v.y, 200*v.z);  // The 200 was used to scale 
  }
  //endShape();
  • I did not use PeasyCam or the avoidClipping() function.
    I wanted to simplify things and used this for my exploration of your code:
  translate(width/2, height/2, 0);
  float angle = map(mouseX, 0, width, TAU/4, -TAU/4);
  rotateY(angle);
  angle = map(mouseY, 0, width, -TAU/4, TAU/4);
  rotateX(angle);

Getting there:
image

I shared my brief exploration and observations.
I will leave the rest with you.

:)

I did some work on a Mobius Strip a while back that may be of interest.

3 Likes