2
\$\begingroup\$

After researching about curves in computer graphics (splines in my case), I have come across something I did not know: Explicit functions like: \$y=x^2+2\$ are not the best way to interpolate between points because you could get 2 or more values for y for the same x. So, parametric functions seem much better for this if we make the commonly used t parameter, the distance from origin, time, etc...

After studying a bit how to convert from explicit to parametric form I have been shocked when I have found in some texts they use these parametric cubic functions to interpolate through points: $$\begin{align} x(t)&=at^3 + bt^2 + ct +d \\ y(t)&=2at^3 + 2bt^2 + 2ct +2d \end{align} $$ but wait... this is the exact same form the explicit function was: $$ y(x)= ax^3 + bx^2 + cx + d $$ From what I have seen for other example functions in some math books the parametric funcions where not the same form that its explicit form counterpart.

Am I missing something?

Examples of the texts I'm refering to could be:

https://www.cs.helsinki.fi/group/goa/mallinnus/curves/curves.html

http://escience.anu.edu.au/lecture/cg/Spline/parametricCubicCurves.en.html

\$\endgroup\$
2
  • \$\begingroup\$ This looks like more of a math question than one for game development. But I think there may just be a confusion of terms here. We could use "cubic" to describe parametric equations in two senses: 1) "this is a parametrization of y = f(x) where y() is a cubic function of x" or 2) "this is a parametric equation p(t) = (x(t), y(t)) where the functions x() and y() are each cubic functions of t". I think the definition you've found is using the latter meaning - I can supply coefficients such that y is not a cubic function of x. \$\endgroup\$
    – DMGregory
    Sep 7, 2016 at 15:23
  • \$\begingroup\$ Sorry if this questions was not asked in the right place. I can move it to the math part of stackexchange. Anyway, What I have been told is that for getting the parametric functions of an explicit funciton some method has to be applied. And this leads ussually to equations that do not reasemble the explicit one. This is what leads me to think that I missed something, and that the parametric equations shown in that urls are not really the ones extracted from the explicit cubic equation. \$\endgroup\$
    – Notbad
    Sep 7, 2016 at 20:05

2 Answers 2

1
\$\begingroup\$

It's trivial to make a parametric equation that has the same form as the explicit function.

Take for example: $$ y = x^2 $$ Here \$y\$ is a quadratic polynomial in \$x\$. We can use \$t = x\$ as our parameter to get: $$ p(t) = ( t, t^2 ) $$ Where \$p_x\$ and \$p_y\$ are quadratic polynomials in \$t\$. (Okay, \$x\$ is linear polynomial, which is only a degenerate quadratic, but the salient point is that it's a polynomial of order at most 2)

This is not guaranteed though. Let's use the alternate parameter \$u = t^{1/3}\$ $$ q(u) = (u^3, u^6) $$ This describes the same parabola, but now it's using third & sixth-order polynomials instead of second-order.

So the choice of parameter can wildly affect the form of the parametrized equation. (Some natural choices of parameter, like arc length, often have no closed-form equation at all!)

We can also attack this in reverse. Take for example this parametric equation: $$ f(t) = (t^2, t^2 + t) $$ Here both components \$f_x\$ and \$f_y\$ are quadratic polynomials in \$t\$, but \$y\$ can't be expressed as a quadratic polynomial in \$x\$. (The closest would be \$y = x ± \sqrt x\$ which isn't even a single-valued function)

Graph of the function above

So, it's not a rule that the parametric equation must or must not have the same form as the explicit version of the equation (and neither is guaranteed to even exist as a closed form expression). Some parametrizations will have a similar form and some won't, depending on the choice of function and parameter.

\$\endgroup\$
0
\$\begingroup\$

The first example you are parametric equations: $$\begin{align} x(t)&=at^3 + bt^2 + ct +d \\ y(t)&=2at^3 + 2bt^2 + 2ct +2d \end{align}$$ In the parametric equations, x & y are found independently of each other; this independence is what makes them parametric. In contrast, your second equation: $$ y(x)= ax^3 + bx^2 + cx + d $$ defines y as a function of x. Since y depends on x, the second equation is not parametric. Your examples have both been expressed as polynomials, but they are not the same.

\$\endgroup\$
2
  • \$\begingroup\$ I know what parametric and explicit equations are. What is really suspicuious to me is that the form of the parametrics equations is the same of the explicit equation. Because I haven't seen this in all other explicit -> parametric conversions. Does this explicit equation really become this parametric equations when worked out? \$\endgroup\$
    – Notbad
    Sep 7, 2016 at 19:54
  • 1
    \$\begingroup\$ It depends entirely on the equation. Some explicit equations that can be expressed as polynomials can be converted into polynomial parametric equations, for instance straight lines. Others, for example the unit circle, cannot. If you are asking if all cubic curves can be expressed in parametric form as cubic function (aka 3rd degree), that is probably a question for the math stack exchange, as @DMGregory already suggested. \$\endgroup\$
    – Pikalek
    Sep 7, 2016 at 20:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .