On Mar 20, 2010, at 8:50 AM, Daniele Avitabile wrote:
Hi all,
here is my ideal workflow for drawing a smooth path:
-
Quickly specify ten-fifteen points through which my path will
go. The points are joined by straight lines.
-
Have a magic button that smooth out the pattern for me. I can
push many times the button and the curve gets smoother and smoother.
I do not know whether the magic shortcut (or button) exists: at
present I find myself fiddling with tangents, with irritating results.
Now, even though it may be argued that I am total disaster in
understanding Bezier curves and how to smooth out a path using
tangents, I think that an implementation of magic button 2) would
be really a good improvement.
I am afraid this has nothing to do with Bezier:
-- Draw a curve
-- Place ten-fifteen points on that curve.
-- Rotate everything a quarter turn or so.
-- Make the curve white so it becomes invisible.
-- Now get someone to draw a curve through the ten-fifteen points
that remain visible
– Counter-rotate everything back
– Make the original curve visible again and compare the two curves.
In the case of an algorithm instead of “someone”, I think something
similar would still happen (*)
What is happening is that:
-- The smoothing algorithm must decide what tangents to use at the
given points,
– That decision can be based only on what the algorithm is given,
namely the points,
– But there is an infinite number of curves going through any given
number of points and thus the tangents can be anything.
– So, the smoothing algorithms has to make assumptions such as, for
example:
If the slopes of the line between the first point and the second
point and the line between the second point and the third point have
opposite signs, then the tangent at the second point has slope 0.
But the necessary 0-slope point could be any point between the first
point and the third point and need not at all be the second point as
assumed. So, the algorithm would usually take the horizontal
distances between the points into account to decide where the 0-slope
point is. But that still remains an assumption.
And, indeed, such assumptions can work out to be widely unwarranted
(the reason for the rotation in the experiment).
In fact, it is well known that even plotting programs can err very,
very badly. (See http://www.dfanning.com/graphics_tips/lousysine.html
but Gilbert Strang’s “famous plot of the sine wave” shows that
aliasing is far from being the only thing that can happen.)
What is your workflow to draw smooth paths?
Completely ad hoc: Trying to anticipate which points will have
“influential” tangents.
Regards
–schremmer
(*) I don’t have one but, as I recall, Canvas’ smoothing algorithm
greatly irritated me.
Intaglio mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options