diff --git a/hyperpoint.cpp b/hyperpoint.cpp index 781b046d..bcd0d38a 100644 --- a/hyperpoint.cpp +++ b/hyperpoint.cpp @@ -1991,4 +1991,25 @@ EX bool same_point_may_warn(hyperpoint a, hyperpoint b) { return true; } +/** compute the area of a shape -- v.back() must equal v[0] */ +EX ld compute_area(const vector& v) { + ld area = 0; + for(int i=0; i H1 -> H2 -> C0 - // at C0: (a1-a2) - // at H1: (rh2 - a1 - M_PI) - // at H2: (a2+M_PI - rh1) - // total: rh2 - rh1 - // ld z = degree; - ld x = b2 - b1 + M_PI; - cyclefix(x, 0); - area += x; - } - } - return area; + vector h; + for(int i=sh.s; i