POV-Ray : Newsgroups : povray.general : asymmetric density maps : Re: asymmetric density maps Server Time
29 Jul 2024 20:24:43 EDT (-0400)
  Re: asymmetric density maps  
From: Jim Charter
Date: 31 Jul 2010 18:31:44
Message: <4c54a450@news.povray.org>
Alain wrote:

>> camera {
>> location <0,0,-10>
>> look_at <0.0, 0.0, 0.0>
>> right x*image_width/image_height
>> angle 20
>> }
>>
>> // create a regular point light source
>> light_source {
>> 0*x // light's position (translated below)
>> color rgb <1,1,1> // light's color
>> translate vrotate(<0,0,-100>,<60,60,0>)
>> }
>>
>>
>> sphere { 0, 1
>> hollow
>> material{
>> texture{
>> finish{
>> ambient 0
>> diffuse 1
>> specular 0
>> reflection 0
>> }
>> pigment {rgbt .99}
>> }
>> interior{
>> media {
>> intervals 1
>> samples 1,5
>> emission 1
>> method 3
>> density{
>> spherical
>> warp{black_hole <2,0,0>,2}
>> warp{black_hole <0,2,0>,2}
>> color_map{
>> [.25 rgb 0]
>> [1 rgb y]
>> }
>> }
>> }
>> }
>> }
>> }
> 
> The black_hole allows you to create a local perturbation in the pattern. 
> It don't allow you to translate the pattern.
> Here, you pull the media into a non-spherical shape.
> 
> What was asked was how to place the media pattern relative to an object 
> that is NOT defined around the origin.
> 
> In your sample, how to place correctly the spherical pattern if the 
> sphere is defined as:
> sphere{<125, 55, 73>, 1... instead of sphere{0,1...
> 
> Also, your sampling is way wrong.
> Method 3 is the default. It needs at LEAST samples 3 and default to 
> samples 10.
> 
> samples 1,5 realy mean samples 1
> The second value is always ignored.
> 
> Lastly, your light is useless in that particular scene.
> 
> 
> Alain
No, he asked how to make the pattern asymmetrical. Black_hole is hardly 
a general way, or even particularly good way to do it, but it is a crude 
way to stretch a pattern arbitrarily and might suffice depending on the 
problem being addressed. Sometimes one idea leads to another.

I think you are applying your own quite limited meaning to the word 
'asymmetrical'

The scene that I provided was what I used to test if the warp would 
parse in a density statement.  I just gave a example scene that could be 
rendered to show the effect of the warp.  The light was used to dimly 
illuminate the containing media sphere. Sure, there are other ways to do it.


Post a reply to this message

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