POV-Ray : Newsgroups : povray.binaries.scene-files : Stupid math problem, HELP!!!!! : Re: Stupid math problem, HELP!!!!! (2.8 .INC File Attached) Server Time
29 Apr 2024 08:59:49 EDT (-0400)
  Re: Stupid math problem, HELP!!!!! (2.8 .INC File Attached)  
From: Eric Freeman
Date: 20 Feb 1999 02:40:47
Message: <36ce66ff.0@news.povray.org>
Mark Palmquist wrote in message <36C0F5C2.400D03A5@earthlink.net>...
>Trying to use POV to generate columns with x number grooves, forget my
>math (to many years ago.....).  this is the code I used but not working,
>
>can someone enlighten me please.  I know it has something to do with the
>
>sin/cos stuff but can't figure it out with the remaining 3 brain cells
>in my skull.
>
>// ----------------------------------------
>#declare grooves = 36
>#declare vector = 360/grooves
>#declare groove_now = 1
>
>difference{
>  cylinder{  <0,0,0>,  <0,3,0>,  1  pigment {Red}  }
>  #while (groove_now <= grooves)
>    cylinder{  <sin(vector), -1, cos(vector)>  <sin(vector), 4,
>cos(vector)>,  .1  pigment {Blue}  }
>    #declare groove_now = groove_now + 1
>    #declare vector = vector + 360/grooves
>  #end
>}

No need to use trig... translate and rotate work just fine.  Put the column
at the xz origin and cut the grooves out using translate and rotate.
Attached find an include file I made for 3.02 (should work with 3.1).  It's
kinda crude, but it works.  Instructions in the header of the file.

See some examples of my column at:

http://www.geocities.com/SiliconValley/Heights/2354/gallery/columns.jpg

http://www.geocities.com/SiliconValley/Heights/2354/gallery/column_field.jpg

http://www.geocities.com/SiliconValley/Heights/2354/gallery/column_fancy.jpg

Eric

--------------------------------
http://www.geocities.com/SiliconValley/Heights/2354/


Post a reply to this message


Attachments:
Download 'column.inc.txt' (3 KB)

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