|
|
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
|
|