|
|
On Wed, 03 May 2000 00:09:30 +0200, Tor Olav Kristensen
<tto### [at] onlineno> wrote:
>Some of my thoughts:
>
>First I think that for optimal results this problem would have to be
>solved iteratively.
That's OK as long as I can code it... that's what computers are for :)
>But if I was to do this in only one pass, then here is my suggestion:
>First I would create an array of co-ordinates for several (many)
>points along the spline.
>I would then "move" along this string of points and for every point
>I would calculate how many points "behind" and "in front" of this point
>a circle segment could be used for interpolation (within the given
>"error" limit).
How? I mean, it's trivial for three points, maybe even four, but how
should I proceed with more points?
>Then I would do calculations on this array to find out which circle
>segments to use in each "area" of the spline. Here the algorithm would
>have to take into account your other controlling parameters.
>(I think these calculations would be the hardest part of the problem.)
I don't think so. It would be computationally beneficial if these were
taken into account while calculating the circles in the previous step
of the algorithm.
>There is a danger that this last part of the algorithm would have to
>change some of the parameters for the circle segments in order to make
>them possible to join smoothly, and thereby enforcing new "iterations"
>:(
Smoothness is not obligatory as long as cusp angles are kept withing a
certain limit.
>I think that I would use circle segments with large radii instead of
>using linear segments.
Linear segments are preferable where possible.
>I'm not sure what math you are looking for. Please specify.
For example, how does one find the distance to the closest point on a
Bezier spline? Or the maximum distance between a circular arc and a
Bezier spline? I can handle most of the math involved in this problem
but the distances part scares the s*&^ out of me.
Peter Popov ICQ : 15002700
Personal e-mail : pet### [at] usanet
TAG e-mail : pet### [at] tagpovrayorg
Post a reply to this message
|
|