POV-Ray : Newsgroups : povray.general : plane through 4 points : Re: plane through 4 points Server Time
26 Apr 2024 03:08:32 EDT (-0400)
  Re: plane through 4 points  
From: Le Forgeron
Date: 1 Jun 2019 04:32:56
Message: <5cf23838$1@news.povray.org>
Le 31/05/2019 à 19:50, Bald Eagle a écrit :
> 
> Le_Forgeron <jgr### [at] freefr> wrote:
> 
>> Any 4 3D points ?
> 
> I guess that would be the obvious assumption - to code for the general case.
> 
>> Let's imagine they are disposed as the vertices of tetrahedron
>> (regular), what would be the right (curved) sheet ?
>> (I'm questionning the "bend where required" part, which seems obvious
>> but is really not that obvious at all )
> 
> Right - they'd have to be specified.  I read this to mean that there would be a
> simple single bend in the sheet, rather than a saddle or other complex shape.
> So then I suppose if two triangles shared a face and they were non-planar, then
> the sheet would pass through the unshared vertex of the first triangle, then
> through the shared edge / vertices, and then "bend where required to make it
> pass through the final unshared vertex.
> 
>> Can we assume that somehow the 4 points are ordered ?
> 
> We could, but it would probably be easier to just code it, and have the user
> order them according to how they fit into the code.
> 
>> Does the sheet have to be infinite ? (that's what a plane is)
>> or limited to the 4 points ?
>>
>> If you have 4 points, can you interpolate some additional ones to use a
>> bicubic patch ?
>> http://wiki.povray.org/content/Reference:Bicubic_Patch
> 
> 
> And THAT sounds like a simple proposition, however remember that the points
> specified for making a Bezier patch are only control points - the patch doesn't
> pass through them.  And that's what took me far, far, far longer to work out -
> and I only managed to do so with much help from TOK and clipka.
> 

Ok, then I have a simpler solution, but not without my extension:

a Nurbs of size 2 , hence also of order 2.

Nurbs points need a weight (fourth coordinate) but it's easy to use the
same weight (1) for all 4 3D points.

The perimeter is A-B-D-C-A, update for your own 4 points.

#declare A =<0, 0, 0, 1>;
#declare B =<3, 0, 0, 1>;
#declare C =<0, 3, 0, 1>;
#declare D =<2, 2, 1, 1>;
#declare UVMeshableObject = nurbs { 2, 2, 2, 2
  0, 0, 1, 1
  0, 0, 1, 1
  A B
  C D
}
#declare Texture = texture { checker texture { pigment { color blue 1 }
} texture { pigment { color rgb <1,1,0> } } }

#include "NurbsMesh.inc"
#declare UResolution = 32;
#declare VResolution = 32;
mesh {
     UVMeshable( UVMeshableObject, UResolution, VResolution )
     texture { uv_mapping Texture scale <1/24, 1/24, 1> }
     }


Post a reply to this message


Attachments:
Download 'four.png' (42 KB)

Preview of image 'four.png'
four.png


 

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