|
|
our### [at] hotmailcom wrote:
> Is there some similar way to generate an infinite 2D array of these
> cylinders along with some way to either control their spacing or
> diameter?
Interesting idea, that. I'm not sure to what extent it would be
possible.
The problem, insofar as I understand it, is that a ray could intersect
an infinite number of these cylinders--or possibly none at all. Assuming
the worst-case scenario, there has to be a way to decide which set of
intersections to use, since the shape could be used in a CSG object
which would require a number of intersections to be found for
comparisons. Throw in the possibility of several of these arrays
interacting in a CSG, and you've got yourself a worst-case scenario.
I think the only way this could reasonably be done would be to use an
isosurface, a la the Superpatch. A function like this might do the
trick:
#declare cylarray = function {
sqr(x-floor(x+0.5))+sqr(z-floor(z+0.5))-0.25 }
floor() doesn't exist in the current Superpatch--it needs to be added
in. I've got such a modification working myself, though. Heck, maybe
I'll try to render a scene like this to show you.
Lummox JR
Post a reply to this message
|
|