
A pentagram is a star polygon, consisting of a central pentagon of which each side forms the base of an isosceles triangle. The vertex of each triangle, a point of the star, is 36 degrees.




Task

Draw (or print) a regular pentagram, in any orientation. Use a different color (or token) for stroke and fill, and background. For the fill it should be assumed that all points inside the triangles and the pentagon are inside the pentagram.




See also
 Angle sum of a pentagram


100 XO = 140
110 YO = 96
120 S = 90
130 B = 7
140 F = 6
150 C = 4
200 POKE 230,64
210 HCOLOR= B
220 HPLOT 0,0
230 CALL 62454
240 A = 49232
250 I =  PEEK (A + 7) +  PEEK (A + 2)
260 I =  PEEK (A + 5) +  PEEK (A)
300 SX = S
310 SY = S
320 PI = 3.1415926535
330 E = PI * 4
340 S = PI / 1.25
350 X =  SIN (0)
360 Y =  COS (0)
370 HCOLOR= F
380 PX = XO + X * SX
390 PY = YO - Y * SY
400 FOR I = 0 TO E STEP S
410     X =  SIN (I)
420     Y =  COS (I)
430     FOR J = 0 TO SX
440         HPLOT PX,PY TO XO + X * J,YO - Y * J
450     NEXT J
460     PX = XO + X * SX
470     PY = YO - Y * SY
480 NEXT I
500 HCOLOR= C
510 PX = XO + X * SX
520 PY = YO - Y * SY
600 FOR I = S TO E STEP S
610     X =  SIN (I)
620     Y =  COS (I)
630     HPLOT PX,PY TO XO + X * SX,YO - Y * SY
640     HPLOT PX + 1,PY TO XO + X * SX + 1,YO - Y * SY
650     HPLOT PX,PY + 1 TO XO + X * SX,YO - Y * SY + 1
660     HPLOT PX + 1,PY + 1 TO XO + X * SX + 1,YO - Y * SY + 1
670     PX = XO + X * SX
680     PY = YO - Y * SY
690 NEXT I