Programming for Kids - ZedLX

The Easiest Way to Learn Computer Programming, for Free

Types point2D, vector2D and colorA [13/13]

This demonstrational program illustrates a vector with an arrow. This program is virtually identical to the previous one, except for the function DrawArrow.

While vectors cannot be drawn, an arrow can be used to represent a vector. However, vectors are not arrows since arrows have a beginning and an end, while a vector doesn't have such properties.

To draw the arrow, a function-procedure named DrawArrow was written. Functions and procedures are explained in the next two chapters. The remaining part of the program (the top half, above the comment) should be comprehensible.

Loading...