Replies the plane on which this triangle is coplanar.

@return the coplanar plane to this triangle
182165
@Pure
	public Plane3D<?> getPlane() {
		return toPlane(
				getX1(), getY1(), getZ1(),
				getX1(), getY1(), getZ1(),
				getX1(), getY1(), getZ1());
	}
365227
public Map<V, Integer> inDegree() {
        Map<V, Integer> result = new HashMap<>();
        for (V vertex : neighbors.keySet()) {
            result.put(vertex, 0); // all in-degrees are 0
        }
        for (V from : neighbors.keySet()) {
            for (V to : neighbors.get(from)) {
                result.put(to, result.get(to) + 1); // increment in-degree
            }
        }

        return result;
    }
188181
def triangles(self):
        
        triangles = collections.deque()
        triangles_node = collections.deque()

        for node_name in self.graph.nodes_geometry:
            # which geometry does this node refer to
            transform, geometry_name = self.graph[node_name]

            # get the actual potential mesh instance
            geometry = self.geometry[geometry_name]
            if not hasattr(geometry, 'triangles'):
                continue
            # append the (n, 3, 3) triangles to a sequence
            triangles.append(
                transformations.transform_points(
                    geometry.triangles.copy().reshape((-1, 3)),
                    matrix=transform))
            # save the node names for each triangle
            triangles_node.append(
                np.tile(node_name,
                        len(geometry.triangles)))
        # save the resulting nodes to the cache
        self._cache['triangles_node'] = np.hstack(triangles_node)
        triangles = np.vstack(triangles).reshape((-1, 3, 3))
        return triangles
967671
private Polygon getCellPolygon() {
        final Coordinate[] summits = new Coordinate[5];
        double x1 = minX + cellI * deltaX;
        double y1 = minY + cellJ * deltaY;
        double x2 = minX + (cellI + 1) * deltaX;
        double y2 = minY + (cellJ + 1) * deltaY;
        summits[0] = new Coordinate(x1, y1);
        summits[1] = new Coordinate(x2, y1);
        summits[2] = new Coordinate(x2, y2);
        summits[3] = new Coordinate(x1, y2);
        summits[4] = new Coordinate(x1, y1);
        final LinearRing g = GF.createLinearRing(summits);
        final Polygon gg = GF.createPolygon(g, null);
        cellI++;
        return gg;
    }
246779
public PointExpression<Point> pointOnSurface() {
        if (pointOnSurface == null) {
            pointOnSurface = GeometryExpressions.pointOperation(SpatialOps.POINT_ON_SURFACE, mixin);
        }
        return pointOnSurface;
    }
736779
def get_nodal_planes(self):
        
        # Convert reference frame to NED
        self.tensor, self.tensor_sigma = self._to_ned()
        self.ref_frame = 'NED'
        # Eigenvalue decomposition
        # Tensor
        _, evect = utils.eigendecompose(self.tensor)
        # Rotation matrix
        _, rot_vec = utils.eigendecompose(np.matrix([[0., 0., -1],
                                                     [0., 0., 0.],
                                                     [-1., 0., 0.]]))
        rotation_matrix = (np.matrix(evect * rot_vec.T)).T
        if np.linalg.det(rotation_matrix) < 0.:
            rotation_matrix *= -1.
        flip_dc = np.matrix([[0., 0., -1.],
                             [0., -1., 0.],
                             [-1., 0., 0.]])
        rotation_matrices = sorted(
            [rotation_matrix, flip_dc * rotation_matrix],
            cmp=cmp_mat)
        nodal_planes = GCMTNodalPlanes()
        dip, strike, rake = [(180. / pi) * angle
                             for angle in utils.matrix_to_euler(rotation_matrices[0])]
        # 1st Nodal Plane
        nodal_planes.nodal_plane_1 = {'strike': strike % 360,
                                      'dip': dip,
                                      'rake': -rake}

        # 2nd Nodal Plane
        dip, strike, rake = [(180. / pi) * angle
                             for angle in utils.matrix_to_euler(rotation_matrices[1])]
        nodal_planes.nodal_plane_2 = {'strike': strike % 360.,
                                      'dip': dip,
                                      'rake': -rake}
        return nodal_planes
134201
@Pure
	public Point2d getPosition2D() {
		final Rectangle2d b = getBoundingBox();
		if (b == null) {
			return null;
		}
		return new Point2d(b.getCenterX(), b.getCenterY());
	}
145439
private Vector3d getReferenceAxisCylic() {
		// get principal axis vector that is perpendicular to the principal
		// rotation vector
		Vector3d vmin = null;
		double dotMin = 1.0;
		for (Vector3d v: principalAxesOfInertia) {
			if (Math.abs(principalRotationVector.dot(v)) < dotMin) {
				dotMin = Math.abs(principalRotationVector.dot(v));
				vmin = new Vector3d(v);
			}
		}
		if (principalRotationVector.dot(vmin) < 0) {
			vmin.negate();
		}

		return vmin;
	}
361236
public Point3D getXYZ() {
		if (isEmptyImpl())
			throw new GeometryException(
					"This operation should not be performed on an empty geometry.");

		Point3D pt = new Point3D();
		pt.x = m_attributes[0];
		pt.y = m_attributes[1];
		if (m_description.hasZ())
			pt.z = m_attributes[2];
		else
			pt.z = VertexDescription.getDefaultValue(Semantics.Z);

		return pt;
	}
342439
public String getGeometryType() {
      String geometryType = null;
      if (getParameters().length > 0 && getParameters()[0] != null) {
         geometryType = getParameters()[0].toString();
      }
      return geometryType;
   }
667526
@Override
	public Point3d[] getVertices() {
		Point3d[] octahedron = new Point3d[6];
	    octahedron[0] = new Point3d(-cirumscribedRadius, 0, 0);
	    octahedron[1] = new Point3d( cirumscribedRadius, 0, 0);
	    octahedron[2] = new Point3d(0, -cirumscribedRadius, 0);
	    octahedron[3] = new Point3d(0,  cirumscribedRadius, 0);
	    octahedron[4] = new Point3d(0, 0, -cirumscribedRadius);
	    octahedron[5] = new Point3d(0, 0,  cirumscribedRadius);

		return octahedron;
	}
1104020
public Coordinate getCentroid() {
		if (isEmpty()) {
			return null;
		}
		double area = getSignedArea();
		double x = 0;
		double y = 0;
		Coordinate[] coordinates = getCoordinates();
		for (int i = 1; i < coordinates.length; i++) {
			double x1 = coordinates[i - 1].getX();
			double y1 = coordinates[i - 1].getY();
			double x2 = coordinates[i].getX();
			double y2 = coordinates[i].getY();
			x += (x1 + x2) * (x1 * y2 - x2 * y1);
			y += (y1 + y2) * (x1 * y2 - x2 * y1);
		}
		x = x / (6 * area);
		y = y / (6 * area);
		return new Coordinate(x, y);
	}
741758
@Override
	public  Point3d[] getVertices() {
		double x = getSideLengthFromCircumscribedRadius(circumscribedRadius)/2;
		double z = x/Math.sqrt(2);
		Point3d[] tetrahedron = new Point3d[4];
		tetrahedron[0] = new Point3d(-x,  0, -z);
		tetrahedron[1] = new Point3d( x,  0, -z);
		tetrahedron[2] = new Point3d( 0, -x,  z);
		tetrahedron[3] = new Point3d( 0,  x,  z);
		Point3d centroid = CalcPoint.centroid(tetrahedron);

		// rotate tetrahedron to align one vertex with the +z axis
		Matrix3d m = new Matrix3d();
		m.rotX(0.5 * TETRAHEDRAL_ANGLE);
		for (Point3d p: tetrahedron) {
			p.sub(centroid);
			m.transform(p);
		}
		return tetrahedron;
	}
1136990
private GeometryCoordinateSequenceTransformer getTransformer() {
		if (unitToPixel == null) {
			unitToPixel = new GeometryCoordinateSequenceTransformer();
			unitToPixel.setMathTransform(ProjectiveTransform.create(new AffineTransform(scale, 0, 0, -scale, -scale
					* panOrigin.x, scale * panOrigin.y)));
		}
		return unitToPixel;
	}
1349121
public Point3d[] getVertices() {
        Point3d[] vtxs = new Point3d[numVertices];
        for (int i = 0; i < numVertices; i++) {
            vtxs[i] = pointBuffer[vertexPointIndices[i]].pnt;
        }
        return vtxs;
    }
993879
public SimpleFeatureCollection toFeatureCollection() {
        checkTinGeometries();
        SimpleFeatureTypeBuilder b = new SimpleFeatureTypeBuilder();
        b.setName("triangle");
        b.setCRS(crs);

        DefaultFeatureCollection newCollection = new DefaultFeatureCollection();
        b.add("the_geom", Polygon.class);
        b.add("elev0", Double.class);
        b.add("elev1", Double.class);
        b.add("elev2", Double.class);
        SimpleFeatureType type = b.buildFeatureType();
        SimpleFeatureBuilder builder = new SimpleFeatureBuilder(type);
        for( Geometry g : tinGeometries ) {
            Coordinate[] coordinates = g.getCoordinates();

            Object[] values;
            int windingRule = GeometryUtilities.getTriangleWindingRule(coordinates[0], coordinates[1], coordinates[2]);
            if (windingRule > 0) {
                // need to reverse the triangle
                values = new Object[]{g, coordinates[0].z, coordinates[2].z, coordinates[1].z};
            } else {
                values = new Object[]{g, coordinates[0].z, coordinates[1].z, coordinates[2].z};
            }

            builder.addAll(values);
            SimpleFeature feature = builder.buildFeature(null);
            newCollection.add(feature);
        }
        return newCollection;
    }
319116
public Plane fromPoints (IVector3 p1, IVector3 p2, IVector3 p3) {
        // compute the normal by taking the cross product of the two vectors formed
        p2.subtract(p1, _v1);
        p3.subtract(p1, _v2);
        _v1.cross(_v2, _normal).normalizeLocal();

        // use the first point to determine the constant
        constant = -_normal.dot(p1);
        return this;
    }