|
|
Tor Olav wrote in message
news:Xns### [at] 204213191226...
> I thought that
>
> if on are to connect two cubic Bezier curves
> smoothly, the "last" control point for the first
> curve, the point connecting the curves and the
> "first" control point in the last curve must lie
> on a line (as written in the docs),
That's my understanding as well. The two control vectors must lie on the
tangent to the curve at the data point.
> then in order to connect 4 bicubic Bezier
> patches smoothly, all the 8 control points around
> the point connecting the 4 patches should all lie
> in same plane.
Which is what I found to be true empirically-- and then realized I should
have been able to reason out from the above statement. Sometimes I do things
the hard way.
> I'll post two images to povray.binaries.images
> showing how to choose this plane and where to
> place the control points.
>
>
> Tor Olav
Nice images, Tor Olav-- thanks very much. bigPatch01_03.jpg does the best
job I've seen of showing how each "control vector" has to parallel the slope
of the line between the neighbors of the data point.
Now the tough question is once you've found the control vector's direction,
how far out should you position the control point along it? Your diagram and
all others I've seen (at this point I think that's every one that google can
find) have all shown the control points to be spaced at one third and two
thirds of the flat distance between two neighbors. But this appears to be
arbitrary; there is nothing I've run across which says it needs to be this
way. Note that in this scheme the control points on the diagonals are about
41% longer than the others-- and this all seems to be due more to ease of
presentation than to any underlying mathematic principles. And of course the
data points themselves don't have to lay on rectangular grid.
bigPatch superimposes both control points on the midpoint between the data
points (though of course the y values will often be quite different). This
seems neither a better nor worse approximation than doing the usual 1/3 and
2/3-- but it is a different approximation. The "ess" curves will be
different. As near as I can tell, getting accurate "ess" curves would
require solving a series of cubic polynomials-- which I expect would be very
slow, and is certainly beyond the effort I'm willing to put into this.
I've used the feedback I've gotten to make a complete revision of the
bigPatch code which I'll send in a separate post as soon as I reveiw the
forum's rules. I think it's short enough I can put it in the message body--
things have compacted down very nicely!
--
Will Woodhull
Thornhenge, SW Oregon, USA
willl.at.thornhenge.net
Post a reply to this message
|
|