|
|
> BTW, speaking of requests, perhaps it should be useful to allow for the simple
> geometric shapes to be treated as isosurfaces in syntax.
I'd like to have some way to get an isosurface function from primitives
(including complex CSG). That way we could easily make a complex object
using the normal syntax (instead of something like isoCSG), and then use
it inside a isosurface function.
In the C++ code, each object would have 'trace ray', 'is point inside
shape', etc. and a new 'get isosurface function'. Of course it would be
impossible or very hard to implement for some objects (like text or
julia_fractal).
#declare SomeShape = difference {
sphere { <0,0,0>, 1 }
cylinder { -x*2, x*2, 0.5 }
}
isosurface {
function { object_function(SomeShape, x-0.5, z, y)*(1-clock) +
object_function(SomeShape, x+0.5, y, z)*clock }
...
}
Of course you could also use:
#declare Fn = object_function(SomeShape, x, y, z);
isosurface {
function { Fn(x-0.5, z, y)*(1-clock) + Fn(x+0.5, y, z)*clock }
...
}
Which is shorter code.
Producing:
http://stuff.povaddict.com.ar/pov/iso.avi (XviD)
Post a reply to this message
|
|