POV-Ray : Newsgroups : povray.binaries.images : Flexible lamp neck Server Time
24 May 2022 12:03:37 EDT (-0400)
  Flexible lamp neck (Message 11 to 15 of 15)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Bald Eagle
Subject: Re: Flexible lamp neck
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

From: Cousin Ricky
Subject: Re: Flexible lamp neck
Date: 21 Feb 2021 13:54:02
Message: <6032ac4a$1@news.povray.org>
On 2021-02-21 1:08 AM (-4), Cousin Ricky wrote:
> On 2021-02-20 7:24 PM (-4), Bald Eagle wrote:
> 

>> thin layer of
>> kaolin powder coated onto the inside.
> 
> This was a v3.7 render, so I used a layered texture in lieu of 

> just go straight for the finish-level Fresnel, but you have me wondering 

> lookalike), it looks like there's some SSLT going on there, but I wasn't 

> than the finish-level Fresnel?

This is a simplified version of the bulb texture.  Of course, the 
production texture will have emission and allow for colored glass.

There are subtle differences between POV-Ray versions.  Note the wimpy 
highlight on the left edge of the v3.5 sphere.  This is likely due to AA 
pre-clipping.

The value of sotd_c_Ambient is, of course, zero for this radiosity render.

----------[BEGIN CODE EXCERPT]-----------
   material
   { #if (version < 3.8)
       #declare s_Annot = "Layered texture"
       texture
       { pigment { rgb 1 }
         finish
         { diffuse 0.75
           ambient 0.75 * sotd_c_Ambient
         }
       }
       texture
       { pigment { rgbf 1 }
         finish
         { reflection { 0 1 fresnel } conserve_energy
           specular 6.67
           roughness 0.001
         }
       }
     #else
       #declare s_Annot = "Finish-level Fresnel"
       texture
       { pigment { rgb 1 }
         finish
         { fresnel 1
           reflection { 0 1 } conserve_energy
           specular albedo 1
           roughness 0.001
           diffuse 0.75
           ambient 0.75 * sotd_c_Ambient
         }
       }
     #end
     interior { ior 1.523 }
   }
-----------[END CODE EXCERPT]------------


Post a reply to this message


Attachments:
Download 'frosted_glass_versions-pbi.jpg' (43 KB)

Preview of image 'frosted_glass_versions-pbi.jpg'
frosted_glass_versions-pbi.jpg


 

From: Cousin Ricky
Subject: Re: Flexible lamp neck
Date: 21 Feb 2021 14:18:36
Message: <6032b20c$1@news.povray.org>
On 2021-02-21 2:40 PM (-4), Bald Eagle wrote:
> 
> 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.

For a circular arc, by definition it's

   arc_length = angle_in_radians * radius_of_curvature


to me, but can probably be explained to a 5 year old on Numberphile.


Post a reply to this message

From: Bald Eagle
Subject: Re: Flexible lamp neck
Date: 21 Feb 2021 14:45:00
Message: <web.6032b79ed0c3b58b1f9dae300@news.povray.org>
Cousin Ricky <ric### [at] yahoocom> wrote:
> On 2021-02-21 2:40 PM (-4), Bald Eagle wrote:
> >
> > 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....


> to me, but can probably be explained to a 5 year old on Numberphile.

https://www.mathsisfun.com/calculus/arc-length.html

I guess it's easier than I recall, or was presented to be.

I suppose tidying it all up for the 4 Bernstein polynomials may look a wee bit
messy, but it probably shouldn't be too bad, since I went well past that and
into the weeds of Gaussian curvature territory...


Post a reply to this message

From: Bald Eagle
Subject: Re: Flexible lamp neck
Date: 21 Feb 2021 21:00:01
Message: <web.60330f52d0c3b58b1f9dae300@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:

> I guess it's easier than I recall, or was presented to be.

Or not, but apparently there are libraries that do it, so maybe they can be used
somehow, or just the simple multiple-line-segment method would be good enough
for the present purpose.

https://raphlinus.github.io/curves/2018/12/28/bezier-arclength.html


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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