|
@@ -122,7 +122,7 @@ When you select the horizontal line figure in the interface, a horizontal line w
|
122
|
122
|
|---|----|----|
|
123
|
123
|
| ![](images/rowMajor01-small.png) | ![](images/rowMajor02-small.png) | ![](images/rowMajor03-small.png)|
|
124
|
124
|
|
125
|
|
-**Figure 2** - (a) A drawing with a white background with red dots. (b) When the user clicks on the horizontal line button (`RowMajorFill`) and clicks the cell shown, (c) a horizontal line that expands to the left and to the right of the cell clicked is drawn, until it finds a cell with a different color from the color of the background.
|
|
125
|
+**Figure 2.** (a) A drawing with a white background with red dots. (b) When the user clicks on the horizontal line button (`RowMajorFill`) and clicks the cell shown, (c) a horizontal line that expands to the left and to the right of the cell clicked is drawn, until it finds a cell with a different color from the color of the background.
|
126
|
126
|
|
127
|
127
|
|
128
|
128
|
##### `ColMajorFill`
|
|
@@ -135,7 +135,7 @@ This function should work similarly as the function `RowMajorFill` but for colum
|
135
|
135
|
|---|----|----|
|
136
|
136
|
| ![](images/colMajor01-small.png) | ![](images/colMajor02-small.png) | ![](images/colMajor03-small.png)|
|
137
|
137
|
|
138
|
|
-**Figure 3** - (a) A drawing with a white background and red dots (b) When the user clicks on the vertical line button (`ColMajorFill`) and clicks the cell shown, (c) a vertical line that expands to the left and to the right of the cell clicked is drawn, until it finds a cell with a different color from the color of the background.
|
|
138
|
+**Figure 3.** (a) A drawing with a white background and red dots (b) When the user clicks on the vertical line button (`ColMajorFill`) and clicks the cell shown, (c) a vertical line that expands to the left and to the right of the cell clicked is drawn, until it finds a cell with a different color from the color of the background.
|
139
|
139
|
|
140
|
140
|
|
141
|
141
|
##### `DiagonalLeft`
|
|
@@ -148,7 +148,7 @@ This function should work similarly as the `RowMajorFill` function but produces
|
148
|
148
|
|---|----|----|
|
149
|
149
|
| ![](images/diagLeft00-small.png) | ![](images/diagLeft01-small.png) | ![](images/diagLeft02-small.png)|
|
150
|
150
|
|
151
|
|
-**Figure 4** - (a) A drawing with a white background and red dots. (b) When the user clicks on the left diagonal line button (`DiagonalLeft`) and clicks the cell shown, (c) a left diagonal line that expands towards the top to the left and towards the bottom to the right of the cell clicked is drawn, until it finds a cell with a different color from the color of the background.
|
|
151
|
+**Figure 4.** (a) A drawing with a white background and red dots. (b) When the user clicks on the left diagonal line button (`DiagonalLeft`) and clicks the cell shown, (c) a left diagonal line that expands towards the top to the left and towards the bottom to the right of the cell clicked is drawn, until it finds a cell with a different color from the color of the background.
|
152
|
152
|
|
153
|
153
|
|
154
|
154
|
|
|
@@ -178,7 +178,7 @@ For the squares, the easiest way to think of it is as if they were onions! A squ
|
178
|
178
|
|
179
|
179
|
![](images/squares.png)
|
180
|
180
|
|
181
|
|
-**Figure 6** - Squares of size 1 (green), 2 (red), 3 (blue), and 4 (yellow). In each case, the user clicked the center of the square.
|
|
181
|
+**Figure 6.** Squares of size 1 (green), 2 (red), 3 (blue), and 4 (yellow). In each case, the user clicked the center of the square.
|
182
|
182
|
|
183
|
183
|
#### 2b: Triangles
|
184
|
184
|
|
|
@@ -188,7 +188,7 @@ The triangle button produces an **isosceles** triangle as it is shown in Figure
|
188
|
188
|
![](images/triangles.png)
|
189
|
189
|
|
190
|
190
|
|
191
|
|
-**Figure 7** - Triangles of size 1 (green), 2 (red), 3 (blue), and 4 (yellow). In each case, the user clicked the center of the base of the triangle.
|
|
191
|
+**Figure 7.** Triangles of size 1 (green), 2 (red), 3 (blue), and 4 (yellow). In each case, the user clicked the center of the base of the triangle.
|
192
|
192
|
|
193
|
193
|
#### 2c: Circles
|
194
|
194
|
|
|
@@ -197,7 +197,7 @@ Congratulations! You got to the most difficult part: circles! Here you’ll need
|
197
|
197
|
|
198
|
198
|
![](images/circles.png)
|
199
|
199
|
|
200
|
|
-**Figure 8** - Circles of size 1 (green), 2 (red), 3 (blue), and 4 (yellow). In each case, the user clicked the center of the circle.
|
|
200
|
+**Figure 8.** Circles of size 1 (green), 2 (red), 3 (blue), and 4 (yellow). In each case, the user clicked the center of the circle.
|
201
|
201
|
|
202
|
202
|
**Help Producing Circles:**
|
203
|
203
|
|
|
@@ -248,7 +248,7 @@ Flood Fill (cells, target-color, replacement-color):
|
248
|
248
|
|
249
|
249
|
|
250
|
250
|
|
251
|
|
-**Figure 9** - (a) The original drawing with a white background and black cells. (b) A cell is selected and the algorithm is executed to fill the cell (1), (c) The cell is painted orange, then (d) invokes `flood-fill` on the left cell (2). (e) The cell 2 is painted orange, then (f) invokes `flood-fill` on the cell of the left (3). This cell is not the target-color (its black), and the function returns. (g) `flood-fill` is invoked on the cell on the right of cell 2, but that cell is already painted with the replacement-color. (h) `flood-fill` is invoked on the cell on top of the cell 2. (i) This cell is painted orange and (j) invokes `flood-fill` on the left cell (4). This cell is not the target-color, therefore the function returns (k), cell (3) invokes `flood-fill` on its right cell.
|
|
251
|
+**Figure 9.** (a) The original drawing with a white background and black cells. (b) A cell is selected and the algorithm is executed to fill the cell (1), (c) The cell is painted orange, then (d) invokes `flood-fill` on the left cell (2). (e) The cell 2 is painted orange, then (f) invokes `flood-fill` on the cell of the left (3). This cell is not the target-color (its black), and the function returns. (g) `flood-fill` is invoked on the cell on the right of cell 2, but that cell is already painted with the replacement-color. (h) `flood-fill` is invoked on the cell on top of the cell 2. (i) This cell is painted orange and (j) invokes `flood-fill` on the left cell (4). This cell is not the target-color, therefore the function returns (k), cell (3) invokes `flood-fill` on its right cell.
|
252
|
252
|
|
253
|
253
|
The function `flood-fill` is invoked and proves its functionality using various figures. You should assure that you proved open figures, for example, the following:
|
254
|
254
|
|
|
@@ -261,7 +261,7 @@ The function `flood-fill` is invoked and proves its functionality using various
|
261
|
261
|
|
262
|
262
|
## Deliverables
|
263
|
263
|
|
264
|
|
-Use "Deliverable" in Moodle to hand in the archive `tools.cpp` with the functions that you implemented in this laboratory experience. Remember to use good programming techniques, include the names of the programmers involved, and to document your program.
|
|
264
|
+Use "Deliverable" in Moodle to hand in the archive `tools.cpp` with the functions that you implemented in this laboratory experience. Remember to use good programming techniques, include the names of the programmers involved, and document your program.
|
265
|
265
|
|
266
|
266
|
---
|
267
|
267
|
|