[Tutor] triangulation

Liam Clarke-Hutchinson Liam.Clarke-Hutchinson at business.govt.nz
Wed Nov 9 21:30:31 CET 2005


As in Pythagoras?

from math import *

c = sqrt(a^2 + b^2)

Or as in triangulation on a 2D surface, navigation etc.?

from math import *

o = tan(theta) * a
o = sin(theta) * h
h = o/sin(theta)

Noting of course that theta defaults to radians.

Or, do you mean radio triangulation by directional signal propagation
strength? The equations for that are a bit beyond me currently, but I'm
studying.

Or, do you mean drawing a triangle in Tkinter?

from Tkinter import * 

#Do some stuff to create a Tkinter canvas in a window, call it... myCanvas.

pointA = [100,100]
pointB = [200,100]
pointC = [150, 0]
triangle =
myCanvas.create_polygon(pointA[0],pointA[1],pointB[0],pointA[1],pointC[0],po
intA[1])

...Not that I know if that will work or not. I'm just going on some outdated
Tkinter tutorials; I daresay the syntax of passing co-ordinates has changed
(I'd hope so.)

Can you be more specific?

-----Original Message-----
From: tutor-bounces at python.org [mailto:tutor-bounces at python.org] On Behalf
Of Shi Mu
Sent: Thursday, 10 November 2005 1:16 a.m.
To: Chris or Leslie Smith
Cc: tutor at python.org
Subject: [Tutor] triangulation


is there any sample code of triangulation? many thanks!
_______________________________________________
Tutor maillist  -  Tutor at python.org
http://mail.python.org/mailman/listinfo/tutor

A new monthly electronic newsletter covering all aspects of MED's work is now available.  Subscribers can choose to receive news from any or all of seven categories, free of charge: Growth and Innovation, Strategic Directions, Energy and Resources, Business News, ICT, Consumer Issues and Tourism.  See http://news.business.govt.nz for more details.




http://www.govt.nz - connecting you to New Zealand central & local government services

Any opinions expressed in this message are not necessarily those of the Ministry of Economic Development. This message and any files transmitted with it are confidential and solely for the use of the intended recipient. If you are not the intended recipient or the person responsible for delivery to the intended recipient, be advised that you have received this message in error and that any use is strictly prohibited. Please contact the sender and delete the message and any attachment from your computer.


More information about the Tutor mailing list