Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

COMP 1010

Fall Lab 1
Material Covered
• Basic drawing commands: size, line, rect, ellipse, background, stroke, fill

Notes:
• Each lab is scored out of 2 points. Each completed lab exercise is worth 1 point. You must
complete two to receive full marks on the lab.
• Your completed lab must be submitted before the deadline to the “Lab 1” submission folder. For
the Bronze exercise, take a photo or scan of your sketch and submit a jpg, png, or pdf file. For the
Silver and Gold exercises, submit your Processing code (pde file).
• You must have completed the Honesty Declaration (available under Assessments and then
Checklists) before the submission folder will be visible (under Assessments and then
Assignments).

On paper, sketch a 500x500 pixel Processing canvas. Design a scene that includes at least:
• one line,
• one rectangle,
• one ellipse, and
• one triangle.
Be creative in your drawing but don’t make it too complex because you need to code it in the next
exercise. For this exercise, use the default drawing colours to make a black & white drawing where
all shapes have a black outline and white fill. Some ideas: A snowman with a hat made from
rectangles and a carrot nose made with a triangle. A fish with a triangular tail and circle for an eye.
An ice cream cone with a cherry on top.
On your sketch, write the coordinates of the ends of all lines, the corners of all rectangles and
triangles, and the centre of all ellipses. These are coordinates, locations on your canvas.
Also add the length, width, and height (in pixels) of all shapes to your sketch. These are dimensions,
sizes for the shapes.
Think about the order you need to code your drawing. Which shape needs to be drawn first? last?
Make a list with the order that the shapes should be drawn.

Write a Processing program that will draw the scene that you designed in the Bronze exercise. Pay
attention to the order of the drawing commands.
Add colour to your sketch. Change the colour for the outline of the shapes, as well as the fill colour.
Your final program should use at least two shades of grey, and at least two RGB colours.

You might also like