|
|
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
Post a reply to this message
Attachments:
Download 'bezier_tri_patch_test.png' (154 KB)
Preview of image 'bezier_tri_patch_test.png'
|
|
|
|
"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
"spoken to" about.
"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}}
Post a reply to this message
Attachments:
Download 'bezier_triangle_v1.png' (111 KB)
Preview of image 'bezier_triangle_v1.png'
|
|