POV-Ray : Newsgroups : povray.advanced-users : Random tree position, without duplicates? : Random tree position, without duplicates? Server Time
12 Jul 2025 09:51:32 EDT (-0400)
  Random tree position, without duplicates?  
From: SharkD
Date: 4 Jun 2010 15:45:56
Message: <4c0957f4$1@news.povray.org>
Is there a good way to, for instance, place a number of trees randomly 
without having them overlap?

Currently, I use an array to store the positions and compare each new 
tree to all the previous ones. This is however very slow.

I could also create a multi-dimensional B-tree array that divides the 
world into a grid, thereby reducing the number of items to look up. I 
wonder if that would speed things.


-- 
http://isometricland.com


Post a reply to this message

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