POV-Ray : Newsgroups : povray.text.scene-files : Example constraining media inside an isosurface shape. : Re: Example constraining media inside an isosurface shape. Server Time
20 May 2024 17:41:49 EDT (-0400)
  Re: Example constraining media inside an isosurface shape.  
From: William F Pokorny
Date: 8 Jan 2016 15:22:30
Message: <56901a86$1@news.povray.org>
On 01/08/2016 02:18 PM, Mike Horvath wrote:
> On 1/8/2016 1:09 PM, Mike Horvath wrote:
>> On 1/7/2016 11:52 PM, William F Pokorny wrote:
>>> An example of constraining media inside an isosurface using the function
>>> used to define the isosurface. Code in answer to a question asked in the
>>> "Spiral tube?" thread in povray.general.
>>> Bill P.
>> I don't understand the parameters of the helix shape. From the docs:
>> P0 : Number of helixes - e.g. 2 for a double helix
>> P1 : Period - is related to the number of turns per unit length
>> P2 : Minor radius (major radius > minor radius)
>> P3 : Major radius
>> P4 : Shape parameter. If this is greater than 1 then the tube becomes
>> fatter in the y direction
>> P5 : Cross section type
>> P6 : Cross section rotation angle (degrees)
>> What is the "Shape parameter", "Cross section type" and "Cross section
>> rotation angle"? Are these explained in the docs?
>> Mike
> Is Period supposed to be some multiple of PI?
> Mike
Hi Mike,

The best way to learn is to play with the options. Turn hollow off and 
the surface opaque so it renders quickly.

That said, here is what I remember off the top of my head. It's an old 
head and you've been warned :-).

Yes, the period is +-PI as I recall though cut off by the containing 
shape, if used in ISO. P4 is used to compensate for the distortion as 
the base shape (P5/P6) is rotated around the Y axis. It is set to 
maintain shape volume in typical use, but sometimes, if say tapering the 
helixes inward, the shape will distort and this is a way to compensate 
for such distortion.

P5 - varies the base shape from a sphere(1), to box, to a box with 
inward sagging edges (at 0 - probably a name for the shape).

P6 - Is only meaningful if the base shape isn't a sphere. It lets you 
rotate the "box" about the traveling axis for different looks.

Yes, the cut off by the container in ISO shapes is hard to handle in 
general for functions which are infinite in any direction.

With Helixes I would look to run it into some standard CSG shape so the 
cut off is hidden in the overall image. You can to come up with more 
complex functions to terminate in other ways internal to the iso 
function at the cost of performance. Though... I think it would be ugly 
& complicated for helix1 as the ideal cut off would need to be aware of 
the direction of all possible helix threads...

FYI - I stuck a function/iso for a capsule in the file partly as the 
basis for another option. Namely, the documentation shows how to twist 
shapes around an axis and the capsule would terminate cleanly on the 
ends - but compensating for the capsule distortion due the twisting 
isn't easy. Well, at least I've never come up with a canned way to 
handle it at reasonable performance. Perhaps the distortion would be 
tolerable for what you want to do, don't know... You'd need to update or 
add a density function based upon the capsule & twist function if you 
try that route.

Hope of some help.

Bill P.

Post a reply to this message

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