/
74_CSad_sin.html
58 lines (38 loc) · 1.18 KB
/
74_CSad_sin.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Cindy JS</title>
<script type="text/javascript" src="../build/js/Cindy.js"></script>
</head>
<body style="font-family:Arial;">
<h2>CindyJS automatic differentiation</h2>
<h3>|C|*sin(x)</h3>
<h4>Order = 8</h4>
<script id='csmove' type='text/x-cindyscript'>
lam = |C|;
f(x):=lam*sin(x);
a = -100..250;
a = a/10;
order = 8;
erg = autodiff(f(x), a, order);
repeat(order+1,j,
repeat(length(a),i,
draw([[a_i,erg_i_j],[a_(i+1), erg_(i+1)_j]]);
));
</script>
<div id="CSCanvas" style="width:800px; height:500px; border:2px solid #000000;"></div>
<script type="text/javascript">
var gslp=[
{name:"C", type:"Free", pos:[0,-1],color:[1,1,0],size:5},
];
CindyJS({canvasname:"CSCanvas",
movescript:"csmove",
grid:1,
snap:true,
//transform:[{scale:1.},{translate:[0,0]}],
geometry:gslp});
document.onkeydown={}
</script>
</body>
</html>