Assignment 25 - Patterns
Example Output
Learning Outcomes
- 2D Arrays
- Loops
- Conditions
- Visualization
Goals
- Learn how to modify and display a ColorGrid using Bridges
- Learn how to set/change colors for each pixel in the grid
- Practice using simple loops to display patterns using the BRIDGES ColorGrid data structure
Description
ColorGrid
The BRIDGES ColorGrid class is an abstraction for representing 2D images.
It serves as a convenient way to display operations on images or other
two dimensional structures. A similar structure is used in the BRIDGES Game
API.
Assignement
- Use Bridges ColorGrid to display a simple pattern
- Call ColorGrid.set() method to set the color of a pixel in the grid
(the color is passed as a generic of the class to the method)
- Loop through the grid and set each pixel to match a pattern
Examples
- Checker board, display 2 colors in an alternating checker board pattern
or something thats interesting or relevant to you, your school's colors,
mascot, team.
- Frame, display a frame around the entire board with the center filled
- Quadrants, Cut the image in four quadrants of different colors
- Or make a customized pattern of your own
Extensions
Help
for C++
ColorGrid documentation
Color documentation
Bridges class documentation
for Java
ColorGrid documentation
Color documentation
Bridges class documentation
for Python
ColorGrid documentation
Color documentation
Bridges class documentation