Wasn't it Simon who wrote:
>I believe this is possible to do with isosurfaces - I'm just not very good
>at them :s
>
>I need something like a sine wave extruded in the +z direction
>
>If I have:
>f(x) = sin(2*pi*x)
>
>how do I get that into something like corrugated roof? I've read the
>excellent tutorial on isosurfaces <http://www.econym.demon.co.uk/isotut/>
>and can copy/paste as well as the next man but am obviously missing
>something as I don't seem to be able to do what I need
Mathematically, what you want to plot is y=f(x)
I.e y = sin(2*pi*x)
But isosurfaces evaluate expressions of the format
<function> = <threshold>
where threshold is a constant, so we rewrite the expression as
y - sin(2*pi*x) = 0
isosurface {
function { y - sin(2*pi*x) }
max_gradient 4
contained_by{sphere{0,5}}
pigment {rgb 1}
}
We dont need to bother saying "threshold 0" because that's the default.
--
Mike Williams
Gentleman of Leisure
Post a reply to this message
|