0

I'm trying to build some jewellery in a 3D cad package. I found this:

The function that draws a figure eight

But I don't understand the equation (I only got to A' level :)

Is there a way of calculating cartesian [x, y] positions from this?

Any help much appreciated.

  • In that answer you linked, for every $t\in(-\tfrac12\pi,\tfrac32\pi)$, the point $(\cos t,\sin t\cos t)$ is a point on the curve. – Regret Apr 02 '15 at 07:51

1 Answers1

0

The curve is defined by this function.

$$t\in(-\tfrac12\pi,\tfrac32\pi)\mapsto(\cos t,\sin t\cos t)\in\mathbb R^2.$$

More specifically, the curve is the image of this function.

I assume you want some way to get a finite list of consecutive points on the curve so you can draw an approximation of it in your program. To do that, you can set the value of $t$ to $-\pi/2$. Then, compute $(\cos t, \sin t\cos t)$. This is your first point on the curve. Next, increment $t$ by some small positive amount. How small should depend on how accurate of an approximation you want. Then compute $(\cos t, \sin t\cos t)$ again with the new value of $t$. This is the second point. Repeat this process all the way until $t=3\pi/2$, and you will have finitely many points on the curve neatly in a list so you can draw a line between consecutive points and it will resemble the curve.

Regret
  • 3,817
  • Thanks, that answers my confusion around the equation a little, is cos t the x, and sin t cos t the y? though. Anyhow I just found a wolfram page that had it in cartesian format reworking it, I got this: for the range -a < x < a, y = +/- sqrt((x^4/a^2)-x^2) – Nigel Johnson Apr 02 '15 at 13:16
  • @Nigel: Yes, the $\cos t$ is the $x$-coordinate and $\sin t\cos t$ is the $y$-coordinate. – Regret Apr 02 '15 at 17:47