

So here's a simple scene file that, given 3 points, solves the equation of the
parabola that passes through them all, and graphs the curve.
Steps to the solution are in the #debug stream.
I'm kind of laughing, because not that long ago, I posted a request to consider
having functions like lcm and gcd in POVRay's inbuilt math library.
Then I wrote a macro to compute both.
And yet before that, jr wrote a macro to compute gcd  wondering of what use it
would be.
So here is a good example of a situation where it gets used to "match"
coefficients to eliminate variables.
I'm sure there are many ways to do this, and GaussJordan elimination using a
matrix would be another way.
I have been super busy as of late, and it's pretty hot and humid  so I'm just
posting my terribly written code so that it's available for perusal.
So I have code to solve for circles, parabolas, very quick crude code for a
hyperbola, and now I just need some code for an ellipse.
Once the basics are in place, further levels of functionality and sophistication
can be added.
Enjoy,
 BE
Post a reply to this message
Attachments:
Download 'parabola.pov.txt' (7 KB)

