POV-Ray : Newsgroups : povray.binaries.images : Fun with splines (another tree) : Re: Fun with splines (another tree) Server Time
5 Nov 2024 10:23:29 EST (-0500)
  Re: Fun with splines (another tree)  
From: Andrew Clinton
Date: 8 Jan 2000 10:42:15
Message: <38775ABF.DE875236@ibm.net>
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

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