//public double axi_line_size(int); public double tri_size(int m, out double len) { double[] delta12 = new double[3], delta13 = new double[3], delta23 = new double[3], cross = new double[3]; MathExtra.sub3(pts[tris[m].p2].x, pts[tris[m].p1].x, delta12); MathExtra.sub3(pts[tris[m].p3].x, pts[tris[m].p1].x, delta13); MathExtra.sub3(pts[tris[m].p3].x, pts[tris[m].p2].x, delta23); len = Math.Min(MathExtra.len3(delta12), MathExtra.len3(delta13)); len = Math.Min(len, MathExtra.len3(delta23)); MathExtra.cross3(delta12, delta13, cross); double area = 0.5 * MathExtra.len3(cross); return(area); }
//public void quad_corner_point(int, double*, double*, double*); //public void hex_corner_point(int, double*, double*, double*); public double line_size(int m) { double[] delta = new double[3]; MathExtra.sub3(pts[lines[m].p2].x, pts[lines[m].p1].x, delta); return(MathExtra.len3(delta)); }