Items tagged with centroid


I have some triangles ABC with vertices

1) A(-13,-5,5), B(-5,11,-11), C(-3,-9,15) has centre of out circle is (3, 3, 3), orthocentre (-27, -9, 3) and centroid (-7, -1, -3). 

2) A(-6,6,-1), B(-5,-1,-3), C(2,10,7) has centre of out circle is (1, 2, 3), orthocentre (-11, 11, -3) and centroid (-3, 5, 1). 

How can I write a program to find a triangle with integer coordinates of vertices, centroid, orthocenter and center of the triangle in geometry 3D? 

Is the shortest distance to the centroid or the intersection?

Just a simple problem really.  I thought the centroid of a set (let's say 4 at this point) of points...

I had started to create a procedure for finding the centroid of a list of points.

Centroid := proc (list)
local a, centroid, x, y, i:
a := nops(list):
x := 0:
yi := 0:
for i from 1 to a do
x := x+list[i, 1]:
y := y+list[i, 2]:
end do:
print(`Centroid is at`,([xi, yi]/a)):
end proc:

But I thought there needs to be something simpler than that.  And here we are.

Centroid2 := proc (list)
local i:
print(`Centroid is at`, add(i, i = list...

Page 1 of 1