POV-Ray : Newsgroups : povray.general : Surface from XYZ data : Re: Surface from XYZ data Server Time
30 Jul 2024 16:19:52 EDT (-0400)
  Re: Surface from XYZ data  
From: Warp
Date: 15 Oct 2008 12:08:56
Message: <48f61598@news.povray.org>
Chris B <nom### [at] nomailcom> wrote:
> I might be wrong (I've never used bicubic patches), but the documentation 
> says that POV-Ray supports Bezier patches which, I think, means that you'd 
> have to calculate a large number of Bezier control points that don't sit on 
> the original curved surface. I'd guess that this would be quite tricky.

  Creating a bicubic patch which follows a given surface is not that hard.
The principle is rather simple:

- The four corner points sit on the original surface.

- Each corner point and an adjacent edge point of the bicubic patch define
  a line which is tangential to the surface at the location of the corner
  point.

- The four middle points work in the same way with their respective edge
  points, ie. they define the tangent vector of the surface at the edge point
  (although the generated surface doesn't necessarily go through this edge
  point).

- The only tricky thing is calculating the proper distance between corner
  points and their respective edge points, and the distance between the edge
  points and their respective center points. If I'm not mistaken, this
  distance is defined by the curvature of the surface at the corner point
  (or edge point in the latter case), ie. its second derivative.

  However, I think that in most cases it's enough to distribute all the
  points at (about) equal distances from each other. The possible error
  introduced by this probably isn't very large.

  This also gives the method for joining bicugic patches smoothly. Since
we know that the edge and center control points define the tangent of the
surface with their respective corner/edge points, adjacent bicubic patces
should have the same tangent direction at the shared control points.

-- 
                                                          - Warp


Post a reply to this message

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