POV-Ray : Newsgroups : povray.binaries.images : Bezier triangular patch Server Time: 20 Jun 2019 07:15:24 GMT
 Bezier triangular patch (Message 1 to 2 of 2)
 From: JimT Subject: Bezier triangular patch Date: 14 Aug 2018 12:55:01 Message:
```A Bezier triangular patch, based on (u+v+w)^3 = 1, where u, v and w ( = 1 - u -
v) are triangular co-ordinates.

Code in the general group

Using a singular quadrilateral patch could cause problems/wrinkles. However,
trying to smoothly join Bezier triangular patches is even more of a mug's game
than trying to smoothly join Bezier quadrilateral patches since there is only
one internal point

JimT
```

Attachments:

Preview of image 'bezier_tri_patch_test.png'

 From: Bald Eagle Subject: Re: Bezier triangular patch Date: 14 Aug 2018 16:20:00 Message:
```"JimT" <nomail@nomail> wrote:
> A Bezier triangular patch, based on (u+v+w)^3 = 1, where u, v and w ( = 1 - u -
> v) are triangular co-ordinates.

Wonderful - this is really admirable.  :)
It's always a joy to see someone who knows what they are doing take the time to
implement something "the right way".

I'm also kinda laughing because this is exactly what a lot of us POVVers get

"Make me a triangle".
"Here."
"Why is it 320 LINES OF CODE?   What IS all this???!"
"Well, these are Bezier splines, and that's an array to hold the control points,
and here's a macro to to create the patch, and this is the interpolation
algorithm...  "

:D

Now all we need is for Kenneth to make us a nice hexagonal Bezier patch...   ;)

I tweaked the camera and added:

#declare Line = 0.1;
#declare LTex = pigment {White};

#for (Point, 0, 7)
cylinder {vertex_vects[Point], vertex_vects[Point+1], Line texture {LTex}}
#end
cylinder {vertex_vects[8], vertex_vects[0], Line texture {LTex}}

cylinder {vertex_vects[1], vertex_vects[9], Line texture {LTex}}
cylinder {vertex_vects[2], vertex_vects[9], Line texture {LTex}}
cylinder {vertex_vects[4], vertex_vects[9], Line texture {LTex}}
cylinder {vertex_vects[5], vertex_vects[9], Line texture {LTex}}
cylinder {vertex_vects[7], vertex_vects[9], Line texture {LTex}}
cylinder {vertex_vects[8], vertex_vects[9], Line texture {LTex}}
```

Attachments: