POV-Ray : Newsgroups : povray.advanced-users : Creating Circular walls (using prisms ?) : Creating Circular walls (using prisms ?) Server Time
29 Jun 2024 02:01:08 EDT (-0400)
  Creating Circular walls (using prisms ?)  
From: Kene
Date: 17 Sep 2010 16:15:00
Message: <web.4c93cb55eb91d5981dec65700@news.povray.org>
I am trying to create circular walls with radius and diameter values or from
which I can obtain said values. I am trying to stay away from CSG so I am
thinking of cubic_splines in prisms. I have been studying the code from Block
Wall Macros specifically the macro Blockwall_Arc(360,"") but it has been
difficult for me. Is there anybody that can make this code clearer for me...
tried to find a way to contact Chris Bartlett (I think, who wrote the code but
he seems very scarce on the net). Any help will be greatly appreciated. I am
guessing this is OK to include the code here. Perhaps studying it here will make
it easier for somebody to explain it to me.

Basically, I want to be able to plug in radius and/or diameter values to get a
circular wall or I would like to use this method but then be able to extract
radius and/or diameter values from it. Cheers!

//  This macro creates a circular (cylindrical) wall or a segment of a circular
wall.
//
#macro Blockwall_Arc (Blockwall_ArcDegrees, Blockwall_BlockType)
  #ifndef(Blockwall_Radius) #declare Blockwall_Radius  = 1;    #end
  #declare Blockwall_Spline = spline {
    cubic_spline
    #local Blockwall_I = -0.25;
    #while (Blockwall_I<=1.25)
      Blockwall_I, vrotate(Blockwall_Radius*z,
y*Blockwall_I*Blockwall_ArcDegrees)
      #local Blockwall_I = Blockwall_I + 0.01;
    #end
  }
  object {Blockwall_FollowSpline(Blockwall_BlockType)}
#end


Post a reply to this message

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