\X PAGE18\ON KEY 7181\ON KEY 14624\ON KEY 4096 JUMP ENDITALL
\LOC 60,20\WID 520 DOTS CENTERED\TEXT PLANE=1111
HERE'S HOW TO DRAW THE PISTON...
\LOC 60,98\TEXT PLANE=1101\BLANK 60,100,600,192
FIRST, WE'LL WORK ON A LARGER VERSION, AND SHRINK IT DOWN LATER...
\BLANK 6,140,634,449
\READ PICEDIT8.PIC\SHOW 108,200,1\SHOW 108,200,2\SHOW 108,180,3\READ FRSTPIST.PIC
\SHOW 220,240,1\LOC 340,247\WID 280 DOTS\TEXT PLANE=1001
Draw the first frame, but don't draw the air and fuel mixture or the exhaust fumes and other details.  We'll add them later.
\BLANK 56,45,633,96
\CALL WAITANDRET\TEXT PLANE=1101
Make 5 copies of the original frame... It's easy!
Just use Function Key 3 to create another frame, and another... (You can automate creating multiple frames with the command \FRAME.)
\LOC 340,247\WID 280 DOTS\TEXT PLANE=1001
The frame should only be as big as you need to animate the image.  After pressing <F3> you can set the size with the mouse or cursor keys.
\LINE 214,238,306,339,15,B\READ SMLPST16.PIC
\SHOW 54,45,1\SHOW 78,45,1\SHOW 102,45,1\SHOW 126,45,1\SHOW 150,45,1
\CALL WAITANDRET\X PAGE30\ON KEY 7181
\TEXT PLANE=1101\BLANK 330,246,630,384\LOC 60,98\WIDTH 520 DOTS CENTERED
To reposition the piston, save rectangles from the original frame and redisplay them lower and lower in the cylinder.
\"
\LINE 214,238,306,339,0,B\DRAW J285,276C14E8G8F8H8R76
\LOC 368,267\TEXT PLANE=1100\DISPL "PISTON"\LINE 242,268,275,281,15,B
\LOC 340,292\WID 280 DOTS\TEXT PLANE=1001
Save a rectangle with <F2>, then repostion the cursor and get the rectangle with <F5>.
\ROUNDS 1 SPEED 58\SHOW LOC=54,45 FRAMES=2,6 MOTION=24,0
\CALL WAITANDRET\TEXT PLANE=1101
After making the piston move down over 6 frames, make 6 more frames.  Just copy the original six frames...in reverse order to make the piston go up again!
\"
\LOC 340,292\WID 280 DOTS\TEXT PLANE=1111
\"
\"
\"
\"
\ROUNDS 1 SPEED 58\SHOW LOC=174,45 FRAMES=6,1 MOTION=-24,0
\"
\CLEAR SHOW\CALL WAITANDRET\TEXT PLANE=1101\LOC 60,98
Now draw the crankshaft and piston rod.  Each position is different and needs to be drawn separately.  The crankshaft makes two complete revolutions during our 24 frame animation.
\"
\DRAW J275,309C14E8G8F8H8R86\LOC 368,300\TEXT PLANE=1100\DISPLA "PISTON ROD"
\DRAW J285,328E8G8F8H8R76\LOC 368,320\DISPLAY "CRANKSHAFT"
\READ SMALLPST.PIC\ROUNDS 1 SPEED 58\SHOW LOC=54,45 FRAMES=2,12 MOTION=24,0
\CALL WAITANDRET\TEXT PLANE=1101
\LOC 60,98
With half the frames partially finished, make 12 more frames.  The crankshaft, piston, and piston rod will be in the same positions as in the first 12, so you can just copy those frames.
\ROUNDS 1 SPEED 58\SHOW LOC=54,45 FRAMES=2,24 MOTION=24,0
\CALL WAITANDRET\TEXT PLANE=1101
The main part of this animation is now complete.  You will need to draw the movement of the valves, and the air and fuel mixture and the exhaust to complete the image.
\"
\BLANK 278,264,515,350\READ FRSTPIST.PIC\SHOW 220,240,2
\DRAW J 318,255C14E8G8F8H8R76\LOC 400,245\TEXT PLANE=1100\DISPLAY "AIR & FUEL"\LOC 410,265\DISPLAY "GOES IN HERE"
\DRAW J205,255H8F8G8E8L20D30\LOC 150,285\DISPLAY "EXHAUST"\LOC 150,305\DISPLAY " COMES"\LOC 150,325\DISLAY "  OUT"\LOC 158,345\DISPLAY " HERE"
\DRAW J251,240H8F8E8G8U17R16D17H8F8E8G8U17R76\LOC 350,215\DISPLAY "VALVES"
\LOCATE 310,288\WIDTH 320 DOTS\TEXT PLANE=1011
The positions of the valves, fuel and exhaust, as well as the moment of explosion need to be hand-drawn for the actual stages of the 4-cycle piston engine.
\CALL WAITANDRET\TEXT PLANE=1101
\BLANK 147,213,630,428\BLANK 48,97,610,182\CLEAR SHOW\ROUNDS 1000 SPEED 30\BLANK 100,16,600,40
\READ LEARNIT3.TXT
\X ENDITALL\READ (#9301)\END
\X WAITANDRET\LOC 60,450\WID 520 DOTS CENTERED\TEXT PLANE=0100\WAIT NOW 211
Press <RETURN> to continue...
\WAIT NOW -1\BLANK 6,450,634,474\LOC 60,98\RETURN

