POV-Ray : Newsgroups : povray.general : Can anyone explain this : Re: Can anyone explain this Server Time
13 Aug 2024 01:20:45 EDT (-0400)
  Re: Can anyone explain this  
From: Dan Connelly
Date: 23 Nov 1998 20:43:43
Message: <365A0F52.654D847F@flash.net>
There's really no need for formulas... let POV do the work:


#local dTheta = 45;
#local Pt1 = vrotate(<0, Height, Rad>, dTheta/2 * y);
#local Pt2 = <-1, 1, 1> * Pt1;

#local Roof =
  union {
    #local T = 0;
    #while (T < 360)
      triangle {
        Pt1,
        0,
        Pt2
        rotate T * y
      }
      #declare T = T + dTheta;
    #end
  }



>> #declare Pt1 = <-Base/2,Height,Rad>;
>> #declare Pt2 = <Base/2,Height,Rad>;
>   #declare Base = Circ/8;
>   #declare Base = 2*Rad*tan(pi/8);
-- 
http://www.flash.net/~djconnel/


Post a reply to this message

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