Image expressions gallery

Below are some images to give you practice with using numerical expressions.

Your goal is to write code that draws each of images below in the the image-expressions environment. Pay attention to the descriptions of the position and size of the figures.

This page will explain each image separately but eventually you should produce the image at the bottom of this page with all the figures in it.

Centered circle

A filled blue circle centered horizontally and vertically in the drawing area with radius 50.

Red rectangle

A red rectangle whose width is half the width of the drawing area and whose height is 100, centered on the x-axis and whose top is 50 pixels from the top of the drawing area.

Connected circles

Two blue circles of radius 30. The first is 55 pixels to the right of the left side of the drawing area and 50 up from the bottom. The second is 70 pixels from the right side of the drawing area and 150 from the bottom. Their centers are connected by a black line.

Triangle in rectangle

A blue triangle inside the red rectangle. (Just the triangle shown here.) All three corners are 5 pixels in from the rectangle and the top of the triangle is in the middle of rectangle horizontally.

Everything

All the images together.