|
|
This is a topic that has come up before, and a recent request made me think that
we ought to have a collection of macros that handle most of the typical cases
that arrive when needing to arrange things along a given curve.
"Axis - aligned" curves in the standard orientation are fairly straightforward
to derive an equation, but rotated forms are quite a bit more challenging.
I'm posting this link as an excellent reference, and hoping that there will be
more resources and macros written to address this sort of need in the future.
https://www.anirdesh.com/math/algebra/parabola-rotation.php
- BW
Post a reply to this message
|
|
|
|
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)
|
|