Lines are defined using the command line :
- funct -> line L
creates a line whose name is L. A line is defined by a point on it and a unit vector. The default parameters for a line are (0,0) for the point and (1,0) for the vector. The command coord can then be used to change them :
- funct -> coord L A U
will make A the origin of L and U divided by its length its unit vector. If U is zero the unit vector is not changed. Of course in the preceeding command A and U must have been previously defined.
The command show is used to print the coordinates of a line :
- funct -> show L
will print something like this
x = 1 y = -1 u = 0.4472135954999579 v = 0.8944271909999159
meaning that the origin of L is the point of coordinates (1,-1) and its unit
vector
(0.4472135954999579,0.8944271909999159). After this command the
variables line_p_x and line_p_y will contain the coordinates
of the origin of the line and line_v_x, line_v_y those of
its unit vector.
They can be used in arguments of subsequent commands.