POV-Ray : Newsgroups : povray.general : Dropping items in a bowl (Snack Mix) : Re: Dropping items in a bowl (Snack Mix) Server Time
4 Aug 2024 16:15:07 EDT (-0400)
  Re: Dropping items in a bowl (Snack Mix)  
From: Tim Nikias v2 0
Date: 31 Mar 2003 06:59:34
Message: <3e882da6$1@news.povray.org>
Hm. Maybe you could even do that without Mechsim:

A very simple approach would be to create simply hulls
for your objects. Like a 2D-hexagon-polygon for the
smarties. Then, you shoot one trace onto the bowl.
Place the polygon there, plus some height to keep adjusted
that the hull is 2D, but the object you want to place is 3D.

Then, shoot another trace through one of the corners of the
polygon. Rotate the polygon to match the corner with the
traced corner.
Redo this several times, cause a rotated corner has a slightly
different position than the intersection of a straight ray traced
onto the surface. Also do this for the other corners, but
try not to move the center of the object/polygon somewhere
else.
In this manner, you place an object, and rotate its orientation to
meet the underlying structure.

Then, add the newly placed object into a union with the bowl,
and add the next object. This one is again placed into the
union, and the trace is always applied on the latest union.
This might need some Input-Output of objects, and isn't
a very easy task to script. But it could be useful for later
projects as well, and thus might be worth the effort.

--
Tim Nikias v2.0
Homepage: http://www.digitaltwilight.de/no_lights
Email: Tim### [at] gmxde

> I'm not sure how much that would be against the
> purist's convention, but Christoph Hormann's
> Mechsim-Patch might be useful for that. He
> began with using functions and calculating everything
> via POV SDL, but then referred to patching, because
> SDL is waaaaay slower than an actual program.
> So its not totally vs the POV purist concept if
> you use his patch...
>
> --
> Tim Nikias v2.0
> Homepage: http://www.digitaltwilight.de/no_lights
> Email: Tim### [at] gmxde
>
> > I posted a picture in images of a bowl of leftover snack mix. It's still
a
> > WIP, but I'm having fun. The original concept was to FILL the bowl with
a
> > "home-tossed" snack mix. However, I ended up placing each "item" by hand
> > becuase I could not find anything in POV that would allow "dropping"
items
> > into a bowl with collision decisions. I'm still a POV purist at this
point
> > and don't know many add-ins or third party software. I assume there is
> > something that will allow me to fill this bowl realistically. Is that
> true?
> >
> > --
> > -Flu
> >
> > "Imagination is the foundation of Reality" - Gallagher
> >
> >
>
>


Post a reply to this message

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