aboutsummaryrefslogtreecommitdiff
path: root/pkg/lists/doc/Lintran.spc.hlp
blob: 9dd5ff988423f39641418a6a2a05352c299d665f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
.help lintran Mar84 lists

.nf
List Operator LINTRAN

    Performs a linear translation on each element of the input list,
producing a transformed list as output.

	lintran (list)

An input line may contain a variable number of fields.  Two fields of each
input line are designated as the x and y coordinates (default cols 1,2).
All other fields are to be preserved across the transformation.  Lines which
begin with a sharp ("#") are considered comment lines and are passed on to
the output unmodified, as are blank lines.  If either if x or y are indefinite
and a pure translation or scale change is being performed, the corresponding
output coordinate will be indefinite.  If either input coordinate is indefinite
and a rotation is being performed, both output coordinates will be indefinite.


Parameters:

	list
	    List or lists to be transformed (template).

	xcol = 1, ycol = 2
	    Columns containing the x and y coordinates.

	x1 = 0.0, y1 = 0.0
	    Current origin.

	xscale = 1.0, yscale = 1.0
	    Scale factor to be applied to the input coordinates, relative
	    to the current origin [x0,y0].

	angle = 0.0
	    Rotation angle about the origin [x0,y0].

	x2 = 0.0, y2 = 0.0
	    New origin; applied after scaling and rotating the input coords.


Examples:

	Shift a coordinate list from the default origin [0,0] to the origin
	[10.5,30], saving the result in the file "newlist":

		lintran list, x2=10.5, y2=30, > newlist

	Apply a shift of +3.4 units in x, -1.3 units in y to the input list
	read from the standard input, writing the output list on the standard
	output:

		(list stream) | lintran x2=3.4, y=-1.3

	Take x and y from columns 2 and 3, rotate 45 degrees:

		lintran list, xcol=2, ycol=3, angle=45
.fi
.endhelp