Polygon XX+Sin(S+0)*XD,YY+Cos(S+0)*D To XX+Sin(S+90)*XD,YY+Cos(S+90)*D To XX+Sin(S+180)*XD,YY+Cos(S+180)*D To XX+Sin(S+270)*XD,YY+Cos(S+270)*D
Ink 3
Ink 0
Polygon X2-15+Sin(S+0)*XXD,Y2-5+Cos(S+0)*DD To X2-15+Sin(S+90)*XXD,Y2-5+Cos(S+90)*DD To X2-15+Sin(S+180)*XXD,Y2-5+Cos(S+180)*DD To X2-15+Sin(S+270)*XXD,Y2-5+Cos(S+270)*DD
Ink 3
Draw XX+Sin(S+0)*XD,YY+Cos(S+0)*D To X2+Sin(S),Y2+Cos(S)
Draw XX+Sin(S+90)*XD,YY+Cos(S+90)*D To X2+Sin(S+90),Y2+Cos(S+90)
Draw XX+Sin(S+180)*XD,YY+Cos(S+180)*D To X2+Sin(S+180),Y2+Cos(S+180)
Draw XX+Sin(S+270)*XD,YY+Cos(S+270)*D To X2+Sin(S+270),Y2+Cos(S+270)
Ink 1
Polygon X2+Sin(S+0)*XXD,Y2+Cos(S+0)*DD To X2+Sin(S+90)*XXD,Y2+Cos(S+90)*DD To X2+Sin(S+180)*XXD,Y2+Cos(S+180)*DD To X2+Sin(S+270)*XXD,Y2+Cos(S+270)*DD
Else
Colour 2,-XD/4+2
Colour 1,-XD/8*16*16+$200
Ink 1
Polygon X2+Sin(S+0)*XXD,Y2+Cos(S+0)*DD To X2+Sin(S+90)*XXD,Y2+Cos(S+90)*DD To X2+Sin(S+180)*XXD,Y2+Cos(S+180)*DD To X2+Sin(S+270)*XXD,Y2+Cos(S+270)*DD
Ink 0
Polygon X2-25+Sin(S+0)*XD,Y2-5+Cos(S+0)*D To X2-25+Sin(S+90)*XD,Y2-5+Cos(S+90)*D To X2-25+Sin(S+180)*XD,Y2-5+Cos(S+180)*D To X2-25+Sin(S+270)*XD,Y2-5+Cos(S+270)*D
Ink 3
Draw XX+Sin(S+0)*XD,YY+Cos(S+0)*D To X2+Sin(S),Y2+Cos(S)
Draw XX+Sin(S+90)*XD,YY+Cos(S+90)*D To X2+Sin(S+90),Y2+Cos(S+90)
Draw XX+Sin(S+180)*XD,YY+Cos(S+180)*D To X2+Sin(S+180),Y2+Cos(S+180)
Draw XX+Sin(S+270)*XD,YY+Cos(S+270)*D To X2+Sin(S+270),Y2+Cos(S+270)
Ink 2
Polygon XX+Sin(S+0)*XD,YY+Cos(S+0)*D To XX+Sin(S+90)*XD,YY+Cos(S+90)*D To XX+Sin(S+180)*XD,YY+Cos(S+180)*D To XX+Sin(S+270)*XD,YY+Cos(S+270)*D