5556575859606162636465
{ return me.getStartPoint(); } // 计算交点 CPoint px = line1.crossPoint(line2); // 断言 if (px == null) { CMAssert.unreachableCode(); } //检查是否合法
6364656667686970
*/ public CPoint computeOuterCenter() { Line l1 = getLine(p1, p2); Line l2 = getLine(p2, p3); CPoint point = l1.crossPoint(l2); return point; }
78798081828384858687
private Line getLine(CPoint p1, CPoint p2) { LineSegment s1 = new LineSegment(p1, p2); Line l1 = s1.toLine(); double k1 = l1.getVerticalK(); CPoint p = s1.getMiddlePoint(); Line vl1 = new Line(p, k1); return vl1; }