POV-Ray : Newsgroups : povray.advanced-users : Speaking of Mathematics : Speaking of Mathematics Server Time
28 Jul 2024 16:15:24 EDT (-0400)
  Speaking of Mathematics  
From: Mike Raiford
Date: 6 Dec 2004 14:01:32
Message: <41b4ac8c$1@news.povray.org>
Someone posted a scene involving a spline. It interested me, I played 
with it.... I liked it... it was neat, I hadn't messed around with 
splines much in the past, but natural spline seems to be nice.

Anyway, the critter (ever endearing spline critter, that is) inspired me 
to make some sort of arbitrary_object_sweep type object. I played around 
with it some more, banged my head against a few dozen brick walls, and 
finally threw up my hands.

All I wanted to do was take 2 points, get a vector, normalize it, and 
calculate the X,Y and Z rotations to reorient it..

this is what I had so far:

(d is the normalised vector

#local rx = degrees(acos(vdot(d, <0, d.y, d.z>)));
#local ry = degrees(acos(vdot(d, <d.x, 0, d.z>)));
#local rz = degrees(acos(vdot(d, <d.x, d.y, 0>)));

But... it still doesn't seem quite right.

-- 
~Mike


Post a reply to this message

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