pimath 0.0.17 → 0.0.18

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/dev/index.html CHANGED
@@ -16,15 +16,43 @@
16
16
  <div id="equation"></div>
17
17
 
18
18
 
19
- <script type="module">
20
- let P = Pi.Random.polynom({
21
- letters: 'x',
22
- degree: 2,
23
- factorable: true,
24
- unit: true,
25
- allowNullMonom: false
26
- })
27
- console.log(P.tex, P.factorize().map(x=>x.tex))
19
+ <script>
20
+
21
+ let C1 = new Pi.Geometry.Point(-5, 4),
22
+ r1 = 36,
23
+ C2 = new Pi.Geometry.Point(7, -2),
24
+ T = new Pi.Geometry.Point(2, 3)
25
+
26
+ let G1 = new Pi.Geometry.Circle(C1, r1, true),
27
+ G2 = new Pi.Geometry.Circle(C2, T)
28
+
29
+ console.log('G1', G1.tex)
30
+ console.log('G2', G2.tex)
31
+
32
+ let t = new Pi.Geometry.Line(
33
+ new Pi.Geometry.Vector(C2, T),
34
+ T
35
+ )
36
+
37
+ console.log(t.tex.canonical)
38
+ console.log(G1.relativePosition(t))
39
+
40
+ let d = new Pi.Geometry.Line(G1.center, G2.center)
41
+ console.log(d.tex.canonical)
42
+
43
+ let M = new Pi.Geometry.Point(
44
+ G1.center.x.clone().add(G2.center.x).divide(2),
45
+ G1.center.y.clone().add(G2.center.y).divide(2),
46
+ )
47
+
48
+ console.log(M.display)
49
+
50
+ let k = new Pi.Geometry.Line().parseByPointAndLine(
51
+ M, d,
52
+ Pi.Geometry.Line.PERPENDICULAR
53
+ )
54
+
55
+ console.log(k.tex.canonical)
28
56
  </script>
29
57
  </body>
30
58
  </html>