Today we learned about drawing shapes on a canvas. First, we created a canvas using the design tab and dragging it onto the screen. Then we added built-in shapes like rectangles and circles and learned how to give them a specific color.
Later, we used lines to draw other shapes like octagons. After drawing an octagon in one place, we looked at the math formulas behind an octagon and how to figure out the formula for making shapes. Then we used these formulas to make a function that would draw an octagon anywhere we choose with any width and height we choose.
After making the octagon, we discovered that we cannot just tell it to fill in. Instead we have to fill the octagon in by drawing a lot of smaller octagons inside it. Then we can select the color by setting the stroke color. We found that this isn’t perfect (it makes little triangle lines within the octagon), but it’s better than not having any colors inside our custom shapes.