Programming Course for Beginners - ZedLX

The Easiest Online Computer Programming Course, for Free

Simple Graphics [14/14]

Run the program.

What happens when you change the second argument (the number 100) of the line function call? Try out values 400, 200, 0, and 500.

What happens when you change the fourth argument (i.e. the last argument) of the line function call? Try out various values in the range 0 - 700.

Simple Graphics - upside-down triangle task

Exercise 1:


Change the program so that the triangle of lines is displayed upside-down.

Solution

    line(x, 650, 450, 100);

Exercise 2:

Move the orange disc to the peak of the triangle.

Loading...