Given a cartesian equation get points in the plane

480 Views Asked by At

I hope this make sense. I'm trying to understand (I'm very newbie with curves) how could I get points from a cartesian equation.

For example, given $(x^2+y^2)^2-2a^2\cdot(x^2-y^2)-a^4+c^4=0$ that is the cartesian equation for the Cassian Ovals:

...

I would like to know how to know the points (like in this image). (I'm doing a program that represent points on a texture)

I know that resolving the parametric equation of this (I don't know if this can be done) I can give as much points as iterations done.

But I'm not sure if I can achieve that only with the cartesian equation.

Maybe, if do x=<something> and I try to resolve for this?

1

There are 1 best solutions below

3
On BEST ANSWER

With the present curve, after the change of variables

$$ x = r\cos\theta\\ y = r\sin\theta $$

we arrive to

$$ f(r,\theta) = c^4+r^4-a^4 - 2 a^2 r^2 \cos (2 \theta )= 0 $$

and solving for $r$

$$ r(\theta) = \pm\sqrt{a^2 \cos (2 \theta )\pm\frac{\sqrt{a^4 \cos (4 \theta )+3 a^4-2 c^4}}{\sqrt{2}}} $$

NOTE

Also another way to do that is to find the explicit dependence $y = g(x)$

Calling $x_2 = x^2, y_2 = y^2$ we have

$$ (x_2 + y_2)^2 - 2 a^2 (x_2 - y_2) - a^4 + c^4 = 0 $$

now solving for $y_2$

$$ y_2 = \sqrt{2 a^4+4 a^2 x_2-c^4}-x_2-a^2 $$

then finally

$$ y = \pm\sqrt{\sqrt{2 a^4+4 a^2 x^2-c^4}-x^2-a^2} $$