POV-Ray : Newsgroups : povray.advanced-users : Creating Circular walls (using prisms ?) : Re: Creating Circular walls (using prisms ?) Server Time
29 Jun 2024 01:50:09 EDT (-0400)
  Re: Creating Circular walls (using prisms ?)  
From: Alain
Date: 17 Sep 2010 17:52:24
Message: <4c93e318$1@news.povray.org>

> Alain<aze### [at] qwertyorg>  wrote:
>
>>
>> That macro is not self contained.
>> First : It create a spline that follows a circular path. For that, it
>> use an externaly created variable: Blockwall_Radius.
>> It also use 2 passed parameters: A value in degrees and a reference
>> value defining what kind of blocks to use.
>>
>> Then, once the spline is constructed, it use another macro
>> (Blockwall_FollowSpline) to place blocks along that spline, surely
>> binded in an union so that you can place the result anywhere you need it.
>>
>> What this macro _DON'T DO_: Create a prism.
>> It /DOES/ use CSG as an union of numerous blocks.
>>
>>
>>
>> Alain
>
> I suspected that. OK, is there a way to create a spline path that can be used to
> draw a prism of a particular radius or diameter. I can do trial and error and
> end up with an approximation but I was wondering if there is a way to get a
> mathematically precise method that can generate values for any radius or
> diameter.
>
>

Quick and dirty:
- Remove the call to the other macro.
- Start your prism.
- Call the macro twice: once with the inside radius of your wall and 
travel it to create the iner part of the prism. (use a loop)
- SAVE the first point!
- Call the macro a second time with the outside radius and travel the 
spline backward to create the outside of the prism.
- Close the prism by adding the last point equal to the first one.
- Add any needed transformation and texturing.
- Finish the prism.

That's for a prism using a linear_spline interpolation.
If you want to use a cubic_spline interpolation, then the last TWO 
points must repeat the first two points. The first and last points are 
controls, the second and secont to last are real points.


Alain


Post a reply to this message

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