POV-Ray : Newsgroups : povray.binaries.images : Bezier triangular patch : Re: Bezier triangular patch Server Time
25 Apr 2024 15:44:04 EDT (-0400)
  Re: Bezier triangular patch  
From: Bald Eagle
Date: 14 Aug 2018 12: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-2023 Persistence of Vision Raytracer Pty. Ltd.