POV-Ray : Newsgroups : povray.general : Envelope deformation : Re: Envelope deformation Server Time
8 Aug 2025 12:37:05 EDT (-0400)
  Re: Envelope deformation  
From: Bald Eagle
Date: 23 Jul 2025 12:20:00
Message: <web.68810a8e27ff6620a2cb7a7025979125@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:

> Then you take your mesh, find the bounding box min and max, convert all the 3D
> coordinates to uv(w) coordinates, and use the Bezier splines to adjust the
> coordinates of the mesh.

Take a look at:

https://discussions.unity.com/t/deforming-a-mesh-to-bezier-curve/876635

https://www.youtube.com/watch?v=S_JQUDDAsQk

https://www.rose-hulman.edu/~finn/CCLI/Notes/day21.pdf

my guess is that there are several ways that people go about this, and there are
likely libraries on GitHub and elsewhere.

MY conception of a general way to go about this would be to define a Bezier
parallelpiped consisting of 64 control points - like 4 stacked Bezier patches
having 16 control points each.
The 8 corner points would control your 3D envelope, and all of the inner control
points would control "stretching".

We could expand existing macros to create extended Bernstein polynomials in i,
j, and k.

Cycling through all of the mesh vertices and dividing the coordinates by the
AABB dimensions, you'd get the i, j, k parameters, and could plug those into the
polynomial to get the adjusted mesh vertex coordinates.

Then you could do all sorts of stuff with a mesh.

Best would be to write something in Javascript or Processing to create a
modeler, and have it write out an .inc file for the new distorted mesh.



- BW


Post a reply to this message

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