[Tutor] Questions of Maths

Alan Gauld alan.gauld at btinternet.com
Wed Apr 18 21:20:00 CEST 2007


"Abu Ismail" <abdulhafid at gmail.com> wrote

> I am working on an implementation of an L-system in Python. I hate
> using turtle module since it uses Tk and as my IDE also uses Tk I 
> have
> to close my editor before I can test the program.

Why so? Don''t you have a multi-tasking OS?
If so just run a command line window alongside your editor
and run the code in that!

> Say you have a line AB with co-ords (x1,y1) and (x2,y2). Say you 
> also
> have a point C with co-ords (x3,y3).
>
> Question: how to determine whether point C is to the left or to the
> right of the line AB?

Derive the equation of the line.
Use it to determine the y coordinate for x3
If y3 is greater than the calculated y then your point is above the 
line.

HTH,

Alan G. 




More information about the Tutor mailing list