Function Penrose

Return path data describing an "impossible polygon."

  • Parameters

    • center: Vec2 = ...

      (x,y) translation

    • radius: Num = 50

      radius of outer polygon (must be positive)

    • holeSize: Num = 0.35

      radius of inner polygon as a fraction of the outer radius (in range (0,1])

    • angle: Num = 0

      angle of rotation

    • nSides: number = 5

      number of sides (integer ≥ 3)

    • chirality: string = "ccw"

      either "cw" for clockwise, or "ccw" for counterclockwise

    Returns PathData

    Path data for a Penrose polygon