Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
パイ スライスの外接する四角形を計算するにはどうすればよいですか。半径 (r)、中心点 (x0, y0)、StartAngle (a0)、EndAngle (a1)、drawDirection (時計回りまたは反時計回り) 変数が知られています。
円弧エッジの端点、スライスの中心点、および 4 つの端点 (角度 0、90、180、および 270) のいずれかがスイープ角度内に含まれている場合は、これらの点を計算します。次に、すべてのポイントを反復処理して、x と y の最小値と最大値を見つけるだけです。
チッ!