|
![](/i/fill.gif) |
I'm trying to do the bobby hat -thing and my functions give extraneous
sharp edges. The following script has commented out the kind of thing I'm
looking for (made with a pattern) and the problematic line uncommented.
#include "colors.inc"
global_settings {assumed_gamma 2.4 }
plane {
y, -1.8
pigment { checker DarkTan DarkOliveGreen }
}
light_source { <5, 14, -8> color White }
camera {
location <0, 0, -4>
look_at 0 angle 46
rotate x*7 rotate y*6 }
#declare ndist = function (x,y) {
sqrt(pow(x,2)+pow(y,2))/sqrt(2)
}
height_field {
function 100, 100 {
// pattern { waves scale .1 }
1+cos(2*pi*ndist(x,y))
}
pigment { DarkOrchid }
translate -.5
scale <2, .5, 2>
}
Post a reply to this message
|
![](/i/fill.gif) |