|
|
TonyB wrote:
> How can I do this? The idea is that I bind the thing with box
> {-<R,H1,R>,<R,H2,R>}, so that it goes from square to circle. Perhaps, if
> there is a way, could someone explain how to "gradient" between other
> shapes? Say, a triangle or a star?
To "gradient" between shapes all just join the formulas like this :
f = f1*(1-y) + f2*y
so that the shape starts at f1 and ends at f2 when y goes from 0 to 1
(adapt to your own y values)
for instance :
isosurface {
function {(abs(x)+abs(z))*(1-y)+(x^2+y^2+z^2)*y}
contained_by {box {<-1,0,-1>,<1,1,1>}}
eval
sign 1
threshold 1
pigment{Red}
}
starts as a cube and ends as a sphere
G.
Post a reply to this message
|
|