public Triangle ScaleByDistance(double distance) { Point3d middlePoint = Vertices.ToArray().MidPoint3d(); Vector3d vec = middlePoint.Subtract(V1); vec = vec.GetUnitVector(); Point3d p2 = V1.Add(vec.Multiply(distance)); Vector3d vec2 = middlePoint.Subtract(V2); vec2 = vec2.GetUnitVector(); Point3d p3 = V2.Add(vec2.Multiply(distance)); Vector3d vec3 = middlePoint.Subtract(V3); vec3 = vec3.GetUnitVector(); Point3d p4 = V3.Add(vec3.Multiply(distance)); Triangle result = new Triangle(p2, p3, p4); return(result); }