| 
setscreen ("graphics:800;600,offscreenonly")
 Mouse.ButtonChoose ("multibutton")
 var angle, x, y, b, anglev : int := 0
 var left, middle, right : int
 var linex : array 1 .. 3 of int
 var liney : array 1 .. 3 of int
 anglev := 1
 loop
 Mouse.Where (x, y, b)
 left := b mod 10
 middle := (b - left) mod 100
 right := b - middle - left
 if left = 1 then
 angle += anglev
 end if
 if right = 100 then
 angle -= anglev
 end if
 if angle >= 360 then
 angle := anglev
 end if
 linex (1) := x
 liney (1) := y
 linex (2) := linex (1) - 25 + round (cosd (angle - 90) * 50)
 liney (2) := liney (1) + 25 + round (sind (angle - 90) * 50)
 linex (3) := linex (1) - 25 + round (cosd (angle) * 50)
 liney (3) := liney (1) + 25 + round (sind (angle) * 50)
 drawline (linex (1) - 25, liney (1) + 25, linex (1) - 25 + round (cosd (angle) * 50), liney (1) + 25 + round (sind (angle) * 50), black)
 drawline (x - 25, y + 25, x - 25 + round (cosd (angle - 90) * 50), y + 25 + round (sind (angle - 90) * 50), black)
 drawline (linex (2), liney (2), linex (2) + round (cosd (angle) * 50), liney (2) + round (sind (angle) * 50), black)
 drawline (linex (3), liney (3), linex (3) + round (cosd (angle - 90) * 50), liney (3) + round (sind (angle - 90) * 50), black)
 Time.DelaySinceLast (2)
 View.Update
 cls
 end loop
 
 
 |