Page 43 - Learn to Program - Basic-256
P. 43
Chapter 2: Drawing Basic Shapes. Page 27
5
6 # draw back square
7 line 150, 150, 150, 250
8 line 150, 250, 250, 250
9 line 250, 250, 250, 150
10 line 250, 150, 150, 150
11
12 # draw front square
13 line 100, 100, 100, 200
14 line 100, 200, 200, 200
15 line 200, 200, 200, 100
16 line 200, 100, 100, 100
17
18 # connect the corners
19 line 100, 100, 150, 150
20 line 100, 200, 150, 250
21 line 200, 200, 250, 250
Program 13: Draw a Cube
Sample Output 13: Draw a Cube
© 2019 James M. Reneau (CC BY-NC-SA 3.0 US)

