# Equation for a quadratic curve in a three-dimensional space?

• July 24th 2010, 07:31 PM
Korinkite
Equation for a quadratic curve in a three-dimensional space?
I'm not really sure if this is the right area BUT I did similar things such as this in trig so I thought this might be a good place to ask.

I'm working within a three dimensional space and I have three points that I must create a quadratic curve out of. The curve must touch all three points. In 2d the process for solving this is easy enough but in three dimensions I begin to have trouble. I built a script that can find and output the X,Y,and Z coordinates and their distance in relation to each other but I need to know a formula (or possibly two combining formulas. I'm not really sure how using two would work for programming) to plug in the values. Anyone know a formula like this?
• July 24th 2010, 07:37 PM
pickslides
Do you think this is really a question for the trigonometry sub-forum?

Best ask a mod to move it to improve the chanes of getting a proper reply.
• July 25th 2010, 09:11 AM
HallsofIvy
A curve is one-dimensional so to write a curve in three dimensions, you need to reduce from 3 variables to one. you can do that by either using two equations in the three coordinates (so that the two equations can be solved for two of them in terms of the other one) or three equations for x, y, and z in terms of a parameter, t, say. That is, something like:
$x= at^2+ bt+ c$, $y= dt^2+ et+ f$, and $z= gt^2+ ht+ i$.

You are free to choose what values t takes at each point, although choosing values reflecting the distances between the points might simplify things. Putting the t values and the x, y, z values of the points in the parametric equations will give 9 linear equations for the nine coefficients, a, b, c, d, e, f, g, h, and i.
• July 25th 2010, 09:59 AM
Soroban
Hello, Korinkite!

I don't agree with your intial statements.

Quote:

I'm working within a three-dimensional space
and I have three points that I must create a quadratic curve out of.

In 2-D the process for solving this is easy enough. . really?

Three points do not determine a quadratic curve.

General quadratic function: . $Ax^2 + Bxy + Cy^2 + Dx + Ey + F \:=\:0$
. . which has six coefficients to be determined.

We have only three points: . $(x_1,y_1),\;(x_2,y_2),\;(x_3,y_3)$

They produce this system of equations:

. . $\begin{Bmatrix}Ax_1^2 + Bx_1y_1 + Cy_1^2 + Dx_1 + Ey_1 + F &=& 0 \\ \\[-3mm]
Ax_2^2 + Bx_2y_2 + Cy_2^2 + Dx_2 + Ey_2 + F &=& 0 \\ \\[-3mm]
Ax_3^2 + Bx_3y_3 + Cy_3^2 + Dx_3 + Ey_3 + F &=& 0
\end{Bmatrix}$

. . which obviously does not have a unique solution.

• July 25th 2010, 04:52 PM
Korinkite
Got it!
Sorry for the late reply. First to Soroban, I apologize if I wasn't being entirely clear. I didn't mean to suggest that there could be one perfect equation for a quadratic curve with three points. In the end, I did get Hallsofivy's method to work so a few screenshots might save the trouble of explaining.

Quadratic Curve :: Quadratic Curve Finished! picture by Korinkite - Photobucket

As you can see, the result isn't perfect (or at least not entirely what I had intended. Originally I wanted the second point to always be the origin but this works just fine for my purposes I found).

In those two pictures, I demonstrate how I can move any point in any direction and as far out as necessary and the curve will compensate!

Thank you Hallsofivy and all that commented for your time and assistance ^_^.