POV-Ray : Newsgroups : povray.general : Preventing Randomly Placed Objects to Stick into Each Other : Re: Preventing Randomly Placed Objects to Stick into Each Other Server Time
2 Aug 2024 00:16:10 EDT (-0400)
  Re: Preventing Randomly Placed Objects to Stick into Each Other  
From: Elias Pschernig
Date: 18 Feb 2005 14:30:00
Message: <web.421642027850becd29f6b9c60@news.povray.org>
"Sven Littkowski" <wrt### [at] yahoocom> wrote:
> Thanks for opening this my question.
>
> I can place and rotate many objects by random in a scene. But how do I
> prevent them to be randomly placed INTO each other?
>
> Means:
> (A) how to define a bigger security frame around each randomly placed and
> rotated object, and
> (B) how to set new objects without insulting that frame of any other
> previous object?
>

I just finished skimming over most of the docs, and I'd say the functions
described here could be useful:
http://povray.org/documentation/view/3.6.1/229/

In particular, min_extend, max_extend and trace. I imagine, you could keep a
list of all the objects so far, then use e.g. trace to determine if
something is where you want to place a new object (using multiple rays)..
and that way find out a spot where to place the new one, probably with some
iterative algorithm.

The mechsim chapter in the megapov docs also sounds like it could provide an
easy solution:
http://megapov.inetart.net/manual-1.0/global_settings.html#mechsim

Personally, I have not much experience with either of the above - so maybe
someone else can give some more detailed hints.


Post a reply to this message

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