mathgl 0.0.5 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,215 +0,0 @@
1
- # This document is converted from other_en.texi.
2
-
3
- # module MathGL
4
- module MathGL
5
-
6
- # MglColor class
7
- class MglColor
8
-
9
- # Sets color from values of Red, Green, Blue and Alpha channels. These values should be in interval (0,1).
10
- #
11
- # @overload set(r,g,b,a=1)
12
- # @param [Float] r
13
- # @param [Float] g
14
- # @param [Float] b
15
- # @param [Float] a default=1
16
- # @return [nil]
17
- def set
18
- end
19
-
20
-
21
- # Sets color as ``lighted'' version of color c.
22
- #
23
- # @overload set(c,bright=1)
24
- # @param [MglColor] c
25
- # @param [Float] bright default=1
26
- # @return [nil]
27
- def set
28
- end
29
-
30
-
31
- # Sets color from symbolic id.
32
- #
33
- # @overload set(p,bright=1)
34
- # @param [String] p
35
- # @param [Float] bright default=1
36
- # @return [nil]
37
- def set
38
- end
39
-
40
-
41
- # Checks correctness of the color.
42
- #
43
- # @overload valid()
44
- # @return [bool]
45
- def valid
46
- end
47
-
48
-
49
- # Gets maximal of spectral component.
50
- #
51
- # @overload norm()
52
- # @return [Float]
53
- def norm
54
- end
55
-
56
-
57
- # Adds colors by its RGB values.
58
- #
59
- # @overload +(b)
60
- # @param [MglColor] b
61
- # @return [MglColor]
62
- def +
63
- end
64
-
65
-
66
- # Subtracts colors by its RGB values.
67
- #
68
- # @overload -(b)
69
- # @param [MglColor] b
70
- # @return [MglColor]
71
- def -
72
- end
73
-
74
-
75
- # Multiplies color by number.
76
- #
77
- # @overload *(b)
78
- # @param [Float] b
79
- # @return [MglColor]
80
- def *
81
- end
82
-
83
-
84
- # Divide color by number.
85
- #
86
- # @overload /(b)
87
- # @param [Float] b
88
- # @return [MglColor]
89
- def /
90
- end
91
-
92
-
93
- end # MglColor
94
-
95
-
96
- # MglPoint class
97
- class MglPoint
98
-
99
- # Returns true if point contain NAN values.
100
- #
101
- # @overload is_nan()
102
- # @return [bool]
103
- def is_nan
104
- end
105
-
106
-
107
- # Returns the norm \sqrt(x^2+y^2+z^2) of vector.
108
- #
109
- # @overload norm()
110
- # @return [Float]
111
- def norm
112
- end
113
-
114
-
115
- # Normalizes vector to be unit vector.
116
- #
117
- # @overload normalize()
118
- # @return [nil]
119
- def normalize
120
- end
121
-
122
-
123
- # Returns point component: x for i=0, y for i=1, z for i=2, c for i=3.
124
- #
125
- # @overload val(i)
126
- # @param [Integer] i
127
- # @return [Float]
128
- def val
129
- end
130
-
131
-
132
- # Point of summation (summation of vectors).
133
- #
134
- # @overload +(b)
135
- # @param [MglPoint] b
136
- # @return [MglPoint]
137
- def +
138
- end
139
-
140
-
141
- # Point of difference (difference of vectors).
142
- #
143
- # @overload -(b)
144
- # @param [MglPoint] b
145
- # @return [MglPoint]
146
- def -
147
- end
148
-
149
-
150
- # Multiplies (scale) points by number.
151
- #
152
- # @overload *(b)
153
- # @param [Float] b
154
- # @return [MglPoint]
155
- def *
156
- end
157
-
158
-
159
- # Multiplies (scale) points by number 1/b.
160
- #
161
- # @overload /(b)
162
- # @param [Float] b
163
- # @return [MglPoint]
164
- def /
165
- end
166
-
167
-
168
- # Scalar product of vectors.
169
- #
170
- # @overload *(b)
171
- # @param [MglPoint] b
172
- # @return [MglPoint]
173
- def *
174
- end
175
-
176
-
177
- # Return vector of element-by-element product.
178
- #
179
- # @overload /(b)
180
- # @param [MglPoint] b
181
- # @return [MglPoint]
182
- def /
183
- end
184
-
185
-
186
- # Cross-product of vectors.
187
- #
188
- # @overload ^(b)
189
- # @param [MglPoint] b
190
- # @return [MglPoint]
191
- def ^
192
- end
193
-
194
-
195
- # The part of a which is perpendicular to vector b.
196
- #
197
- # @overload &(b)
198
- # @param [MglPoint] b
199
- # @return [MglPoint]
200
- def &
201
- end
202
-
203
-
204
- # The part of a which is parallel to vector b.
205
- #
206
- # @overload |(b)
207
- # @param [MglPoint] b
208
- # @return [MglPoint]
209
- def |
210
- end
211
-
212
-
213
- end # MglPoint
214
-
215
- end
@@ -1,175 +0,0 @@
1
- # This document is converted from parse_en.texi.
2
-
3
- # module MathGL
4
- module MathGL
5
-
6
- # MglParse class
7
- class MglParse
8
-
9
- # Main function in the class. Function parse and execute line-by-line MGL script in array text. Lines are separated by newline symbol '\n' as usual.
10
- #
11
- # @overload execute(gr,text)
12
- # @param [MglGraph] gr
13
- # @param [String] text
14
- # @return [nil]
15
- def execute
16
- end
17
-
18
-
19
- # The same as previous but read script from the file fp. If print=true then all warnings and information will be printed in stdout.
20
- #
21
- # @overload execute(gr,fp,print=false)
22
- # @param [MglGraph] gr
23
- # @param [FILE] fp
24
- # @param [bool] print default=false
25
- # @return [nil]
26
- def execute
27
- end
28
-
29
-
30
- # Function parses the string str and executes it by using gr as a graphics plotter. Returns the value depending on an error presence in the string str: 0 -- no error, 1 -- wrong command argument(s), 2 -- unknown command, 3 -- string is too long. Optional argument pos allows to save the string position in the document (or file) for using for|next command.
31
- #
32
- # @overload parse(gr,str,pos=0)
33
- # @param [MglGraph] gr
34
- # @param [String] str
35
- # @param [long] pos default=0
36
- # @return [Integer]
37
- def parse
38
- end
39
-
40
-
41
- # Function parses the string formula and return resulting data array. In difference to AddVar() or FindVar(), it is usual data array which should be deleted after usage.
42
- #
43
- # @overload calc(formula)
44
- # @param [String] formula
45
- # @return [MglData]
46
- def calc
47
- end
48
-
49
-
50
- # Function set the value of n-th parameter as string str (n=0, 1 ... 'z'-'a'+10). String str shouldn't contain '$' symbol.
51
- #
52
- # @overload add_param(n,str)
53
- # @param [Integer] n
54
- # @param [String] str
55
- # @return [nil]
56
- def add_param
57
- end
58
-
59
-
60
- # Function returns the pointer to variable with name name or zero if variable is absent. Use this function to put external data array to the script or get the data from the script. You must not delete obtained data arrays!
61
- #
62
- # @overload find_var(name)
63
- # @param [String] name
64
- # @return [MglVar]
65
- def find_var
66
- end
67
-
68
-
69
- # Function returns the pointer to variable with name name. If variable is absent then new variable is created with name name. Use this function to put external data array to the script or get the data from the script. You must not delete obtained data arrays!
70
- #
71
- # @overload add_var(name)
72
- # @param [String] name
73
- # @return [MglVar]
74
- def add_var
75
- end
76
-
77
-
78
- # Function delete the variable specified by its name or by its pointer.
79
- #
80
- # @overload delete_var(name)
81
- # @param [String] name
82
- # @return [nil]
83
- def delete_var
84
- end
85
-
86
-
87
- # Function delete all variables in this parser.
88
- #
89
- # @overload delete_all()
90
- # @return [nil]
91
- def delete_all
92
- end
93
-
94
-
95
- # Restore Once flag.
96
- #
97
- # @overload restore_once()
98
- # @return [nil]
99
- def restore_once
100
- end
101
-
102
-
103
- # Allow to parse 'setsize' command or not.
104
- #
105
- # @overload allow_set_size(a)
106
- # @param [bool] a
107
- # @return [nil]
108
- def allow_set_size
109
- end
110
-
111
-
112
- # Allow reading/saving files or not.
113
- #
114
- # @overload allow_file_io(a)
115
- # @param [bool] a
116
- # @return [nil]
117
- def allow_file_io
118
- end
119
-
120
-
121
- # Sends stop signal which terminate execution at next command.
122
- #
123
- # @overload stop()
124
- # @return [nil]
125
- def stop
126
- end
127
-
128
-
129
- # Return the number of registered MGL commands.
130
- #
131
- # @overload get_cmd_num()
132
- # @return [long]
133
- def get_cmd_num
134
- end
135
-
136
-
137
- # Return the name of command with given id.
138
- #
139
- # @overload get_cmd_name(id)
140
- # @param [long] id
141
- # @return [String]
142
- def get_cmd_name
143
- end
144
-
145
-
146
- # Return the type of MGL command name. Type of commands are: 0 -- not the command, 1 - data plot, 2 - other plot, 3 - setup, 4 - data handle, 5 - data create, 6 - subplot, 7 - program, 8 - 1d plot, 9 - 2d plot, 10 - 3d plot, 11 - dd plot, 12 - vector plot, 13 - axis, 14 - primitives, 15 - axis setup, 16 - text/legend, 17 - data transform.
147
- #
148
- # @overload cmd_type(name)
149
- # @param [String] name
150
- # @return [Integer]
151
- def cmd_type
152
- end
153
-
154
-
155
- # Return the format of arguments for MGL command name.
156
- #
157
- # @overload cmd_format(name)
158
- # @param [String] name
159
- # @return [String]
160
- def cmd_format
161
- end
162
-
163
-
164
- # Return the description of MGL command name.
165
- #
166
- # @overload cmd_desc(name)
167
- # @param [String] name
168
- # @return [String]
169
- def cmd_desc
170
- end
171
-
172
-
173
- end # MglParse
174
-
175
- end
@@ -1,38 +0,0 @@
1
- module MathGL
2
-
3
- # QT Window class
4
- class MglQT
5
- # Constructor for MglQT. Drawing block must be provided.
6
- # If the number of block argument is one, the argument is an MglGraph object.
7
- # If the number of block argument is zero, the block is executed in the context of an MglGraph object.
8
- def initialize(&block)
9
- end
10
-
11
- # Start MglQT window.
12
- def run
13
- end
14
- end
15
-
16
- # FLTK Window class
17
- class MglFLTK
18
- # Constructor for MglFLTK. Drawing block must be provided.
19
- # If the number of block argument is one, the argument is an MglGraph object.
20
- # If the number of block argument is zero, the block is executed in the context of an MglGraph object.
21
- def initialize(&block)
22
- end
23
-
24
- # Start MglFLTK window.
25
- def run
26
- end
27
- end
28
-
29
- # GLUT Window class
30
- class MglGLUT
31
- # Constructor for MglGLUT. Drawing block must be provided.
32
- # If the number of block argument is one, the argument is an MglGraph object.
33
- # If the number of block argument is zero, the block is executed in the context of an MglGraph object.
34
- def initialize(&block)
35
- end
36
- end
37
-
38
- end