pimath 0.0.49 → 0.0.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/pi.js +626 -358
- package/dist/pi.js.map +1 -1
- package/dist/pi.min.js +1 -1
- package/dist/pi.min.js.map +1 -1
- package/docs/assets/highlight.css +78 -78
- package/docs/assets/icons.css +1043 -1043
- package/docs/assets/main.js +52 -52
- package/docs/assets/search.js +1 -1
- package/docs/assets/style.css +1413 -1388
- package/docs/classes/Logicalset.Logicalset-1.html +5 -0
- package/docs/classes/Polynom.Rational.html +4 -0
- package/docs/classes/Vector.Point.html +1 -0
- package/docs/classes/Vector.Vector-1.html +1 -0
- package/docs/classes/algebra_equation.Equation.html +26 -0
- package/docs/classes/algebra_linearSystem.LinearSystem.html +1 -0
- package/docs/classes/algebra_monom.Monom.html +114 -0
- package/docs/classes/algebra_polynom.Polynom.html +30 -0
- package/docs/classes/coefficients_fraction.Fraction.html +19 -0
- package/docs/classes/coefficients_nthroot.NthRoot.html +3 -0
- package/docs/classes/expressions_numexp.NumExp.html +1 -0
- package/docs/classes/expressions_polynomexp.PolynomExpFactor.html +1 -0
- package/docs/classes/expressions_polynomexp.PolynomExpProduct.html +1 -0
- package/docs/classes/geometry_circle.Circle.html +3 -0
- package/docs/classes/geometry_line.Line.html +3 -0
- package/docs/classes/geometry_triangle.Triangle.html +17 -0
- package/docs/classes/numeric.Numeric.html +14 -14
- package/docs/classes/shutingyard.Shutingyard.html +18 -18
- package/docs/enums/algebra_equation.PARTICULAR_SOLUTION.html +1 -0
- package/docs/enums/geometry_line.LinePropriety.html +1 -0
- package/docs/enums/shutingyard.ShutingyardMode.html +1 -1
- package/docs/enums/shutingyard.ShutingyardType.html +1 -1
- package/docs/index.html +11 -11
- package/docs/interfaces/algebra_equation.ISolution.html +3 -0
- package/docs/interfaces/geometry_triangle.remarquableLines.html +1 -0
- package/docs/modules/Logicalset.html +3 -0
- package/docs/modules/Polynom.html +3 -0
- package/docs/modules/Vector.html +3 -0
- package/docs/modules/algebra_equation.html +1 -0
- package/docs/modules/algebra_linearSystem.html +1 -0
- package/docs/modules/algebra_monom.html +1 -0
- package/docs/modules/algebra_polynom.html +1 -0
- package/docs/modules/coefficients_fraction.html +1 -0
- package/docs/modules/coefficients_nthroot.html +1 -0
- package/docs/modules/expressions_numexp.html +1 -0
- package/docs/modules/expressions_polynomexp.html +1 -0
- package/docs/modules/geometry_circle.html +1 -0
- package/docs/modules/geometry_line.html +1 -0
- package/docs/modules/geometry_triangle.html +1 -0
- package/docs/modules/numeric.html +1 -1
- package/docs/modules/shutingyard.html +1 -1
- package/docs/modules.html +1 -1
- package/esm/index.d.ts +2 -2
- package/esm/index.js +2 -2
- package/esm/maths/algebra/equation.d.ts +7 -2
- package/esm/maths/algebra/equation.js +62 -19
- package/esm/maths/algebra/equation.js.map +10 -1
- package/esm/maths/algebra/linearSystem.js +1 -1
- package/esm/maths/algebra/linearSystem.js.map +10 -1
- package/esm/maths/algebra/monom.js +2 -2
- package/esm/maths/algebra/monom.js.map +10 -1
- package/esm/maths/algebra/polynom.d.ts +5 -1
- package/esm/maths/algebra/polynom.js +157 -81
- package/esm/maths/algebra/polynom.js.map +1 -1
- package/esm/maths/algebra/rational.d.ts +16 -6
- package/esm/maths/algebra/rational.js +139 -30
- package/esm/maths/algebra/rational.js.map +10 -1
- package/esm/maths/coefficients/fraction.d.ts +3 -1
- package/esm/maths/coefficients/fraction.js +37 -5
- package/esm/maths/coefficients/fraction.js.map +1 -1
- package/esm/maths/coefficients/{nthroot.d.ts → nthRoot.d.ts} +5 -5
- package/esm/maths/coefficients/{nthroot.js → nthRoot.js} +5 -5
- package/esm/maths/coefficients/{nthroot.js.map → nthRoot.js.map} +1 -1
- package/esm/maths/expressions/polynomexp.bkp.js +2 -3
- package/esm/maths/expressions/polynomexp.bkp.js.map +10 -1
- package/esm/maths/expressions/polynomexp.js +3 -3
- package/esm/maths/expressions/polynomexp.js.map +10 -1
- package/esm/maths/geometry/line.js +8 -0
- package/esm/maths/geometry/line.js.map +1 -1
- package/esm/maths/geometry/point.js +1 -1
- package/esm/maths/geometry/point.js.map +10 -1
- package/esm/maths/randomization/random.js +5 -1
- package/esm/maths/randomization/random.js.map +10 -1
- package/package.json +11 -11
- package/public/index.html +234 -235
- package/src/index.ts +2 -2
- package/src/maths/algebra/equation.ts +68 -19
- package/src/maths/algebra/linearSystem.ts +1 -1
- package/src/maths/algebra/monom.ts +3 -4
- package/src/maths/algebra/polynom.ts +170 -87
- package/src/maths/algebra/rational.ts +243 -98
- package/src/maths/coefficients/fraction.ts +44 -6
- package/src/maths/coefficients/{nthroot.ts → nthRoot.ts} +5 -5
- package/src/maths/expressions/polynomexp.bkp.ts +1 -2
- package/src/maths/expressions/polynomexp.ts +2 -1
- package/src/maths/geometry/line.ts +0 -1
- package/src/maths/geometry/point.ts +1 -1
- package/tests/algebra/equation.test.ts +36 -0
- package/tests/algebra/monom.test.ts +2 -5
- package/tests/algebra/polynom.test.ts +7 -3
- package/tests/algebra/rationnal.test.ts +96 -0
- package/tests/coefficients/fraction.test.ts +43 -1
- package/tests/geometry/circle.test.ts +4 -2
- package/tests/polynomexp.test.ts +0 -3
- package/tsconfig.json +16 -5
- package/docs/classes/Algebra.Equation.html +0 -26
- package/docs/classes/algebra.LinearSystem.html +0 -1
- package/docs/classes/algebra.Logicalset.html +0 -5
- package/docs/classes/algebra.Monom.html +0 -114
- package/docs/classes/algebra.Polynom.html +0 -30
- package/docs/classes/algebra.PolynomExpFactor.html +0 -1
- package/docs/classes/algebra.PolynomExpProduct.html +0 -1
- package/docs/classes/algebra.Rational.html +0 -4
- package/docs/classes/coefficients.Fraction.html +0 -19
- package/docs/classes/coefficients.Nthroot.html +0 -3
- package/docs/classes/geometry.Circle.html +0 -3
- package/docs/classes/geometry.Line.html +0 -3
- package/docs/classes/geometry.Point.html +0 -1
- package/docs/classes/geometry.Triangle.html +0 -17
- package/docs/classes/geometry.Vector.html +0 -1
- package/docs/enums/geometry.LinePropriety.html +0 -1
- package/docs/interfaces/geometry.remarquableLines.html +0 -1
- package/docs/modules/Algebra.html +0 -1
- package/docs/modules/Random.html +0 -1
- package/docs/modules/coefficients.html +0 -1
- package/docs/modules/geometry.html +0 -1
- package/docs/modules/random.Random.html +0 -1
package/public/index.html
CHANGED
|
@@ -49,32 +49,31 @@
|
|
|
49
49
|
let triplets = []
|
|
50
50
|
let n = 9, v
|
|
51
51
|
|
|
52
|
-
for(let u = 2; u<=n; u++){
|
|
53
|
-
v = (
|
|
54
|
-
while(v < u){
|
|
55
|
-
if(Pi.Numeric.gcd(u, v)===1){
|
|
52
|
+
for (let u = 2; u <= n; u++) {
|
|
53
|
+
v = (u % 2 === 0) ? 1 : 2
|
|
54
|
+
while (v < u) {
|
|
55
|
+
if (Pi.Numeric.gcd(u, v) === 1) {
|
|
56
56
|
triplets.push([
|
|
57
57
|
u, v,
|
|
58
|
-
u**2-v**2,
|
|
59
|
-
2*u*v,
|
|
60
|
-
u**2+v**2
|
|
58
|
+
u ** 2 - v ** 2,
|
|
59
|
+
2 * u * v,
|
|
60
|
+
u ** 2 + v ** 2
|
|
61
61
|
])
|
|
62
62
|
}
|
|
63
|
-
|
|
63
|
+
v = v + 2
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
let target = 13
|
|
68
68
|
// Filtrer les triplets pour n'avoir que les valeurs 15.
|
|
69
|
-
triplets = triplets.filter(x=>x[x.length-1]===target)
|
|
70
|
-
|
|
69
|
+
triplets = triplets.filter(x => x[x.length - 1] === target)
|
|
71
70
|
|
|
72
71
|
|
|
73
72
|
// méthode inverse, à partir du triplet.
|
|
74
73
|
triplets = []
|
|
75
|
-
for(let u = 0; u <= target; u++){
|
|
76
|
-
for(let v = 0; v <=target; v++){
|
|
77
|
-
if(u**2+v**2===target**2){
|
|
74
|
+
for (let u = 0; u <= target; u++) {
|
|
75
|
+
for (let v = 0; v <= target; v++) {
|
|
76
|
+
if (u ** 2 + v ** 2 === target ** 2) {
|
|
78
77
|
triplets.push([u, v, target])
|
|
79
78
|
}
|
|
80
79
|
}
|
|
@@ -86,228 +85,228 @@
|
|
|
86
85
|
}
|
|
87
86
|
|
|
88
87
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
88
|
+
// Should be
|
|
89
|
+
function examplePolynomExpSimple() {
|
|
90
|
+
const F1 = new Pi.PolynomExpFactor('x^2-4x+7', -1),
|
|
91
|
+
F2 = new Pi.PolynomExpFactor('8x-16', 1),
|
|
92
|
+
PP = new Pi.PolynomExpProduct(F2, F1)
|
|
93
|
+
|
|
94
|
+
const D = F1.derivative()
|
|
95
|
+
D.reduce()
|
|
96
|
+
|
|
97
|
+
console.log(PP.integrate())
|
|
98
|
+
return {
|
|
99
|
+
d: katex.renderToString('\\left(' + F1.tex + '\\right)\'=' + D.tex),
|
|
100
|
+
i: katex.renderToString('\\displaystyle\\int\\ ' + PP.tex + '\\ \\text{d}x = ' + PP.integrate().tex)
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
function example() {
|
|
105
|
+
let P = new Pi.Polynom('3x^(2/3)-5x+5/3')
|
|
106
|
+
|
|
107
|
+
console.log(P.tex)
|
|
108
|
+
|
|
109
|
+
return {
|
|
110
|
+
tex: katex.renderToString(P.tex)
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// let ne = new Pi.NumExp('5/x*sin(x*x)')
|
|
115
|
+
// const expr2 = new Pi.NumExp('-3*x^2-5')
|
|
116
|
+
//
|
|
117
|
+
// console.log(expr2.evaluate({x: -2}))
|
|
118
|
+
//
|
|
119
|
+
//
|
|
120
|
+
// let ne = new Pi.NumExp('5/x*sqrt(x^2)')
|
|
121
|
+
//
|
|
122
|
+
// console.log(ne.rpn)
|
|
123
|
+
// console.log(ne.evaluate({x: 0}))
|
|
124
|
+
|
|
125
|
+
function dev() {
|
|
126
|
+
let output = []
|
|
127
|
+
|
|
128
|
+
ex1()
|
|
129
|
+
// ex1()
|
|
130
|
+
// console.log(ex1())
|
|
131
|
+
output = [
|
|
132
|
+
'\\text{exercice 1}',
|
|
133
|
+
...ex1(),
|
|
134
|
+
'--------------',
|
|
135
|
+
'\\text{exercice 2}',
|
|
136
|
+
...ex2(),
|
|
137
|
+
'--------------',
|
|
138
|
+
'\\text{exercice 3}',
|
|
139
|
+
...ex3(),
|
|
140
|
+
'--------------',
|
|
141
|
+
'\\text{exercice 4}',
|
|
142
|
+
...ex4()]
|
|
143
|
+
|
|
144
|
+
// console.log(ex1())
|
|
145
|
+
return {
|
|
146
|
+
output
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
function ex1() {
|
|
151
|
+
// EXERCICE 1
|
|
152
|
+
let cart = [
|
|
153
|
+
'A',
|
|
154
|
+
'x^2-10x+y^2-8y+37=0',
|
|
155
|
+
'x^2-4x+y^2+6y+20=0',
|
|
156
|
+
'3x^2+3y^2+18y+3=0',
|
|
157
|
+
'4x^2-16x+8y^2-16y-10=0',
|
|
158
|
+
'B',
|
|
159
|
+
'x^2+10x+y^2-8y+32=0',
|
|
160
|
+
'5x^2+5y^2+80y+45=0',
|
|
161
|
+
'3x^2-9x+5y^2-10y+45=0',
|
|
162
|
+
'x^2-8x+y^2+4x+36=0'
|
|
163
|
+
], C, texData = []
|
|
164
|
+
|
|
165
|
+
for (let equ of cart) {
|
|
166
|
+
if (equ.length === 1) {
|
|
167
|
+
texData.push(`\\text{série ${equ}}`)
|
|
168
|
+
continue
|
|
169
|
+
}
|
|
170
|
+
C = new Pi.Geometry.Circle(equ)
|
|
171
|
+
if (C.exists) {
|
|
172
|
+
texData.push(equ + '\\implies ' + C.tex + '\\implies C' + C.center.tex + ',\\ r=' + C.radius.tex)
|
|
173
|
+
} else {
|
|
174
|
+
texData.push(equ + '\\implies' + '\\text{pas un cercle}')
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
return texData
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
function ex2() {
|
|
182
|
+
let Center1 = new Pi.Geometry.Point(4, -2),
|
|
183
|
+
C1 = new Pi.Geometry.Circle(Center1, 10, true),
|
|
184
|
+
droites1 = [
|
|
185
|
+
'x+3y-8=0',
|
|
186
|
+
'x-6y+6=0',
|
|
187
|
+
'2x+y-1=0',
|
|
188
|
+
'3x-4y-36=0'
|
|
189
|
+
],
|
|
190
|
+
Center2 = new Pi.Geometry.Point(8, 6),
|
|
191
|
+
C2 = new Pi.Geometry.Circle(
|
|
192
|
+
Center2,
|
|
193
|
+
40,
|
|
194
|
+
true),
|
|
195
|
+
droites2 = [
|
|
196
|
+
'x-3y+30=0',
|
|
197
|
+
'4x+11y-22=0',
|
|
198
|
+
'3x-y+8=0',
|
|
199
|
+
'2x+y-32=0'
|
|
200
|
+
],
|
|
201
|
+
d, pr, out = []
|
|
202
|
+
|
|
203
|
+
out.push('\\text{série A}')
|
|
204
|
+
out.push('(\\Gamma_1):' + C1.tex)
|
|
205
|
+
for (let equ of droites1) {
|
|
206
|
+
d = new Pi.Geometry.Line(equ)
|
|
207
|
+
pr = C1.relativePosition(d)
|
|
208
|
+
|
|
209
|
+
if (pr === 0) {
|
|
210
|
+
out.push(d.tex.canonical + '\\implies \\delta = ' + d.distanceTo(C1.center).tex + '\\implies \\text{externe}\\ ')
|
|
211
|
+
} else if (pr === 1) {
|
|
212
|
+
out.push(d.tex.canonical + '\\implies \\text{tangent: }' + C1.lineIntersection(d)[0].tex)
|
|
213
|
+
} else {
|
|
214
|
+
out.push(d.tex.canonical + '\\implies \\delta = ' + d.distanceTo(C1.center).tex + '\\implies \\text{sécant:}\\ ' + C1.lineIntersection(d).map(x => x.tex).join('\\quad'))
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
out.push('\\text{série B}')
|
|
219
|
+
out.push('(\\Gamma_2):' + C2.tex)
|
|
220
|
+
for (let equ of droites2) {
|
|
221
|
+
d = new Pi.Geometry.Line(equ)
|
|
222
|
+
pr = C2.relativePosition(d)
|
|
223
|
+
if (pr === 0) {
|
|
224
|
+
out.push(d.tex.canonical + '\\implies \\delta = ' + d.distanceTo(C2.center).tex + '\\implies \\text{externe}')
|
|
225
|
+
} else if (pr === 1) {
|
|
226
|
+
out.push(d.tex.canonical + '\\implies \\text{tangent: }' + C2.lineIntersection(d)[0].tex)
|
|
227
|
+
} else {
|
|
228
|
+
out.push(d.tex.canonical + '\\implies \\delta = ' + d.distanceTo(C2.center).tex + '\\implies \\text{sécant:} ' + C2.lineIntersection(d).map(x => x.tex).join('\\quad'))
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
return out
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
function ex3() {
|
|
236
|
+
let C = new Pi.Geometry.Circle(
|
|
237
|
+
new Pi.Geometry.Point(-14, 18),
|
|
238
|
+
new Pi.Geometry.Point(-2, 14),
|
|
239
|
+
new Pi.Geometry.Point(-10, 22)
|
|
240
|
+
), T1 = new Pi.Geometry.Triangle(new Pi.Geometry.Point(-14, 18),
|
|
241
|
+
new Pi.Geometry.Point(-2, 14),
|
|
242
|
+
new Pi.Geometry.Point(-10, 22))
|
|
243
|
+
|
|
244
|
+
let E = new Pi.Geometry.Circle(
|
|
245
|
+
new Pi.Geometry.Point(4, 10),
|
|
246
|
+
new Pi.Geometry.Point(5, 5),
|
|
247
|
+
new Pi.Geometry.Point(9, 11)
|
|
248
|
+
), T2 = new Pi.Geometry.Triangle(
|
|
249
|
+
new Pi.Geometry.Point(4, 10),
|
|
250
|
+
new Pi.Geometry.Point(5, 5),
|
|
251
|
+
new Pi.Geometry.Point(9, 11)
|
|
252
|
+
)
|
|
253
|
+
|
|
254
|
+
return [
|
|
255
|
+
'\\text{2 milieux, 2 normales, 2 médiatrices, 2 intersection, 1 rayon, 1 équation}',
|
|
256
|
+
'\\text{série A}',
|
|
257
|
+
(new Pi.Geometry.Point().middleOf(T2.A, T2.B)).tex + '\\quad (m_{AB}):\\ ' + T2.remarquables.mediators.AB.tex.canonical,
|
|
258
|
+
(new Pi.Geometry.Point().middleOf(T2.A, T2.C)).tex + '\\quad (m_{AC}):\\ ' + T2.remarquables.mediators.AC.tex.canonical,
|
|
259
|
+
(new Pi.Geometry.Point().middleOf(T2.C, T2.B)).tex + '\\quad (m_{BC}):\\ ' + T2.remarquables.mediators.BC.tex.canonical,
|
|
260
|
+
E.tex,
|
|
261
|
+
'\\text{série B}',
|
|
262
|
+
(new Pi.Geometry.Point().middleOf(T1.A, T1.B)).tex + '\\quad (m_{AB}):\\ ' + T1.remarquables.mediators.AB.tex.canonical,
|
|
263
|
+
(new Pi.Geometry.Point().middleOf(T1.A, T1.C)).tex + '\\quad (m_{AC}):\\ ' + T1.remarquables.mediators.AC.tex.canonical,
|
|
264
|
+
(new Pi.Geometry.Point().middleOf(T1.C, T1.B)).tex + '\\quad (m_{BC}):\\ ' + T1.remarquables.mediators.BC.tex.canonical,
|
|
265
|
+
C.tex,
|
|
266
|
+
|
|
267
|
+
]
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
function ex4() {
|
|
271
|
+
// A
|
|
272
|
+
let A = new Pi.Geometry.Point(-6, -9),
|
|
273
|
+
C = new Pi.Geometry.Circle('(x+3)^2+(y+5)^2=25'),
|
|
274
|
+
Oy = C.cartesian.clone().replaceBy('x', new Pi.Polynom().zero()),
|
|
275
|
+
Ox = C.cartesian.clone().replaceBy('y', new Pi.Polynom().zero()),
|
|
276
|
+
t = new Pi.Geometry.Line(
|
|
277
|
+
A,
|
|
278
|
+
new Pi.Geometry.Vector(A, C.center),
|
|
279
|
+
Pi.Geometry.Line.PERPENDICULAR
|
|
280
|
+
)
|
|
281
|
+
|
|
282
|
+
Oy.solve()
|
|
283
|
+
Ox.solve()
|
|
284
|
+
|
|
285
|
+
// B
|
|
286
|
+
let A1 = new Pi.Geometry.Point(-4, -14),
|
|
287
|
+
C1 = new Pi.Geometry.Circle('(x-10)^2+(y+6)^2=100'),
|
|
288
|
+
Oy1 = C1.cartesian.clone().replaceBy('x', new Pi.Polynom().zero()),
|
|
289
|
+
Ox1 = C1.cartesian.clone().replaceBy('y', new Pi.Polynom().zero()),
|
|
290
|
+
t1 = new Pi.Geometry.Line(
|
|
291
|
+
A1,
|
|
292
|
+
new Pi.Geometry.Vector(A1, C1.center),
|
|
293
|
+
Pi.Geometry.Line.PERPENDICULAR
|
|
294
|
+
)
|
|
295
|
+
|
|
296
|
+
Oy1.solve()
|
|
297
|
+
Ox1.solve()
|
|
298
|
+
|
|
299
|
+
return [
|
|
300
|
+
'\\text{série A}',
|
|
301
|
+
'(Ox):\\ ' + Ox.solutions.map(y => `(${y.value};0)`),
|
|
302
|
+
'(Oy):\\ ' + Oy.solutions.map(x => `(0;${x.value})`),
|
|
303
|
+
'(t):\\ ' + t.tex.canonical,
|
|
304
|
+
'\\text{série B}',
|
|
305
|
+
'(Ox):\\ ' + Ox1.solutions.map(y => `(${y.value};0)`),
|
|
306
|
+
'(Oy):\\ ' + Oy1.solutions.map(x => `(0;${x.value})`),
|
|
307
|
+
'(t):\\ ' + t1.tex.canonical
|
|
308
|
+
]
|
|
309
|
+
}
|
|
311
310
|
|
|
312
311
|
</script>
|
|
313
312
|
</body>
|
package/src/index.ts
CHANGED
|
@@ -3,7 +3,7 @@ import {NumExp} from "./maths/expressions/numexp";
|
|
|
3
3
|
import {Shutingyard} from "./maths/shutingyard";
|
|
4
4
|
import {Random} from "./maths/randomization/random";
|
|
5
5
|
import {Fraction} from "./maths/coefficients/fraction";
|
|
6
|
-
import {
|
|
6
|
+
import {NthRoot} from "./maths/coefficients/nthRoot";
|
|
7
7
|
import {Monom} from "./maths/algebra/monom";
|
|
8
8
|
import {Polynom} from "./maths/algebra/polynom";
|
|
9
9
|
import {Equation} from "./maths/algebra/equation";
|
|
@@ -23,7 +23,7 @@ export const PiMath = {
|
|
|
23
23
|
Numeric: Numeric,
|
|
24
24
|
NumExp: NumExp,
|
|
25
25
|
Fraction: Fraction,
|
|
26
|
-
Root:
|
|
26
|
+
Root: NthRoot,
|
|
27
27
|
Monom: Monom,
|
|
28
28
|
Polynom: Polynom,
|
|
29
29
|
Equation: Equation,
|