POV-Ray : Newsgroups : povray.binaries.images : BOXED pattern with image_map, as DECAL : Re: BOXED pattern with image_map, as DECAL Server Time
1 May 2024 23:10:55 EDT (-0400)
  Re: BOXED pattern with image_map, as DECAL  
From: Christian Froeschlin
Date: 5 Apr 2010 12:53:53
Message: <4bba15a1$1@news.povray.org>
Kenneth wrote:

> My own way of visualizing this is...backwards. I.e., 0.0 tells me its
> the origin, and 1.0 looks like 1-unit from the origin and everything
> outside. I have to *re-think* every time I use such a pattern.

I also confuse this very often. But of course, the index list has no 
notion of inside or outside or distance from anything. It all depends
on they way the pattern function is defined. And the pattern functions
are general: if you use spherical for media you will often be happy
that the densest point is in the center ;)

You could easily create an inverted spherical pattern function:

#declare f_spherical_inverted = function(x,y,z) {1-f_spherical(x,y,z)}

pigment
{
   function{f_spherical_inverted(x,y,z)}
   color_map {[0.0 color Black] [1.0 color White]}
}

But it will evaluate somewhat slower than the built-in spherical.


Post a reply to this message

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