|
 |
Le 05/04/2010 12:46, clipka nous fit lire :
> Am 03.04.2010 20:39, schrieb Darren New:
>>
>> It's not my code or idea or anything. But the ability to play with
>> algorithms like this and then output SDL instead of pixels is I think
>> much better than having to write the ray-tracer yourself just cause you
>> have a good idea for a picture. :-)
>
> I wonder whether it would be possible to write a POV-Ray patch to
> implement a "repeating CSG" object type, repeating a set of objects /ad
> infinitum/ in one, two or three directions (while still retaining the
> possibility of placing individual non-repeating objects, which seems
> reasonably difficult to me with the "infinity box" approach). Ideally
> with some pattern parameter to pick one out of multiple object sets for
> each "cell"...
First question: what would be the space filling pattern ?
The cubic system comes first to mind, but there is a few other (where
are cristallographers when you need them ?)
Short of the system to fill the space, it might just be an issue of
having a "csg" object to hold your repeated construction (inside a unit
sphere ? rather than a unit cube ?) to translate on the fly the ray
intersection's computation (whenever the ray would hit a sphere, a
transformation (translation) is done to the ray to perform the children
intersection, children assumed to be at origin)
Caveat: all_intersection method should be limited to a depth, or we are
going to have issue.
Hint: intersection with planes might be enough to restrict the
repetition amongst various dimension.
Nevertheless, a 1D & 2D repetitions addition might be welcome for
computation's time. Both infinity, or 0 to infinity is also some
options, I would prefere only both infinity.
(and default repetion in 1D to be along X, 2D: X,Y)
How would you name them ?
clipka1D, clipka2D, clipka3D ?
CubicClosePacking (face centered cubic: ABCABC hexagonal of 12 spheres)
HexagonalClosePacking (ABAB alternance, 12 spheres)
CubeTiling (classical x,y,z cubic repetition)
? (derivative for 1D/2D/3D ?)
Post a reply to this message
|
 |