POV-Ray : Newsgroups : povray.advanced-users : Density in an object : Re: Density in an object Server Time
28 Jul 2024 10:31:30 EDT (-0400)
  Re: Density in an object  
From: Alain
Date: 1 May 2006 19:22:38
Message: <4456983e$1@news.povray.org>
McHannemann nous apporta ses lumieres en ce 30/04/2006 05:19:
> Hi,
> 
> I would like to do the following:
> to have a object with media inside, where the density of the
> media is controlled by the x,y,z so that the max density is reached
> at 0,0,0 and the minimum at the border of the object?
> 
> any ideas?
> 
> Regards,
> 
> Thor
> 
> 
> 
If your object is basicaly a sphere, maybe distorted, you can use the spherical
pattern.
If it's close to a box, then you can use the boxed pattern.
In the case of a cylinder, you have the cylindrical pattern.
You also have the planar pattern.
All goes from one in the center and decrease to zero at 1 unit. spherical is relative
to the origin, 
cylindrical is along the y axis, planar along the x-z plane and boxed fits an unit
cube. You need to 
scale, rotate, translate to place the patterns correctly relative to your container.

If your shape is an isosurface, you may, at least in several cases, use the same
function for your 
density. This will take a lot more time to render than the previous patterns.
It will work *IF* your function start high inside the isosurface and decrease when you
mover away 
*AND* you use a thresshold value of zero (0).

-- 
Alain
-------------------------------------------------
Utopianism: This shit does not stink.


Post a reply to this message

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