|
![](/i/fill.gif) |
Wasn't it Simon who wrote:
>That is very clear! Thanks Mike - If you don't mind some further
>questions...
>
>Say we wanted to do something like an infinitely long crinkle-cut chip
>(excuse the awful description)
>
>Dealing with 1 dimension at a time...
>
>y<1+sin(x*2*pi)
>y>-1+sin(x*2*pi + pi/2)
>
>how can I combine the 2? - to be more precise, how do I define the "solid"
>bit as the area between the two?
>
>If you'd rather point me at a tutorial and leave me to it, I understand but
>if you're willing to walk me through this, I'd greatly appreciate it
>
>Thanks in advance!
You can use this trick to do two dimensions at once
http://www.econym.demon.co.uk/isotut/substitute.htm#thick
Like this:
function { abs(sin(2*pi*x)-y)-0.25 }
To do four directions, you can use max() to perform the intersection of
the simpler functions.
#declare F = function(x,y) {0.1*sin(2*pi*x)+y}
isosurface {
function { max( F(x,y-1), F(x-0.5,-y-1), F(x,z-1), F(x-0.5,-z-1)) }
max_gradient 1.2
contained_by{box{<-5,-2,-2><5,2,2>}}
pigment {rgb <0.9,0.8,0.7>}
}
--
Mike Williams
Gentleman of Leisure
Post a reply to this message
|
![](/i/fill.gif) |