POV-Ray : Newsgroups : povray.general : Algorithm-approach to eliminate intersections... : Re: Algorithm-approach to eliminate intersections... Server Time
18 Nov 2024 23:32:23 EST (-0500)
  Re: Algorithm-approach to eliminate intersections...  
From: Samuel Benge
Date: 20 Jun 2002 19:16:41
Message: <3D126253.3050705@caltel.com>
When I wanted to tackle this problem I made a program in a completely 
different language that randomly placed points without letting each 
one's radius intersect any of the other's. The program then spit out an 
array for POV to read. That way, when POV goes to render the scene, it 
doesn't take an enormous amount of time. I never took the prgram to the 
next step: allowing different-sized objects. You can check out the saved 
coordinates in my post to povray.binaries.scene-files, titled 
Pre-calculated, Spaced Vectors.

Tim Nikias wrote:

> 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
> 
> 
> 


-- 
Samuel Benge

sbe### [at] caltelcom


Post a reply to this message

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