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