From 8a0887dbcf92df95380982bdf828336cf6ebd005 Mon Sep 17 00:00:00 2001 From: Homer Reid Date: Tue, 31 Jul 2018 15:30:29 -0400 Subject: [PATCH] update console-printed description of prism to include center and report axis in cartesian (not prism) coordinate system --- utils/geom.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/utils/geom.c b/utils/geom.c index 5612a1e..5d313c6 100644 --- a/utils/geom.c +++ b/utils/geom.c @@ -2482,10 +2482,11 @@ void display_prism_info(int indentby, prism *prsm) int num_vertices = prsm->vertices.num_items; double height = prsm->height; vector3 z0 = {0.0, 0.0, 1.0}; - vector3 axis = matrix3x3_vector3_mult(prsm->m_c2p,z0); + vector3 axis = prism_vector_p2c(prsm,z0); + vector3 center = prism_coordinate_p2c(prsm,vector3_scale(0.5*height,z0)); - printf("%*s height %g, axis (%g,%g,%g), %i vertices:\n", indentby, "", - height, axis.x, axis.y, axis.z, num_vertices); + printf("%*s height %g, axis (%g,%g,%g), center (%g,%g,%g), %i vertices:\n", + indentby, "", height,axis.x,axis.y,axis.z,center.x,center.y,center.z,num_vertices); matrix3x3 m_p2c = matrix3x3_inverse(prsm->m_c2p); int nv; for(nv=0; nv