How to convert a Cartesian Equation to Parametric Equation?

900 Views Asked by At

I'm trying to 3D plot the following cartesian equation in Blender 3.1:

$$ \left(x - x\left(\frac{z}a\right)\right)^2 + \left(y - y\left(\frac{z}a\right)\right)^2 = r^2$$

But in it's current Implicit form I cannot use it as input. I need the input to be of the Parametric form as shown in the following example:

enter image description here

I know that the term $ 1−z/a $ is not bounded and thus $z$ has infinite equations possibilities but one (1) possible solution will do. How do I convert that cartesian equation into parametric equations of the following forms?

$$ x = x(u, v)$$ $$ y = y(u, v)$$ $$ z = z(u, v)$$

What is the proper solution to derive at these parameterized equations using the original cartesian equation?

2

There are 2 best solutions below

1
On BEST ANSWER

Equation (1):

$$ \left[x - x\left(\frac{z}{a}\right) \right]^{2} + \left[y - y\left(\frac{z}{a}\right) \right]^{2} = r^{2} $$

  • For this, I will be showing a general solution to Eq. (1), for solutions belonging to circular base family (in the $xy$ plane), for a circle with radius $r$.
  • If we factor $x^2$ and $y^2$, in Eq. (1), we can easily see that $x^{2} + y^{2}$ can be associated with $r^{2}$.
  • Basically, a generalization to the solution provided by Harry McKenzie previously.
  • The alternative form of the given equation, i.e., Eq. (1), is shown below.

Equation (2):

$$ (x^2 + y^2)\, p(z) = r^2$$

where the function $p(z) = \left(1 - \frac{2z}{a} + \frac{z^2}{a^2} \right)$.

Note:

  • Suppose that $p(z) = 1$, then it can easily be seen that $(x^2 + y^2)= r^2$.
  • As such, if we introduce a parameter $u$, we can let $x = r \cos{u}$ and $y = r \sin{u}$. Using this substitution, we can still satisfy $(x^2 + y^2)= r^2$.
  • The concern now is, what if $p(z) \neq 1$? I.e., $p(z) = \left(1 - \frac{2z}{a} + \frac{z^2}{a^2} \right)$.
  • Also, we need the $x$, $y$, and $z$ be functions of, in general, the parameters $u$ and $v$.
  • For a specific family of solutions, i.e., circular, we can preserve a circular base (as can be seen graphically in the previous solution example by Harry McKenzie), by assuming general solution forms of $x$ and $y$.
  • After which, the form of $z$ can be obtained.

Equation (3):

We can now introduce the general solutions for $x$ and $y$, i.e., for circular-base solutions in the $xy$ plane, of the form:

$$ x = r \cos{u}\, \cdot q(v) $$ $$ y = r \sin{u}\, \cdot q(v) $$

where the function $q(v)$ can be any expression in terms of the parameter $v$.


Equation (4):

Using these forms of $x$ and $y$ given by Eq. (3), if we perform the operation $(x^2 + y^2)$, we get the following:

$$ (x^2 + y^2) = r^2 (\cos^{2}{u} + \sin^{2}{u})\, [q(v)]^{2} $$

Rearranging, and noting the trigonometric identity $\cos^{2}{u} + \sin^{2}{u} = 1$, we obtained:

$$ (x^2 + y^2)\, \frac{1}{q^{2}(v)} = r^2 $$


Equation (5):

In view of Eqs. (2) and (4), it can easily be observed that:

$$ p(z) = \frac{1}{q^{2}(v)} $$

Note:

  • From this observation, we can say that Eq. (5) is the key to obtaining the form of $z$ in terms of the parameters $u$ and $v$.
  • In general, we wish to obtain for $z=z(u,v)$.
  • However, it can really be a daunting task since there can be infinitely many forms of $z(u,v)$. In addition, it could also be very challenging to find specific forms of $z=z(u,v)$ given that there are no additional imposed conditions given in the problem.
  • For illustrative purposes, we can simplify the solution form by letting $z = z(v)$ only.

Equation (6):

For the specific form of $p(z)$ indicated by the problem, we then have Eq. (5) in the following form:

$$ \left(1 - \frac{2z}{a} + \frac{z^2}{a^2} \right) = \frac{1}{q^{2}(v)}$$

Rearranging, we have:

$$ z^{2} - 2az + a^{2}\left(1 - \frac{1}{q^{2}(v)}\right) = 0$$

This is now a quadratic equation in terms of $z=z(v)$, which has the solution:

$$ z = a \pm \frac{a}{q(v)} $$


Collecting Results:

The following forms of $x$, $y$, and $z$ expressed explicitly in terms of parameters $u$ and $v$ are as follows:

$$ x = r \cos{u}\, \cdot q(v) $$ $$ y = r \sin{u}\, \cdot q(v) $$ $$ z = a \pm \frac{a}{q(v)} $$

Illustrative Examples:

  • Harry McKenzie provided a solution of the form $q(v) = \sin{v}$.
  • Other forms of $q(v)$ can really be any function of $v$.
  • For instance, it can be as simple-looking as $q(v) = (e^{v} + 1)\sin{v}$;
  • Or it can be as complicated-looking as

