POV-Ray : Newsgroups : povray.binaries.images : Forest generation (or; crude packing) : Re: Forest generation (or; crude packing) Server Time
14 Nov 2024 04:30:43 EST (-0500)
  Re: Forest generation (or; crude packing)  
From: Florian Brucker
Date: 30 Mar 2004 16:31:29
Message: <4069e731$1@news.povray.org>
> Because of the random nature of the code and the need to test against 
> every other tree when placing a new one, scenes with a lot of trees take 
> a long time to parse; 
A way to improve this would be something like bounding boxes - divide 
the space you're filling into n*m rectangles, each with it's own array 
where the objects of that rectangle are stored.

#local Objects = array[CellsU][CellsV][MaxObjectsPerCell];

Of course you have to add an object which overlapps a border into both 
cells it touches.

And now please go on and find me the same packing algorithm you're 
writing, but only should it:
- use 3 dimensions instead of 2
- pack a certain amount of objects in as little space as possible
- use non-spherical (cylindrical would do) objects with a random
   rotation

Haven't got any idea how to do this (Apart from actually running it
through SimPOV, which would take years IMHO).
I'd already be happy if I found some algo which produces pseudo-correct 
results, where the cylinders would overlap (but nobody would notice).

Florian


Post a reply to this message

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