|
![](/i/fill.gif) |
Peter Popov wrote:
> So, if you
> can please tweak it so that it takes as parameters not T, but three
> vectors - axis1, axis2 and point, axis1 and axis2 being H(T) and
> H(T+dT), and point being A(T), you will do me a great favor.
Try the following.
Jerry Anning
cle### [at] dhol com
//Begin POV code
#macro Vreorient2(axis1, axis2, point)
#local Vx2 = vnormalize (axis2 - axis1);
#local Vx1 = <0, 1, 0>;
#local Vy = vnormalize(vcross(Vx2, Vx1);
#local Vz1 = vnormalize(vcross(Vy, Vx1);
#local Vz2 = vnormalize(vcross(Vy, Vx2);
#local A1 = vdot(point, Vx1);
#local A2 = vdot(point, Vy);
#local A3 = vdot(point, Vz1);
#local Apos = <vdot(point, Vx1), vdot(point, Vy), vdot(point, Vz1)>;
#local B1 = <Vx2.x, Vy.x, Vz2.x>;
#local B2 = <Vx2.y, Vy.y, Vz2.y>;
#local B3 = <Vx2.z, Vy.z, Vz2.z>;
<vdot(Apos, B1), vdot(Apos, B2), vdot(Apos, B3)> + axis1
#end
// End POV code
Post a reply to this message
|
![](/i/fill.gif) |