POV-Ray : Newsgroups : povray.binaries.images : Made from a Coons patch : Re: Made from a Coons patch Server Time
23 Jun 2026 21:55:00 EDT (-0400)
  Re: Made from a Coons patch  
From: Tor Olav Kristensen
Date: 1 Jun 2026 21:00:00
Message: <web.6a1e2a6ce827a1527b9d23589db30a9@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> "Tor Olav Kristensen" <tor### [at] TOBEREMOVEDgmailcom> wrote:
> > I recently stumbled upon a web course on CAGD by Leonardo Fernandez-Jambrina and
> >
> > https://dcain.etsin.upm.es/~leonardo/eindex.html
>
> Nice.  I've seen that page before - I just haven't had time to delve into that
> topic again in any meaningful depth.
>
> > What caught my attention was chapter 6, where Coons patches are explained.
> >
> > I found it interesting that if a Coons patch is made by Bezier curves
> > along its edges, then one can make a Bezier control grid for the same
> > patch by doing degree elevation on its control grids.
>
> So that you have a subdivided patch . . . It's not instantly obvious why that's
> necessary.  Where does one stop subdividing / degree-elevating?

In a Coons patch with Bezier curves as edges, the degrees of the
interpolating polynomials along the edges depend on the number of
control points along each edge.

After that, there are three interpolations going on: one linear
between one pair of opposing boundary curves, one linear between
the other pair of opposing boundary curves, and one bilinear
between the four corner points. Then the last one is subtracted
from the sum of the first two to prevent double counting the
corners.

An alternative way of doing it is to degree elevate the Bezier
curves along each edge, so that the polynomials for each pair
of opposing edges are the same. This also makes the number of
control points along opposing edges the same. Then, one degree
elevates the grids formed by each pair of these control points
so that the number of control points matches the grid dimensions
of the other pair of edges. Thereafter, one degree elevates the
2x2 grid of control points in the corners to the same final grid
dimensions, allowing the control points of the three control
grids to be added and subtracted directly.

I've made an image (attached) that illustrates this alternative
way ofdoing it. (The arrows in it indicates degree elevations.)
Note that here the number of control points along each pair of
edges is already the same, but it does not need to be so. If it
is not, one has to do degree elevation on the lower-degree edge
curves first, until opposing edges have matching degrees and
control point counts. So the degree elevations stop when all
three control grids have the same dimensions.


> > Once one have such a Bezier control grid, one can use it to find the
> > partial derivatives of the surface. The cross product of these gives the
> > surface normal.
>
> Excellent.
>
> > When one have the surface normal, one can create offset surfaces. And
> > offset surfaces are the foundation for the triangle meshes in this image.
>
> And of course, it's then trivial to calculate the mean and Gaussian curvature of
> the surface at any point.

I am afraid you are a bit ahead of me when it comes to those
curvature calculations. It would be nice to have a function
controlled pigment that shows the curvature across the surface.
to see how you would implement that.


> 1. This is such an obviously TOK image, that I would be able to instantly pick
> it out from a page of image results.  You have a certain style that endures
> across decades of work.  :)

Hehe ;)

Thank you, I appreciate that! I didn't know my style was so
recognizable after all these years, but it's nice to know it
stands out.


> 2.  I can't tell you how happy I am that (aside from seeing WHY you'd need to
> degree-elevate) I can read what you've posted without any trouble whatsoever,
> and and feel confident that (given the control grid points) I could even write
> the SDL necessary to replicate your result in full.

Very good!


> Thanks for all of your help in guiding me to this point, and always pushing the
> envelope a little bit farther.

No problem.

Sometimes the process helps me understand things better. In fact,
while writing this, I realized myself that the number of control
points along opposing edges doesn't even need to be the same to
begin with.

It's always fun discussing these things since we enjoy working on
these same kinds of geometry puzzles.

--
Tor Olav
http://subcube.com
https://github.com/t-o-k


Post a reply to this message


Attachments:
Download 'coons control points to bezier control points.png' (167 KB)

Preview of image 'coons control points to bezier control points.png'
coons control points to bezier control points.png


 

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