POV-Ray : Newsgroups : povray.general : Equations of conic sections passing through user-specified points : Re: Equations of conic sections passing through user-specified points Server Time
27 Jul 2024 12:09:25 EDT (-0400)
  Re: Equations of conic sections passing through user-specified points  
From: Bald Eagle
Date: 13 Jul 2024 16:10:00
Message: <web.6692de0293217bca1f9dae3025979125@news.povray.org>
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 POV-Ray'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 Gauss-Jordan 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)

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.