POV-Ray : Newsgroups : povray.binaries.images : POV'ed POV-Ray logo (~40kbu) : Re: POV'ed POV-Ray logo (~40kbu) Server Time
19 Nov 2024 20:31:52 EST (-0500)
  Re: POV'ed POV-Ray logo (~40kbu)  
From: Marc-Hendrik Bremer
Date: 15 Nov 2001 05:02:53
Message: <3bf392cd@news.povray.org>
Redbeard schrieb in Nachricht <3bf3299a$1@news.povray.org>...

>What I'm trying to achieve is to place an object within the space that some
>other object would occupy without intersecting previously placed objects.
As an
>example, imagine a simple snow-globe, a container with liquid and "snow"
>particles.  Shake it up.  The particles roughly fill the space, but no two
>intersect.  This is what I want to do.
>


You could use trace() for this. To determine if a given place (get it by
using rand() f.e.) for a particle is already occupied by another particle,
you could trace() from the centre of that particle in "all" directions (the
more rays you shoot , the more accurate are your results) at the union of
the other particles. You'll get a bunch of intersection points. If all
intersection points are further away of the centre than the particle is
wide, you know that you can use that place. If not - try another one.

That's the way I would try it (never did, though).

Marc-Hendrik


Post a reply to this message

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