POV-Ray : Newsgroups : povray.text.scene-files : Example constraining media inside an isosurface shape. Server Time: 19 Dec 2018 08:09:29 GMT
  Example constraining media inside an isosurface shape. (Message 1 to 6 of 6)  
From: William F Pokorny
Subject: Example constraining media inside an isosurface shape.
Date: 8 Jan 2016 04:52:04
Message: <568f4074$1@news.povray.org>
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.


Post a reply to this message


Attachments:
Download 'spiraltubemedia.pov.txt' (4 KB)

From: Mike Horvath
Subject: Re: Example constraining media inside an isosurface shape.
Date: 8 Jan 2016 18:09:16
Message: <568ffb4c$1@news.povray.org>
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


Post a reply to this message

From: Mike Horvath
Subject: Re: Example constraining media inside an isosurface shape.
Date: 8 Jan 2016 18:13:23
Message: <568ffc43$1@news.povray.org>
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


Also, the way the shape gets sliced at the edges is really ugly. Is 
there any way to make a straight cut perpendicular to the curve?


Mike


Post a reply to this message

From: Mike Horvath
Subject: Re: Example constraining media inside an isosurface shape.
Date: 8 Jan 2016 19:18:07
Message: <56900b6f$1@news.povray.org>
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


Post a reply to this message

From: William F Pokorny
Subject: Re: Example constraining media inside an isosurface shape.
Date: 8 Jan 2016 20: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

From: Mike Horvath
Subject: Re: Example constraining media inside an isosurface shape.
Date: 15 Jan 2016 03:38:57
Message: <569869d1$1@news.povray.org>
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 got this technique working for me, but it renders very slowly. Thanks 
anyway.


Mike


Post a reply to this message

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