POV-Ray : Newsgroups : povray.general : Algorithm-approach to eliminate intersections... : Algorithm-approach to eliminate intersections... Server Time
18 Nov 2024 23:42:56 EST (-0500)
  Algorithm-approach to eliminate intersections...  
From: Tim Nikias
Date: 20 Jun 2002 18:01:44
Message: <3D1250BE.F4D8C05F@gmx.de>
I'm currently giving my particle-system some rest and working
on my vegetation-macros.

The one I'm currently working on will be the essential part
of it all:
It locates a position on a given heightfield, checks for steepness
and vicinity of other objects, and does so until it suspects that
it has reached the maximum number of objects that may be placed
at all...

How does it do that?
1. It generates a position on the heightfield.
2. Checks if surface-normal is not too steep
3. Checks if formerly placed objects are far enough away,
by running through the former data and checking until
too-near-object is found
4. If both checks are successful (i.e. object may be placed),
the position is saved to disc, and loop begins anew.

Though its very basic right now (does not take different
sized objects into account yet), I've already made sure
that user-defined checks and position-generation are
possible (in case someone would like to use something
different than a heightfield).

Nontheless, I'm thinking how I can simplify the method of
counter-checking every new object with ALL objects
that were formerly generated. I do know of the subdivision
method, i.e. creating several blocks and only checking in
those and the nearest blocks, but are there any different
approaches, like sorting all positions somehow?

--
Tim Nikias
Homepage: http://www.digitaltwilight.de/no_lights/index.html
Email: Tim### [at] gmxde


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.