POV-Ray : Newsgroups : povray.general : Spiral tube? : Re: Spiral tube? Server Time
17 May 2024 03:24:46 EDT (-0400)
  Re: Spiral tube?  
From: William F Pokorny
Date: 8 Jan 2016 00:03:06
Message: <568f430a$1@news.povray.org>
On 01/07/2016 09:17 PM, Alain wrote:
>
> You could use the same function to controll the media's density. It's
> just that, for the isosurface, the value need to be low inside and
> higher outside, while, for the media, you probably want it to be at is't
> maximum in the center and drop to zero at the surface.
>
> My take would be to use a threshold of zero and negate the function.
> In this case, the function evaluate to a negative value inside the
> isosurface and positive outside.
> If the threshold is larger, you substract the threshold value, then
> negate the function.
>
> Next, you can multiply the function by whatever value you want,
> or
> use a colour_map with values as large as you want them to controll the
> pattern of your media.
>
>
> Alain

For example code which does pretty much what Alain outlined above see 
povray.text.scene-files post "Example constraining media inside an 
isosurface shape."

http://news.povray.org/povray.text.scene-files/message/%3C568f4074%241%40news.povray.org%3E/#%3C568f4074%241%40news.povray.org%3E

The tricky part when using the built in functions is not easily being 
sure of the range of values returned. In this example I ended up with a 
pretty large negative multiplier on the helix1 function for use with the 
color map & it likely isn't the optimal multiplier.

Bill P.


Post a reply to this message

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