POV-Ray : Newsgroups : povray.general : asymmetric density maps Server Time
26 Nov 2024 13:36:34 EST (-0500)
  asymmetric density maps (Message 1 to 10 of 13)  
Goto Latest 10 Messages Next 3 Messages >>>
From: McMinty
Subject: asymmetric density maps
Date: 13 Jul 2010 15:30:01
Message: <web.4c3cbdb2a2a99b937b60f60@news.povray.org>
Hello,

is there a way to create asymmetric density maps?

As I understand it, you can have a spherical, cylindrical or boxed density
distribution (as the "normal" ones) where the distribution is defined with
respect to the center:

for example
  density{ cylindrical
    turbulence 0
    color_map {
     [0 rgb 0.0]//border   <===
     [1 rgb 1.0]//center   <===
     }
   }


But how would I "move" the area of higher density to a spot next to the center
of my object?


Thanks for any ideas and hints.


Post a reply to this message

From: Christian Froeschlin
Subject: Re: asymmetric density maps
Date: 13 Jul 2010 18:03:50
Message: <4c3ce2c6@news.povray.org>
McMinty wrote:

> is there a way to create asymmetric density maps?

yes, how to do this depends on what you mean by asymmetric.

> As I understand it, you can have a spherical, cylindrical or boxed
> density distribution (as the "normal" ones) where the distribution is
> defined with respect to the center:

actually its defined with respect to the origin <0,0,0>,
not the to the center of any particular object. Note that
translating an object *after* applying the density to its
interior will also move the attached density.

> But how would I "move" the area of higher density to a spot next to
> the center of my object?

Either create the original geometry off-center (e.g.,
sphere {<a,b,c>,1>}) or translate the density itself
(e.g. density {cylindrical ... translate <a,b,c>}).

This way the density will still be symmetrical, just
not with respect to the center of your object.


Post a reply to this message

From: McMinty
Subject: Re: asymmetric density maps
Date: 14 Jul 2010 08:20:00
Message: <web.4c3dab0265b32c57937b60f60@news.povray.org>
Thanks for the answer.

Unfortunately, I was looking for an asymmetric density distribution.

But maybe, I could try something with the translation of the density.


Post a reply to this message

From: Roman Reiner
Subject: Re: asymmetric density maps
Date: 14 Jul 2010 10:15:01
Message: <web.4c3dc5fb65b32c576bb935490@news.povray.org>
"McMinty" <nomail@nomail> wrote:
> Thanks for the answer.
>
> Unfortunately, I was looking for an asymmetric density distribution.
>
> But maybe, I could try something with the translation of the density.

Densities are not restricted to spherical, cylindrical and boxed! There are a
lot of other built in patterns and on top of that you can define your very own
density functions!


Post a reply to this message

From: Alain
Subject: Re: asymmetric density maps
Date: 15 Jul 2010 17:07:16
Message: <4c3f7884@news.povray.org>

> Hello,
>
> is there a way to create asymmetric density maps?
>
> As I understand it, you can have a spherical, cylindrical or boxed density
> distribution (as the "normal" ones) where the distribution is defined with
> respect to the center:
>
> for example
>    density{ cylindrical
>      turbulence 0
>      color_map {
>       [0 rgb 0.0]//border<===
>       [1 rgb 1.0]//center<===
>       }
>     }
>
>
> But how would I "move" the area of higher density to a spot next to the center
> of my object?
>
>
> Thanks for any ideas and hints.
>
>
>
>
A few possibilities:

  - Create your object around the origin, then, rotate and translate it 
to the desired location. This should be the method of choice.
  - Rotate/translate the density to place it into your object as you like.

You can also stretch/compress the pattern using scale. To it BEFORE you 
place it in it's final location as the transformation will cause the 
pattern to move if it's not at the origin.
You can rotate the pattern as needed. Must also be done to the pattern 
at the origin, otherwise it will orbit around the origin.

Remember: ALL scale and rotate are ALWAYS done relative to the origin 
(point <0,0,0>).

You can also use about any user defined function or any of the other 
predifined patterns.


Alain


Post a reply to this message

From: Jim Charter
Subject: Re: asymmetric density maps
Date: 31 Jul 2010 11:57:38
Message: <4c5447f2$1@news.povray.org>
McMinty wrote:
> Hello,
> 
> is there a way to create asymmetric density maps?
> 
> As I understand it, you can have a spherical, cylindrical or boxed density
> distribution (as the "normal" ones) where the distribution is defined with
> respect to the center:
> 
> for example
>   density{ cylindrical
>     turbulence 0
>     color_map {
>      [0 rgb 0.0]//border   <===
>      [1 rgb 1.0]//center   <===
>      }
>    }
> 
> 
> But how would I "move" the area of higher density to a spot next to the center
> of my object?
> 
> 
> Thanks for any ideas and hints.
> 
> 
> 
> 

try black_hole warp?
not sure if it would parse but worth a try


Post a reply to this message

From: Jim Charter
Subject: Re: asymmetric density maps
Date: 31 Jul 2010 15:38:05
Message: <4c547b9d$1@news.povray.org>
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]
           }
         }
       }
     }
   }
}


Post a reply to this message

From: Alain
Subject: Re: asymmetric density maps
Date: 31 Jul 2010 17:33:16
Message: <4c54969c$1@news.povray.org>

> 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


Post a reply to this message

From: Jim Charter
Subject: Re: asymmetric density maps
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

From: Thomas de Groot
Subject: Re: asymmetric density maps
Date: 1 Aug 2010 03:35:25
Message: <4c5523bd$1@news.povray.org>
Yes, this works nicely indeed. I had been thinking about this issue a few 
weeks ago and decided then that warp{turbulence} was giving enough assymetry 
to the media to satisfy me. However, black_hole is giving me new ideas to 
explore.

Thanks, Jim!

Thomas


Post a reply to this message

Goto Latest 10 Messages Next 3 Messages >>>

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