next up previous contents index
Next: 3.8.1.2 Vectors Up: Basic constructions Previous: Basic constructions   Contents   Index


3.8.1.1 Points

Points are defined using the command point :


 - funct -> point A


creates a point whose name is A. The default coordinates of this point are (0,0). The command coord can then be used to change them :


 - funct -> coord A 2.2 3.1


will change the coordinates to (2.2,3.1). The numerical parameters can be expressions understood by the expression evaluator of the command interpreter. For example

 - funct -> coord A x+sin(t) 3*y

The command show is used to print the coordinates of a point :


 - funct -> show A


will print something like


x = 2.2
y = 3.1


and the variables point_x and point_y will contain the coordinates of the point. They can be used in arguments of subsequent commands. For example


 - funct -> point B
 - funct -> coord B point_x+1 point_y-1


Point can be drawn on graphics using the command draw :


 - funct -> draw A X F


will draw the point A on an X window with respect to the frame F (cf. 3.5.3). This command is mainly used to start drawing a segment :


 - funct -> draw_to B X F


will draw the segment from A to B, and B will be the beginning of another segment, if any.

Several commands involving other types of geometric objects can determine the coordinates of points, for example one of these compute the intersection of two lines. In this case the points must have been defined previously, the command will only compute their coordinates.


next up previous contents index
Next: 3.8.1.2 Vectors Up: Basic constructions Previous: Basic constructions   Contents   Index
2009-11-12