summaryrefslogtreecommitdiffhomepage
path: root/digital/beacon/triangle/doc/triangle.plot
blob: 2248aa08270754b7ff35e2eb4290af6aa54d62bf (plain)
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
set xrange [0:3000]
set yrange [0:2100]
dist (x0, y0, x1, y1) = sqrt ((x0 - x1) ** 2 + (y0 - y1) ** 2)
dot (x0, y0, x1, y1) = x0 * x1 + y0 * y1
angle (x, y, x0, y0, x1, y1) = acos (dot (x0 - x, y0 - y, x1 - x, y1 - y) / (dist (x, y, x0, y0) * dist (x, y, x1, y1)))
angle_b12 (x, y) = angle (x, y, 3000.0, 0.0, 3000.0, 2100.0)
angle_b23 (x, y) = angle (x, y, 3000, 0, 0, 1050)
angle_b31 (x, y) = angle (x, y, 3000, 2100, 0, 1050)

set isosamples 50
set angles degrees
set contour
set cntrparam levels incremental 0, 10, 180

set term png
set output 'triangle_surf12.png'
splot angle_b12 (x, y)
set output 'triangle_surf23.png'
splot angle_b23 (x, y)
set output 'triangle_surf31.png'
splot angle_b31 (x, y)

set contour
set cntrparam levels incremental 0, 1, 180
unset surface
set view map
unset clabel

set output 'triangle_contour12.png'
splot angle_b12 (x, y)
set output 'triangle_contour23.png'
splot angle_b23 (x, y)
set output 'triangle_contour31.png'
splot angle_b31 (x, y)
set output 'triangle_contour123.png'
splot angle_b12 (x, y), angle_b23 (x, y), angle_b31 (x, y)
set cntrparam levels incremental 0, 3, 180
set output 'triangle_contour123-3deg.png'
splot angle_b12 (x, y), angle_b23 (x, y), angle_b31 (x, y)
set cntrparam levels incremental 0, 1, 180

set size square
set xrange [0:100]
set yrange [0:100]
set output 'triangle_zoom+0+0.png'
splot angle_b12 (x, y), angle_b23 (x, y), angle_b31 (x, y)
set xrange [0:100]
set yrange [1000:1100]
set output 'triangle_zoom+0+1050.png'
splot angle_b12 (x, y), angle_b23 (x, y), angle_b31 (x, y)
set xrange [2900:3000]
set yrange [2000:2100]
set output 'triangle_zoom+3000+2100.png'
splot angle_b12 (x, y), angle_b23 (x, y), angle_b31 (x, y)
set xrange [1450:1550]
set yrange [1000:1100]
set output 'triangle_zoom+1500+1050.png'
splot angle_b12 (x, y), angle_b23 (x, y), angle_b31 (x, y)