POV-Ray : Newsgroups : povray.binaries.images : Object Placement Rabbit Hole : Re: Object Placement Rabbit Hole Server Time
28 Aug 2025 16:18:47 EDT (-0400)
  Re: Object Placement Rabbit Hole  
From: Chris R
Date: 29 Jul 2025 12:10:00
Message: <web.6888f16bcdb86248d30e597d5cc1b6e@news.povray.org>
Josh English <Jos### [at] joshuarenglishcom> wrote:
> On 7/18/2025 7:07 AM, Chris R wrote:
>
> >
> > The code needs a lot more testing before I put documentation and official
> > examples into the GitHub repo with my libraries, but I thought I'd share the
> > idea in case there are comments, (like "someone has already done this...") :-)
> >
> > -- Chris R
>
> I'm kind of reminded of my cloth simulation renders from way way back.
> It used a lot of trace commands and spring functions that could
> determine a bunch of normals, but trace would give that anyway.
>
> The only other way I could think to do this is to sample a bunch of
> projections of the shape onto the surface until I was satisfied with the
> highest point of contact, then find the second highest point of contact
> and adjust the shape's orientation to touch those two points, then find
> the next highest point and orient again.
>
> I look forward to seeing what you've put together.
>
> Josh

I'll be looking at all of the suggestions in this thread as improvements on the
algorithm.  What I am doing right now avoids non-stable looking placements when
you have small plateaus in the surface by examining point combinations at the
edge of the object first, rather than finding the 3 highest points.  This allows
the algorithm to tilt the object into a valley before making smaller adjustments
using closer point combinations.

BTW: the idea behind this was an aborted attempt at doing cloth simulation that
never worked really well.  I should see if I can find your code for doing it.
-- Chris R


Post a reply to this message

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