POV-Ray : Newsgroups : povray.binaries.images : Bezier triangular patch Server Time: 11 Dec 2018 15:47:36 GMT
  Bezier triangular patch (Message 1 to 2 of 2)  
From: JimT
Subject: Bezier triangular patch
Date: 14 Aug 2018 12:55:01
Message: <web.5b72d0101835ff23be7517870@news.povray.org>
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'
bezier_tri_patch_test.png


 

From: Bald Eagle
Subject: Re: Bezier triangular patch
Date: 14 Aug 2018 16:20:00
Message: <web.5b7301267d247aefc437ac910@news.povray.org>
"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'
bezier_triangle_v1.png


 

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