POV-Ray : Newsgroups : povray.general : Pigment_Map: Spherical Filling Server Time
1 Aug 2024 02:21:02 EDT (-0400)
  Pigment_Map: Spherical Filling (Message 1 to 6 of 6)  
From: Sven Littkowski
Subject: Pigment_Map: Spherical Filling
Date: 27 May 2006 16:22:24
Message: <4478b500@news.povray.org>
Hi.

One more relatively stupid question: since so many years I use POV-Ray, but 
I never took much usage of pigment_maps. I just want to have a sphere which 
is filled in the center with one color, which becomes to another color ath 
the sphere's surface.

I cannot use gradient x, y or z, as that creates a color shift only along 
one axis. How do I create a spherical color shift?
Just removing the gradient creates nothing than a black sphere, also 
something I don't want.

Greetings, and thanks,

Sven


Post a reply to this message

From: M a r c
Subject: Re: Pigment_Map: Spherical Filling
Date: 27 May 2006 16:31:08
Message: <4478b70c@news.povray.org>

4478b500@news.povray.org...
> Hi.
>
> One more relatively stupid question: since so many years I use POV-Ray,
but
> I never took much usage of pigment_maps. I just want to have a sphere
which
> is filled in the center with one color, which becomes to another color ath
> the sphere's surface.
>
> I cannot use gradient x, y or z, as that creates a color shift only along
> one axis. How do I create a spherical color shift?
> Just removing the gradient creates nothing than a black sphere, also
> something I don't want.
>
> Greetings, and thanks,
>
> Sven
>
>
You gave the answer : keyword is spherical pattern
http://www.povray.org/documentation/view/3.6.1/394/

Marc


Post a reply to this message

From: Sven Littkowski
Subject: Re: Pigment_Map: Spherical Filling
Date: 27 May 2006 16:49:07
Message: <4478bb43@news.povray.org>
Marc,

thanks for your hint! I truly don't new about that keyword. Well, I tried 
out, but have no success yet. What do I wrong?

sphere
{
 < 0.0, 0.0, 0.0 > 1.0
 pigment
 {
  spherical
  pigment_map
  {
   [ 0.0000 Clear ]
   [ 1.0000 Blue ]
  }
 }
 finish { ambient 0.0 }
 scale 1.0075
}

Sven


Post a reply to this message

From: Sven Littkowski
Subject: Re: Pigment_Map: Spherical Filling
Date: 27 May 2006 17:06:15
Message: <4478bf47$1@news.povray.org>
Still not functioning. A bug? It only seems to function if the surface is a 
color, such as Blue (at 0.0000). But Clear at 0.0000 does make everything 
transparent.

Sven



sphere
{
 < 0.0, 0.0, 0.0 > 1.0
 pigment
 {
  spherical
  pigment_map
  {
   [ 0.0000 Clear ]  // Surface
   [ 0.0001 Blue ]
   [ 0.0001 Blue ]
   [ 1.0000 Clear ]  // Center
  }
 }
 finish { ambient 0.0 }
 scale 1.0075
}


Post a reply to this message

From: Warp
Subject: Re: Pigment_Map: Spherical Filling
Date: 27 May 2006 18:38:52
Message: <4478d4fc@news.povray.org>
A sphere is a surface, nothing else. Objects in povray aren't solid.


  What you probably want is media inside the sphere, like this:

camera { location -z*5 look_at 0 angle 35 }

sphere
{ 0, 1 hollow
  pigment { transmit 1 }
  interior
  { media
    { emission 1
      density
      { spherical density_map
        { [0 rgb 0]
          [1 rgb z]
        }
      }
    }
  }
}


-- 
                                                          - Warp


Post a reply to this message

From: Ben Chambers
Subject: Re: Pigment_Map: Spherical Filling
Date: 27 May 2006 23:00:17
Message: <44791241$1@news.povray.org>
Sven Littkowski wrote:
> Marc,
> 
> thanks for your hint! I truly don't new about that keyword. Well, I tried 
> out, but have no success yet. What do I wrong?
> 
> sphere
> {
>  < 0.0, 0.0, 0.0 > 1.0
>  pigment
>  {
>   spherical
>   pigment_map
>   {
>    [ 0.0000 Clear ]
>    [ 1.0000 Blue ]
>   }
>  }
>  finish { ambient 0.0 }
>  scale 1.0075
> }
> 
> Sven 
> 
> 

Well, you're only showing the surface of the object.  As Warp said, you 
probably want media inside it.

However, to see the effect of the pattern more easily, try this:

camera {
	location -z*3
	look_at 0
}

intersection {
	sphere {0, 2}
	box {<-2,-2,0>, 2}
	pigment {
		spherical
		color_map {
			[0 color rgb y]
			[1 color rgb z]
		}
	}
	finish {ambient 1 diffuse 0}
}

This will show quite clearly a transtion from green to blue (you don't 
need any lights to see it either, because of the ambient) and hopefully 
allow you to grasp the function better.

Also, you might wonder why I used a sphere with a radius of 2: to allow 
you to see the effect of the function past the boundary (distance 1 from 
origin).  If you'd like a repeating pattern, replace spherical with 
onion, and rerender.  You'll see the pattern repeated twice.

...Chambers


Post a reply to this message

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