$$ q(v) = \frac{(1 + 2v^2)(v^3 - v)^2}{(4v)^{3/2}\sqrt{v + 5v^2}} + \frac{\sqrt{1+2v}}{v + \sqrt{1 + v^2}}$$

0
On

There are more than just one (1) possible solution to the given equation but to demonstrate how to derive at one solution I have prepared the following solution with the help of a soon-to-be PhD friend. I'm excited to see other people provide their answers to other possible equations that satisfy the original equation!


Equation (1):

This is the given equation from the problem:

$$ \left[x-x\left(\frac{z}{a}\right)\right]^2 + \left[y-y\left(\frac{z}a\right)\right]^2=r^2 $$


Equation (1) can be expanded and rearranged as follows:

$$ \left(x^2-\frac{2x^2z}{a}+\frac{x^2z^2}{a^2}\right)+\left(y^2-\frac{2y^2z}{a}+\frac{y^2z^2}{a^2}\right)=r^2 $$

Factor out $x^2$ and $y^2$: $$ x^2\left(1-\frac{2z}{a}+\frac{z^2}{a^2}\right)+y^2\left(1-\frac{2z}{a}+\frac{z^2}{a^2}\right)=r^2 $$

Hence, we obtain the following:

Equation (2):

$$\left(x^2+y^2\right)\left(1-\frac{2z}{a}+\frac{z^2}{a^2}\right) = r^2$$

Note:

  • For a circular base, in the $xy$ plane, $\left(x^2+y^2\right)$ should be related to $r^2$.
  • Let the function $p=p\left(z\right)=1-\frac{2z}{a}+\frac{z^2}{a^2}$
  • The form of $z$ will depend on the result of the relation between $\left(x^2+y^2\right)$ and $r^2$.

The inspiration for the form of the solutions for $x$ and $y$ can be derived from the transformation of cartesian coordinates to spherical coordinates (please see the figure below). Let's introduce two parameters, namely, $u$ and $v$.

enter image description here

Equation (3):

$$ x = r \cos{u}\sin{v} $$ $$ y = r \sin{u}\sin{v} $$


Using the forms given by Eq. (3), we can have a solution for a family of circular base (in the $xy$ plane) solutions, of the form:

$$x^2+y^2=\left(r\cos{u}\sin{v}\right)^2+\left(r\sin{u}\sin{v}\right)^2$$ $$=r^2\cos^{2}{u}\,\sin^{2}{v}+r^2\sin^{2}{u}\sin^{2}{v}$$ $$=r^2\sin^2{v}\left(\cos^2{u}+\sin^2{u}\right)$$

Since $(\cos^2{u}+\sin^2{u})$ is a Pythagorean Identity equal to $1$, we can further simplify and get

Equation (4):

$$x^{2} + y^{2} = r^{2}\sin^{2}{v}$$


Recall Eq. (2): $$\left(x^2+y^2\right)p(z)=r^2$$

where $p(z) = \left(1-\frac{2z}{a}+\frac{z^2}{a^2}\right)$

If we divide Eq. (4) by $\sin^2{v}$ we get

Equation (5):

$$\left(x^2+y^2\right)\left(\frac{1}{\sin^2v}\right)=r^2$$


By inspection of Eqs. (2) and (5), we can easily see that:

$$\left(1-\frac{2z}{a}+\frac{z^2}{a^2}\right)=\frac{1}{\sin^2v}$$

Multiplying both sides by $a^2$: $$z^2-2az+a^2-\frac{a^2}{\sin^2v}=0$$

Hence, we get:

Equation (6):

$$z^2-2az+a^2\left(1-\csc^2v\right)=0$$ which has the form of a Quadratic Equation: $$Az^2+Bz+C=0$$ where: $$A=1$$ $$B=-2a$$ $$C=a^2\left(1-\csc^2v\right)$$


Equation (7):

$$z=\frac{-B\pm\sqrt{B^2-4AC}}{2A}$$ $$ = \frac{-(-2a)\pm \sqrt{\left(-2a\right)^{2} - 4(1)[a^{2}(1 - \csc^{2}{v})]}}{2(1)}$$ $$=a\pm\frac{1}{2}\sqrt{4a^2-4a^2\left(1-\csc^2v\right)}$$ $$=a\pm\frac{1}{2}\sqrt{4a^2\left[1-\left(1-\csc^2v\right)\right]}$$ $$=a\pm\frac{1}{2}\sqrt{4a^2\csc^2v}$$ $$=a\pm\frac{1}{2}\left(2a\csc v\right)$$ $$z=a\pm a\csc v$$

$$z=a\pm \frac{a}{\sin{v}}$$

This is now Eq. (7).


One possible Parametric Equation Solution:

Collecting results, we have the following:

$$x=r\cos{u}\sin{v}$$ $$y=r\sin{u}\sin{v}$$ $$z=a\pm\frac{a}{\sin{v}}$$

Note:

  • In the above results, for this particular form only, $z=z(v)$ only.
  • In general, $z=z(u,v)$ as long as it satisfies Eq. (6).
  • We can solve Eq. (6), as a quadratic equation because, we can also assume that $z=z(v)$ for illustrative purposes only.
  • In other words, there can be many other forms of solutions as long as they satisfy Eq. (6), for the same equations for $x=x(u,v)$ and $y=y(u,v)$, given by Eq. (3).

enter image description here