This kind of algorithm could be quite intense.. If you are just drawing it once, it may be faster to just draw the 500 points. Optimization would depend on any assumptions you can make about the data.

A brute force approach would be to just iterate through the points and compare 3 at a time, saying that if the middle point of each triplet was within a certain distance(tolerance) from the line formed by the outer 2, then you could disregard that point.




On Apr 13, 2006, at 9:12 AM, Mick G wrote:

Does anyone know of any way to optimize a whole bunch of lineTo points? Say I have 500 points all fairly close that I'd like to reduce to fewer points.

I guess what I'm really after is an algorithm similar to the "Modify > Shape
Optimize" command in the Flash API. Has anyone seen what type of math
formula is used for this type of command that is quite common in most
drawing apps.
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to