The MASM Forum Archive 2004 to 2012

General Forums => The Workshop => Topic started by: Farabi on January 19, 2012, 09:06:15 AM

Title: Triangle Center
Post by: Farabi on January 19, 2012, 09:06:15 AM
How to calculate the Triangle center from a 3D VERTEX? I think it should be simple even in fact I cant understand it.
Title: Re: Triangle Center
Post by: donkey on January 19, 2012, 09:18:47 AM
Your vertices should consist of the x,y co-ordinates of each point of the triangle, there are 3 points A, B and C. The formula given the x,y of each of the three points is

x = (Ax + Bx + Cx) / 3
y = (Ay + By + Cy) / 3
Title: Re: Triangle Center
Post by: Farabi on January 19, 2012, 09:35:10 AM
Quote from: donkey on January 19, 2012, 09:18:47 AM
Your vertices should consist of the x,y co-ordinates of each point of the triangle, there are 3 points A, B and C. The formula given the x,y of each of the three points is

x = (Ax + Bx + Cx) / 3
y = (Ay + By + Cy) / 3

Cool, thanks.  :U
Title: Re: Triangle Center
Post by: donkey on January 19, 2012, 10:24:40 AM
No problem Onan, if your triangle is in 3D space, you will also need the Z co-ordinate:

x = (Ax + Bx + Cx) / 3
y = (Ay + By + Cy) / 3
z = (Az + Bz + Cz) / 3