POV-Ray : Newsgroups : povray.general : Problem with patterns in height_fields : Re: Problem with patterns in height_fields Server Time
19 Nov 2024 20:43:33 EST (-0500)
  Re: Problem with patterns in height_fields  
From: Simon Adameit
Date: 4 Jan 2002 17:09:36
Message: <3c362820@news.povray.org>
> Why does the following code produce some abrupt changes in the Y
direction?
> The result is these shadowed lines and dots. I tried different scales and
> patterns, and different resolutions of the function. You're welcome to
> experiment with this yourself, to see that the problem is not something
> dull, like too few triangles or a bad scale.. I don't know what it is,
> actually.
>
That's because your function gives you negative values.
Heightfields doen't work with negative values.
Change your function to function{Pigm(x,y,z)} and it'll work.
If you want to invert your heightfield just use function{-Pigm(x,y,z)}

--
#local T=text{ttf"timrom.ttf""Simon Adameit".01,0}#local Y=1;#while(Y>-1)
#local X=0;#while(X<7)#local O=trace(T<X,Y><X,Y>+z);cylinder{<X-3,Y,5>*.01
<X-3,Y,5>*.01+5e-3,5e-5pigment{rgb 25*O}}#debug chr(83-(O.x=0)*51)#local
X=X+.05;#end#debug"\n"#local Y=Y-.05;#end


Post a reply to this message

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