// points are oriented clockwise, starting at top // angle is in radians static Pt pointOnCircle(Pt center, double radius, double angle) { ret pt( iround(center.x + sin(angle)*radius), iround(center.y - cos(angle)*radius)); }