POV-Ray : Newsgroups : povray.text.scene-files : roundcone macro! : Re: roundcone macro! Server Time
28 Jul 2024 18:25:05 EDT (-0400)
  Re: roundcone macro!  
From: Larry Fontaine
Date: 23 Oct 1999 22:01:59
Message: <38126870.B9CC70F1@isd.net>
OOPS!!!
Rotates an object to point along vector p from vector z
#macro PointTo(p)
#if (0+p.x=0 & 0+p.y=0 & 0+p.z=0)
   #local RotX=0;
#else
   #local RotX=-atan2(p.y,sqrt(pow(p.x,2)+pow(p.z,2)))*180/pi;
#end
#if (0+p.x=0 & 0+p.z=0)
   #local RotY=0;
#else
   #local RotY=atan2(p.x,p.z)*180/pi;
#end
rotate <RotX,RotY,0>
#end

David   http://thunder.prohosting.com/~davidf
---------------------------------------------
AHA! I typed it right this time! Take that, Ken!


Post a reply to this message

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