It is currently Sun Feb 28, 2021 5:04 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Getting triangle height
PostPosted: Mon Nov 01, 2004 11:34 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Jun 11, 2003 9:33 pm
Posts: 4657
Location: Spa, relaxing and thinking, and learning...
Code updated For 5.20+

A tip to show math formula to get the height of any 2D triangle knowing the rectangular 2D coordenates of its vertex.
BTW, the formula could be added in Mathematical formulas in PBhelp,
because it is not easy to found it in the web. :o
Code:
Procedure.f TriangleHeight2D(x0.f,y0.f,x1.f,y1.f,x2.f,y2.f)
  ProcedureReturn ((x0-x1)*(y1-y2)+(y0-y1)*(x2-x1))/Sqr(Pow(x2-x1,2)+Pow(y1-y2,2));Note that points (x1,y1) and (x2,y2) are the base of the triangle
EndProcedure

_________________
http://www.zeitgeistmovie.com

While world=business:world+mafia:Wend


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: kvitaliy and 37 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye