Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Smooth Curve Algorithm Required' topicStudent Support Forum > General > "Smooth Curve Algorithm Required"

Help | Reply To Topic
Author Comment/Response
Christopher Harry
09/28/09 04:08am

Hello,

I have a simple application where I am trying to use a tablet and pen as a device to measure distance. The idea is to trace around a lens template (as used in your spectacles) and measure distances from a marked point inside the template to the edges of the template (360 degree measurments required)

The tablet pen records a trace (up to 2000 X, Y integer pairs) which I am trying to smooth into a contour of the lens template outline before I start to calculate distances. The trace is intended to be a closed loop although the start and end points of the closed path traced by hand may vary slightly.

Does anyone know which algorithm I should be using for this to achieve the smoothest contour e.g. least squares fit, cubic, bezier ?

I tried a 3rd order cubic yesterday but managed to get a divide by zero error caused by adjacent X,Y pairs having the same value in X. This caused a divide by zero in one of the equations used.

Thanks for any ideas or help,

Chris

URL: ,
Help | Reply To Topic