Hi all!
Yesterday while rendering my scene with 4000 blobs I got
an idea to a *usefull* object in povray and some of the
algorithms for it. What if I greate a particle object
relying on something related to the Noise function already
existing. What I think is this:
1] The noise function associates a semirandom continuous
value between 0 and 1 for every point in a 3D space. Let
all values over a given threshold (0.8 maybe) be "inside"
an object and all other points outside.
2] Since the Noise function is linear between a given set of
lattice points I can find the intersection of a ray with
the objects by solving a linear intersection for every
3D cube between the lattice points which my ray passes.
3] The gradient in such a point is also computable.
4] Turbulence *might* (I not sure) be added with some "sampling"
points for the ray in every cube.
5] What if the user can specify the values in the lattice used
by the "Noise" function? (Maybe even with turbulence in it!)
Please take a look at the Noise function the sourcefile TEXTURE.c
if you don't understand what I talk about.
I would use such an object to build an asteroid belt approximatly
20 x 20 x length latticepoints large (accomodating approximatly
10 to 20 asteroids in the width and height directions) and thus having
a maximum of 29 (20 * sqrt(2)) linear equations to solve for a ray
orthogonal to the asteroidbelt. With option [5] if could even specify
a density function such that I have many asteroids in the middle
and a few asteroids near the edges.
/ Mathias Broxvall
PS. I know that I talk more than I implement, but I have implemented
*some* changes to povray.
.DS
PPS. To "Rolf F. Katzenberger", I could not answer your question
about a YACC grammar for the parser since your email address
bounces for me.
.DDS
Post a reply to this message
|