On 02/09/14 15:01, Whees Northbee wrote:
If all of these confusing, I'll simplify the problem, I need to know
if a point (x,y) exactly at a line where line is (ax1,ay) to
(ax2,ay)..

Can someone tell me how??

Take the equation of the line and see if x,y fits.

The hard bit is that if you are sampling x.y periodically you may never get the points exactly on the line so you may need to settle for determining whether the point crossed the line. That will require that you store the previous coordinates and compare to the new ones to see if they cross ay within the given ax boundaries.


--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.flickr.com/photos/alangauldphotos

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to