POV-Ray : Newsgroups : povray.general : Rounding a Cylinder : Re: Rounding a Cylinder Server Time
20 Nov 2024 08:34:00 EST (-0500)
  Re: Rounding a Cylinder  
From: Christoph Hormann
Date: 6 Oct 2001 09:04:13
Message: <3BBF022B.282471DC@gmx.de>
dav### [at] intrepidvoygrcom wrote:
> 
> Okay all, just a little bit of help.. I've been trying to come
> up with this formula for a while loop to create a round
> set of small cylinders.
> 
> [...]

How about:

#declare Angle=0;

#while (Angle < 2*pi)
  #declare Point=<cos(Angle), sin(Angle), 0>;     
  #declare Angle=Angle+(2*pi/50);
  #declare Point2=<cos(Angle), sin(Angle), 0>; 
  cylinder { Point, Point2, 0.05 }
#end

Note that you can also use 'rotate' instead of trigonometry.

Christoph

-- 
Christoph Hormann <chr### [at] gmxde>
IsoWood include, radiosity tutorial, TransSkin and other 
things on: http://www.schunter.etc.tu-bs.de/~chris/


Post a reply to this message

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