ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Fri, 20 Sep 2013 15:40:18 +0200Determine the exact location of the centroid of triangle CDE..Please help!https://ask.sagemath.org/question/10524/determine-the-exact-location-of-the-centroid-of-triangle-cdeplease-help/Triangle CDE has vertices C(-2,4), D(6,2), and E(-4, -2). Determine the exact location of the centroid of triangle CDE.
I need help with this math question. I tried solving it multiple times but got stuck. :/ Please help. :)
Thanks!
MadyminoFri, 20 Sep 2013 15:40:18 +0200https://ask.sagemath.org/question/10524/Compute the centroid of a polytopehttps://ask.sagemath.org/question/8092/compute-the-centroid-of-a-polytope/Does SAGE have a way to compute the center of mass of a polytope? I tried using polymake's centroid method, but that returned an error because the dimension of my polytope is not equal to the ambient dimension. I've read the manual and looked at the available functions but can't seem to find a SAGE command to do this. Does it exist?
EDIT: By request here's some sample _polymake_ code that fails (I'm not sure why this would be useful unless SAGE is using polymake under the hood):
polytope > $q=permutahedron(3);
polytope > print $q->CENTROID;
polymake: WARNING: could not compute 'CENTROID' probably because of unsatisfied preconditions:
precondition : DIM, AMBIENT_DIM ( CENTROID, VOLUME : VERTICES, TRIANGULATION.FACETS )
I'm guessing the error occurs because the ambient dimension of this polytope is 4 but the actual dimension of the polytope is 3; this is the same reason polymake tells me the volume of q is 0.adkWed, 27 Apr 2011 15:50:26 +0200https://ask.sagemath.org/question/8092/