1[call [arg number] [arg number]]
2
3[para][image figure-50-point-cons-absolute][para]
4
5This command takes the x and y coordinates of a location and returns
6the [term absolute] point for it.
7
8
9[call [cmd by] [arg distance] [arg direction]]
10
11[para][image figure-51-point-cons-relative][para]
12
13This command takes a [arg distance] and [arg direction] (angle in
14degress, or registered direction name) and returns the [term relative]
15point for it, i.e. the [term delta] or [term translation] it
16represents.
17
18[para]
19Note also the (dis)similarities to the directional specifications for
20the attribute [cmd then] of [cmd line] and [cmd move] elements.
21
22Where we say here
23[example {by 50 east}]
24for the attribute we say
25[example {... then east 50 ...}]
26or just
27[example {... then east ...}]
28
29
30[call [arg point1] [cmd +] [arg point2]]
31
32[para][image figure-48-point-vectoradd][para]
33
34This command interprets two points as vectors and adds them together.
35
36If at least one of the points is [term absolute] the result is
37absolute as well.
38
39The result is a [term relative] point if and only if both points are
40[term relative].
41
42
43[call [arg point1] [cmd -] [arg point2]]
44
45[para][image figure-49-point-vectorsub][para]
46
47This command interprets two points as vectors and subtracts the second
48from the first.
49
50If at least one of the points is [term absolute] the result is
51absolute as well.
52
53The result is a [term relative] point if and only if both points are
54[term relative].
55
56
57[call [arg point] [cmd by] [arg distance] [arg direction]]
58
59This command is a more convenient, or at least shorter, form of
60
61[example {
62    [$point + [by $distance $direction]]
63}]
64
65
66[call [arg point1] [cmd |] [arg point2]]
67
68[para][image figure-31-point-projection][para]
69
70This command calculates the [term projection] of two points, i.e. the
71result is the point having the x-coordinate of [arg point1] and the
72y-coordinate of [arg point2].
73
74
75[call [arg n] [cmd between] [arg poin1] [arg point2]]
76
77[para][image figure-29-point-interpolation-1][para]
78
79This command computes the point which is [arg n]*100 percent of the
80way between [arg point1] and [arg point2], and returns it as its
81result.
82
83This means that for
84[list_begin definitions]
85[def "[arg n] == 0"] The result is [arg point1].
86[def "[arg n] == 1"] The result is [arg point2].
87[def "[arg n] == 0.5"] The result is half way between the two points.
88[list_end]
89etc.
90
91[emph Note] that it is allowed to use values < 0 and > 1 for [arg n]
92
93
94[call [cmd intersect] [arg elem1] [arg elem2]]
95
96[para][image figure-32-point-intersection][para]
97
98This command takes two [term open] elements, computes the lines going
99through their "start"- and "end"-corners, and returns the point where
100these two lines intersect.
101
102The command throws an error if the lines do not intersect, or are
103coincident.
104