setscreen ("nocursor") var FileNo, MFileNo : int var FileName, MotionFile : string var N : int var NMoves,DeltaX,DeltaY: int procedure DrawPicture (Points : array 1 .. *, 1 .. * of int, DX, DY, NP : int) cls for k : 1 .. NP - 1 drawline (Points (k, 1) + DX, Points (k, 2) + DY, Points (k + 1, 1) + DX, Points (k + 1, 2) + DY, green) end for end DrawPicture loop put "Enter Picture File Name: " .. get FileName open : FileNo, FileName, get exit when FileNo > 0 put "Error: Cannot Open", FileName end loop loop put "Enter Motion File Name: " .. get MotionFile open : MFileNo, MotionFile, get exit when MFileNo > 0 put "Error: Cannot Open", MotionFile end loop get : FileNo, N var picture : array 1 .. N, 1 .. 2 of int % Read in the Picture for i : 1 .. N get : FileNo, picture (i, 1), picture (i, 2) end for get: MFileNo, NMoves for m : 1 .. NMoves get: MFileNo, DeltaX, DeltaY DrawPicture (picture, DeltaX, DeltaY, N) end for