|
|
"Tor Olav Kristensen" wrote:
> I think there must be an error in your second macro.
> The variable X (in the 3rd line) is not defined.
> Is this meant to be a lower case x ?
No, it's supposed to be VectorX. Thank you for pointing it out.
This should be correct:
#macro Vectors2Rotate (VectorX,VectorY) // by Rune S. Johansen
#local RotZ = FindAngle(x,<VectorX.x,VectorX.y,0>,z);
#local RotY = FindAngle(x,vrotate(VectorX,-RotZ*z),y);
#local RotX = FindAngle(vrotate(y,<0,RotY,RotZ>),VectorY,VectorX);
<RotX,RotY,RotZ>
#end
> And I believe your first macro could be simplified to this:
<snipped code>
Hmm, you're probably right. I just write code using my own math skills,
which means that it is not always so optimized... I will have a look your
version.
Greetings,
Rune
---
Updated April 25: http://rsj.mobilixnet.dk
Containing 3D images, stereograms, tutorials,
The POV Desktop Theme, 350+ raytracing jokes,
miscellaneous other things, and a lot of fun!
Post a reply to this message
|
|