-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.js
More file actions
50 lines (47 loc) · 735 Bytes
/
test.js
File metadata and controls
50 lines (47 loc) · 735 Bytes
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
JXG.Options.slider.snapValues = [-5, -2, -1, 0, 1, 2, 5]
JXG.Options.slider.snapValueDistance = 0.2
var a = board.create(
'slider',
[
[2, -5],
[7, -5],
[-5, 1, 5],
],
{ name: 'a' }
)
var b = board.create(
'slider',
[
[2, -6],
[7, -6],
[-5, 0, 5],
],
{ name: 'b' }
)
var c = board.create(
'slider',
[
[2, -7],
[7, -7],
[-5, 0, 5],
],
{ name: 'c' }
)
var f = board.create('functiongraph', [
(x) => a.Value() * x * x + b.Value() * x + c.Value(),
])
var txt = board.create(
'text',
[
-9,
-5,
() =>
JXG.Math.Numerics.generatePolynomialTerm(
[c.Value(), b.Value(), a.Value()],
2,
'x',
2
),
],
{ fontSize: 18 }
)