POV-Ray : Newsgroups : povray.binaries.images : Made from a Coons patch : Re: Made from a Coons patch Server Time
24 Jun 2026 15:57:01 EDT (-0400)
  Re: Made from a Coons patch  
From: Bald Eagle
Date: 2 Jun 2026 18:00:00
Message: <web.6a1f5165e827a15d1d09a9825979125@news.povray.org>
"Tor Olav Kristensen" <tor### [at] TOBEREMOVEDgmailcom> wrote:
> 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.

Excellent.
My code for rendering a Coons patch does exactly that.


> > 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.

See attached.  Let me know if you need any references to explain how to
calculate the curvature.

> 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.

Yes, since we can interpolate along any edge, I would agree that the degree of
any Bezier curve describing an edge is irrelevant.


I am very interested in using the curvature to modulate a texture for purposes
similar to proximity patterns.  I know that there is an excellent ShaderToy
shader that demonstrates this.

I also think that using curvature to control "attractors" (discussed in another
recent thread) would be a very interesting application.

Also, there was a discussion about using patches and cubes to distort an object,
and I think it would be interesting to explore the possibility of using a patch
to distort a pattern mapped to a unit square.  I suppose that it would have to
be the inverse mapping of the unit square to the patch . . .

And you are right, this kind of thing is fun.
Regardless of the people who question our unique idea of "fun"  ;)

- BW


Post a reply to this message


Attachments:
Download '2022_surfacecurvatureattempt.pov.txt' (30 KB)

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