POV-Ray : Newsgroups : povray.binaries.images : Flexible lamp neck : Re: Flexible lamp neck Server Time
26 Apr 2024 16:50:44 EDT (-0400)
  Re: Flexible lamp neck  
From: Bald Eagle
Date: 21 Feb 2021 13:45:00
Message: <web.6032a90ed0c3b58b1f9dae300@news.povray.org>
Cousin Ricky <ric### [at] yahoocom> wrote:
> On 2021-02-20 7:24 PM (-4), Bald Eagle wrote:
> >
> > Of course you're going to want to give the neck spline a bit of non-uniform
> > wiggle, and from a math and rigging perspective, one would have to define a
> > minimum radius that the FMC/Greenfield style neck can achieve and somehow
> > disallow sharper bends.  Just a math/programming observation and a puzzle to
> > suggest.  :)
>
> Not sure how to prevent this kind of accident.

Hire better people at the manufacturing plant?
Don't treat the lamp like a 1971 American Tourister?

I would say toggle an algorithm on or off to allow the modeler the freedom to do
whatever they want.

When on:
A simple algorithm might be to define two bounding spheres centered at the shade
opening and at the center of the base top, and then just do simple collision
detection.  Translate the offending spline position away from the base, and then
maybe check to see that it's not intersecting the floor / desk top, etc.

Reading back over this, it occurred to me that a way to disallow such a
too-sharp bend would be to define a minimum radius and then do collision testing
with the sphere defined by the prior inflection points - if that makes sense.

But that brings up an issue I was puzzling over when I was trying to crumple a
cardboard box - I wanted to create the wrinkles and creases and folds, but
define some sort of constraint so that the sum of all of those things was the
same as the original height of the cardboard...

When I was going through all of the Bezier spline stuff, I recall coming across
a way to calculate the arc length of a curve....  but that will have to wait
until I get a second wind.


Post a reply to this message

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