# Plotting Parametric Equations

**URL:** <https://discourse.processing.org/t/plotting-parametric-equations/18947>\
**Category:** Coding Questions\
**Created:** [March 23, 2020, 8:11pm UTC](https://discourse.processing.org/t/plotting-parametric-equations/18947 "2020-03-23T20:11:24Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [March 26, 2020, 11:04pm UTC](https://discourse.processing.org/t/plotting-parametric-equations/18947/4 "2020-03-26T23:04:06Z")

</div>

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:

```auto
  //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:

```auto
  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](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/0/0865d5a0ad01b59b8cab89e09794ad2192f5a062.png)

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

`:)`

I did some work on a [Mobius Strip](https://discourse.processing.org/t/mobius-strip-animation/13273/6) a while back that may be of interest.

---

_[View the full topic](https://discourse.processing.org/t/plotting-parametric-equations/18947)._
