Single vector in 3D view

With every activation of the random vector button a vector arrow with random orientation is generated. Starting at the origin, its endpoint has random integer coordinates x,y,z. They are displayed in three editable number fields. There the coordinates may be changed to any rational number. An alternative one can draw the arrowhead in 2 dimensions with the mouse.

The range of the coordinate system is ∓ 5. A transparent coordinate mesh forms the background of the vector. The code for the generation of coordinate x is

x = integer(10*random( ) - 5).

A button with/no xyz projections shows or hides projections of the arrow onto the coordinate planes.

Five different radio buttons view select among a number of different distinct projections. Of them the 2D projections are especially suited to directly read the coordinates in the drawing frame.

The 3D frame can be rotated by drawing with the mouse, zoomed by drawing while the Shift key is pressed, and shifted by drawing while the Strg key is pressed.