News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Triangle Center

Started by Farabi, January 19, 2012, 09:06:15 AM

Previous topic - Next topic

Farabi

How to calculate the Triangle center from a 3D VERTEX? I think it should be simple even in fact I cant understand it.
Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"

donkey

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
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

Farabi

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
Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"

donkey

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
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable