s = s + 2 ' increase 1 degree
Circle (Xcenter
, Ycenter
), Radius
, 6 'Print "For Degrees: 0 = east, 90 = south, 180 = west, 270 = north"
'Input "Enter Degree Angle for point > ", s
RadianAngle
= _D2R(s
) ' _D2R converts Degrees 2 (to) Radians which is what Sin and Cos process x
= Radius
* Cos(RadianAngle
) + Xcenter
y
= Radius
* Sin(RadianAngle
) + Ycenter
'Line (x - 5, y - 5)-Step(10, 10), 14, BF ' yellow square 10x10 at point x, y
drawRect x
, y
, 20, 40, RadianAngle
+ _Pi / 2, 9 drawRect x
, y
, 15, 15, RadianAngle
+ _Pi / 2, 15
p = p + 1
RadianAngle
= _D2R(p
) ' _D2R converts Degrees 2 (to) Radians which is what Sin and Cos process x
= Radius
* Cos(RadianAngle
) + Xcenter
y
= Radius
* Sin(RadianAngle
) + Ycenter
'Line (x - 5, y - 5)-Step(10, 10), 14, BF ' yellow square 10x10 at point x, y
drawRect x
, y
, 20, 40, RadianAngle
+ _Pi / 2, 4 drawRect x
, y
, 15, 15, RadianAngle
+ _Pi / 2, 14
'Locate 28, 40: Print "ZZZ...";
'Sleep
' from x,y draw midY h/2 towards raHeading
x1
= x
+ h
/ 2 * Cos(raHeading
) y1
= y
+ h
/ 2 * Sin(raHeading
) x2
= x1
+ w
/ 2 * Cos(raHeading
+ _Pi / 2) y2
= y1
+ w
/ 2 * Sin(raHeading
+ _Pi / 2) x3
= x1
+ w
/ 2 * Cos(raHeading
- _Pi / 2) y3
= y1
+ w
/ 2 * Sin(raHeading
- _Pi / 2)
x4
= x
+ h
/ 2 * Cos(raHeading
- _Pi) y4
= y
+ h
/ 2 * Sin(raHeading
- _Pi) x5
= x4
+ w
/ 2 * Cos(raHeading
+ _Pi / 2) y5
= y4
+ w
/ 2 * Sin(raHeading
+ _Pi / 2) x6
= x4
+ w
/ 2 * Cos(raHeading
- _Pi / 2) y6
= y4
+ w
/ 2 * Sin(raHeading
- _Pi / 2)
Line (x2
, y2
)-(x3
, y3
), c
Line (x3
, y3
)-(x6
, y6
), c
Line (x6
, y6
)-(x5
, y5
), c
Line (x5
, y5
)-(x2
, y2
), c