POV-Ray : Newsgroups : povray.advanced-users : Formula to add pigment image map to isosurface sphere ? : Re: Formula to add pigment image map to isosurface sphere ? Server Time
30 Jul 2024 06:23:02 EDT (-0400)
  Re: Formula to add pigment image map to isosurface sphere ?  
From: mr art
Date: 5 Feb 2000 09:05:51
Message: <389C2E4C.25A2B350@gci.net>
This is how I do it:
#declare Pic=function{pigment{image_mape{tga "mymap"}}}
#declare FUNC1=function {"sphere",<R0>}
#declare RO = //Radius of planet
#declare Prec = // % difference that the image map
		// makes to the surface of the sphere
isosurface
	{
	function{FUNC1(x,y,z)-(Pic(x,y,z)*R0*Prec)}
	contained_by {sphere {0,R0*(1+Prec)}}
	...
	}
Seems to work well.

Gilles Tran wrote:
> 
> This formula was posted in one of the groups not so long ago (a couple
> of weeks ?).
> It was meant to make planets out of planet maps, if I remember well.
> The map was used as a pigment map, turned into a function added to the
> regular sphere function :
> x*x+y*y+z*z + stuff here (hfld())
> 
> with hfld=function{pigment{image_mape{tga "mymap"}}}
> 
> The nice thing was that the height field coordinates were mapped to the
> sphere (or so I guessed by looking at the code). So it was not
> x*x+y*y+z*z +1-hfld(x,y,z) but something slightly more complicated.
> 
> I can't find it, and I don't remember the author's name... I could be
> mistaken too.
> Any help very much appreciated !
> 
> G.

-- 
Mr. Art

"Often the appearance of reality is more important 
than the reality of the appearance."
Bill DeWitt 2000


Post a reply to this message

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