POV-Ray : Newsgroups : povray.binaries.images : Curved sheet passing through 4 points : Re: Curved sheet passing through 4 points Server Time
26 Apr 2024 21:26:34 EDT (-0400)
  Re: Curved sheet passing through 4 points  
From: Bald Eagle
Date: 2 Jun 2019 09:05:00
Message: <web.5cf3c91aa05608e54eec112d0@news.povray.org>
So, a few things I noticed while playing with this some more.

Given any 3 + 1 points (4 th point is always nonplanar, or at least outside of
the triangle) you can "throw them down onto a table" and they will land with 3
points flat down with one either "over there" on the table, or in the air.

All flat = just a plane so we can just always note this and ignore it from now
on.

Then you can take a sheet of paper and bend it upwards and tuck it under the 4th
point so the sheet is between the point and the "table".  Obviously you can
shift the paper to get different locations and eccentricities of the bend.

So there are a lot of 2D curves that could be used to fit the task - parabolas,
one side of a hyperbola, some sort of minimum-energy / minimum curvature thing
(picture a sheet of spring steel being shoved under the 4th point and slid under
until the sheet _just_ contacts all 3 points on the table).

On to the current implementation:

I wanted to (for the moment) restrict the way this was constructed to a right
angle between the wings of the fold, and so I needed to get a plane
perpendicular to the plane of the triangle.

So I computed the centroid, projected the 4th point onto the triangle's plane,
and that gives me a line that lies on that plane - it's parallel and coincident.
But that also means that it's the _normal vector_ to define a plane that's
perpendicular to the triangle's plane.  (gray dots and lines)

Super.  So now can define that plane, but I need to know what "D" is - the
offset from zero so that it coincides with the 4th point.
So I project the 4th point onto the perpendicular plane, calculate the length of
that vector, and use that length as D.
(more gray dots and lines)

There's still some weirdness going on when I move the 4 points around to get
some tilt to the triangle plane - I lose coplanarity, as you can see by the
shadows cast by the red points.

Maybe I'll get a chance to sift through some more POV-Ray documentation and see
if there are internal functions / include files / vector macros that do what I'm
doing with the analytical geometry equations (I think I got these from Graphics
Gems - dunno)


Post a reply to this message


Attachments:
Download 'documentationfigures.png' (135 KB)

Preview of image 'documentationfigures.png'
documentationfigures.png


 

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