|
|
This is the macro:
#macro instslope (Axis1,Axis2)
#local vX1=vnormalize(Axis1);
#local vX2=vnormalize(Axis2);
#local vY=vnormalize(vcross(vX1,vX2));
#local vZ1=vnormalize(vcross(vX1,vY));
#local vZ2=vnormalize(vcross(vX2,vY));
matrix < vX1.x, vY.x,vZ1.x,
vX1.y,vY.y,vZ1.y,
vX1.z,vY.z, vZ1.z,
0,0,0>
matrix < vX2.x,vX2.y,vX2.z,
vY.x,vY.y, vY.z,
vZ2.x,vZ2.y,vZ2.z,
0,0,0>
#end
I can't even find the original message anymore but I think it was called
Reorient (I renamed it). I can think of many more uses for this, not only for
trees!
Thanks for the comments,
Andrew C
David Fontaine wrote:
> The trunk curves kind of wierd so it looks like a branch rather than a whole
> tree, but it is quite realistic.
>
> > I also picked up a macro from these groups (called Reorient I think?) to
> > orient the blob components on the slope of the spline. I'm not sure who
> > wrote it. Let me know so I can give credit!
>
> If it's reposition(vector1,vector2) it might be mine.
>
> --
> Homepage: http://www.faricy.net/~davidf/
> ___ ______________________________
> | \ |_ <dav### [at] faricynet>
> |_/avid |ontaine <ICQ 55354965>
Post a reply to this message
|
|