POV-Ray : Newsgroups : povray.general : Envelope deformation : Re: Envelope deformation Server Time
8 Aug 2025 12:38:23 EDT (-0400)
  Re: Envelope deformation  
From: Bald Eagle
Date: 23 Jul 2025 20:40:00
Message: <web.6881809c27ff66201f9dae3025979125@news.povray.org>
Josh English <Jos### [at] joshuarenglishcom> wrote:

> Are you suggesting there's an easier (and maybe faster way) to do this
> sort of thing? I'll have to wreck my brain on the problem.

Dunno if it's "easier" - that all depends upon your philosophy and code usage.
Might be faster.   I would say probably.

I would strongly suggest looking over my monograph on Bezier patches and
Bernstein polynomials to get the overview, and understand what the polynomial
method actually does, and why it's a more elegant way of doing things.

https://wiki.povray.org/content/User:BillW

Then I'd dig up some of TOK's threads, his GitHub libraries, and the threads
where he teaches me all sorts of stuff about making Bezier patches the "better"
way, and I finally hammer out how to stitch a load of bicubic patches into a
torus.

Once you see what it all does, you'll understand that every point on a bicubic
patch is just an interpolation (which you already know) - but it's the sum of
the contributions of _ALL 16_ control points at that particular u,v coordinate.

So, the idea is that if you start with a unit square (or you divide your mesh
coordinates by the bounding box extents to give u,v parameters, then you can
just plug in the coordinates of a vertex and directly calculate the new position
based on any (re)arrangement of the control points.

I'm just suggesting that this be done in 3D with a full complement of additional
control points for the spatial version.
So that would be 64 points with u,v,w coordinates.

There are only 64 control points, and assembling the polynomial equation(s)
shouldn't be too difficult.  I would imagine that the speed would depend mostly
on the number of triangles in your mesh.

The real challenge is visualizing what the result of moving the control points
is.  Thus, my suggestion for Javascript, Processing, etc.  Desmos might provide
a tedious way to do it, though possibly someone could write it for us.

- BE


Post a reply to this message

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