File: cartesian.geg

package info (click to toggle)
geg 2.0.9-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 1,532 kB
  • sloc: ansic: 5,756; sh: 1,269; makefile: 123; xml: 70
file content (104 lines) | stat: -rw-r--r-- 2,297 bytes parent folder | download | duplicates (3)
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# geg data file
# all options can be changed within geg

toolbar = pictures_and_text
tooltips = on
print_as = pdf

xmin = -8.196161
xmax = 8.196161
ymin = -6.147121
ymax = 6.147121
tmin = 0.000000
tmax = 1.000000
amin = 0.000000
amax = 6.283185

graph_width = 1024
graph_height = 768
axes_lw = 0.4
grid_lw = 0.3
box_lw = 0.4
curves_lw = 0.5
point_radius = 1
coordinates_type = decimal
mode_type = cartesian
zoom_xy = 3

zoom_factor = 0.100000
notch_spacing = 45
minimum_resolution = 0.000100
maximum_resolution = 10000.000000
interpolation_factor = 4
maximum_formulas = 500

do_Ox = 1
do_Oy = 1
do_xval = 1
do_yval = 1
do_color = 1
do_box = 0

# positions: 0=top left, 1=top right, 2=bottom left, 3=bottom right 
text_position = 2
formula_size = 20
number_size = 12

utility_editor = emacs
utility_eps_viewer = evince
utility_pdf_viewer = evince
utility_eps_to_pdf = ps2pdf -dEPSCrop -dPDFSETTINGS=/prepress
utility_svg_viewer = inkscape
utility_eps_to_svg = eps2svg

color[0] = { 1.000000, 1.000000, 1.000000 }
color[1] = { 0.500000, 0.600000, 0.700000 }
color[2] = { 0.800000, 0.700000, 0.600000 }
color[3] = { 0.800000, 0.800000, 0.800000 }
color[4] = { 0.200000, 0.800000, 0.400000 }
color[5] = { 0.500000, 0.500000, 0.500000 }
color[6] = { 0.000000, 0.000000, 0.000000 }
color[7] = { 0.800000, 0.000000, 0.000000 }
color[8] = { 0.000000, 0.000000, 0.800000 }
color[9] = { 0.000000, 0.800000, 0.000000 }
color[10] = { 0.800000, 0.800000, 0.000000 }
color[11] = { 0.800000, 0.000000, 0.800000 }
color[12] = { 0.000000, 0.800000, 0.800000 }
color[13] = { 0.400000, 0.400000, 0.400000 }
color[14] = { 0.000000, 0.000000, 0.000000 }

end_parameters

# Formulas
# color unspecified, using geg's global settings
# draw basic functions of 1 variable in cartesian mode:
&cart
sin(x)
cotan(x)

# introduce derivative of cotan
&fa=cotan'

# changing linewidth
&lw=1.3

# draw fa=cotan' restricted to [0 ; pi] = { x*(pi-x) > 0 }
fa(x)*cut(x*(pi-x))

# readjusting linewidth
&lw=0.5

# define ft(.) to be the affine linear function
# that is tangent to the cotan(.) function at point c:
&ft=tgt_c_cotan

# adjusting color and size of tangents:
&color=240200180
&tgt_left=0.04;tgt_right=0.04

# now, draw tangents and change size for the second one:
c=2.5;ft(x)
&tgt_left=0.06;tgt_right=0.19
c=4.1;ft(x)