Programming Course for Beginners - ZedLX

The Easiest Online Computer Programming Course, for Free

Computer Graphics Exercises [5/9]

[Run the program]

Exercise:

Exercise 4 output image

Make another line of discs, but this time on the other diagonal of the screen. The screen is 960 pixels wide.

Hint 1

The only thing that needs changing is the first argument of the disc function call.

Hint 2

A subtraction operation needs to be used for calculating the coordinates, because subtraction can reverse a direction.

The solution is on the next slide.

Loading...