View Single Post
Old 10-09-2007, 04:52 PM   #9
sama
FLAC
 
sama's Avatar
 
Join Date: Feb 2006
Location: London, UK
Posts: 1,280
thanks for the response. I've now figured a new method of doing this, and it's doing well, but I'm still working on getting it perfect:

1. sort the points (easily done through proximity and reordering)
2. start at a point P1 and draw a line to the P3, at the same time as drawing a perpendicular line from the middle of the drawn line to P2.
3. the length of this line measures the height of the curve between P1 and P3.
4. go to P5 and try a perpendicular line with P3... and so forth
5. until the length of that line starts to shrink*, indicating it passed the peak
6. start at the new point (end of last peak) and do it all over again.

*false positives can be ignored by smoothing the line whilst sorting it
__________________
///Mputer - Velocity - TomTom - Vision - Bezel - CarPC
sama is offline   Reply With Quote