|
|
"Jan Maarten van der Valk" <jm.### [at] hccnetnl> schreef in bericht
news:3d9c03c6@news.povray.org...
>
> How can I rotate an object so that it's up-coordination <0,1,0> lines up with
a
> given vector?
>
Found the answer myself after reading the 'Constrained motion' thread in p.a-u.
The Axis_rotate_Trans macro does the trick.
Axis_Rotate_Trans(VPerp_To_Plane(y,Norm), VAngleD(y,Norm))
where Norm is the vector the object should be aligned with.
Cheers,
JM
--
#macro J(M)V()<V(),V(),V()>#if(M)J(M)#end#end#local _=20;#macro V()asc(substr
("IIMYKIIYMMKQOIMYQEEYSCEYUEGQWEHYYIGQ[HEY]IGY_JGQaJEYcKGYeKGQgLEYiMKIs#K ",
73-M,1))/2-36.5#declare M=M-1;#end#local a=spline{cubic_spline J(72)}#while
(_)sphere{a(_).1pigment{rgb(a(_)+(x+y)*3.5)}}#local _=_-.02;#end//JM
Post a reply to this message
|
|