|
![](/i/fill.gif) |
Wasn't it Brooks Boyd who wrote:
>Hello All,
>I have been using POV-Ray for the better part of a decade now, but I ran
>into a problem with a Earth globe I'm trying to render. Here's the bit
>of code I have:
>
>#declare EarthScale = 2;
>
>#declare FullDay = material {
> texture {
> gradient x
> scale EarthScale
> texture_map {
> [0.4 Day]
> [0.6 Night]
> }
> }
>}
>
>sphere {
> <0, 0, 0>
> EarthScale
> material { FullDay }
>}
>
>"Day" and "Night" are both textures that pull in a image map of the
>Earth and spherically interpolate it.
One way of doing it is to discard the gradient pattern and write your
own function. This gives you total control of the scaling and
translation of that pattern independently of any other texture features.
texture {
function {x/2 +0.5}
scale EarthScale
Doing it this way means that you can also do things like
function {x/2 +0.5 -y/10}
and even things like
function {x/4 +0.5 -y/5 +z/10}
giving you different tilts on the pattern from the image maps.
--
Mike Williams
Gentleman of Leisure
Post a reply to this message
|
![](/i/fill.gif) |