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.
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?
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:
, , and .
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.
I don't agree with your intial statements.
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: .
. . which has six coefficients to be determined.
We have only three points: .
They produce this system of equations:
. . which obviously does not have a unique solution.
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 ^_^.