Formula to draw a regular polygon inscribed or circumscribed to a circle

แชร์
ฝัง
  • เผยแพร่เมื่อ 16 พ.ย. 2024
  • r: radius of the circle
    (x, y): center of the circle
    N: number of sides of the polygon
    k: index of the vertex
    rp: radius of the polygon
    rp = r (for inscribed polygon)
    rp = r/cos(pi/N) (for circumscribed polygon)
    V(k) = (rp * cos(2 * pi * k / N) + x, rp * sin(2 * pi * k / N) + y), for all k in [0, N)

ความคิดเห็น • 2