Capturing real-world objects
We could easily recognize objects from Pitstop's artwork. We understood that each pattern is composed of many 2D geometric shapes and we recognized the different shapes that she used in all the examples we analyzed. Now, let's focus on one of the core requirements for the Web Service, which is calculating the required amounts of acrylic paint to produce the artwork. We must take into account the following data for each 2D shape included in the pattern in order to calculate the required materials and the amount of acrylic paint to produce each shape:
- The line color
- The perimeter
- The fill color
- The area
It is possible to use a specific color for the line that draws the borders of each shape, and therefore, we have to calculate the perimeter to use it as one of the values that will allow us to estimate the amount of acrylic paint that the user must buy to paint the border of each 2D shape. Then, we have to calculate the area to use it as one of the values...