forked from minivan/matematica
-
Notifications
You must be signed in to change notification settings - Fork 0
/
plot.html
186 lines (171 loc) · 6.01 KB
/
plot.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
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
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<!-- Optional theme -->
<link rel="stylesheet" href="css/bootstrap-theme.min.css">
<!-- Latest compiled and minified JavaScript -->
<script src="js/jquery-2.1.4.min.js"></script>
<script src="js/d3.min.js"></script>
<script src="js/function-plot.js"></script>
<script type="text/javascript"
src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}
});
</script>
<script src="js/plot.js"></script>
<style>
#wrong-input {
margin-top:10px;
}
.examples {
margin-top: 10px;
}
.examples thead td {
background-color:#f25e5c;
color:#f8efed;
}
.examples tbody {
color:#41404a;
}
.examples td:first-child{
vertical-align: middle;
}
.examples td:not(first-child){
text-align: left;
}
.full-screen {
height:100%;
width:100%;
position:fixed;
left:0;
top:0;
padding : 0;
z-index:2 !important;
background-color:#fff;
display: none;
}
#fsc .full-screen-header {
overflow:hidden;
vertical-align: middle;
border-bottom:1px solid #0095dd;
padding-top:4px;
background-color: #f9f9f9;
}
#fsc .full-screen-content {
overflow:hidden;
}
#functions-list {
margin-top:10px;
}
</style>
</head>
<body>
<nav class="navbar navbar-default">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">matematica.md</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li class="active"><a href="#">Desenare grafic<span class="sr-only">(current)</span></a></li>
<li><a href="quziStartPage.html">Teste<span class="sr-only">(current)</span></a></li>
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>
<div class="container">
<div class="col-md-4 col-xs-12" id="input">
<div class="col-lg-12">
<div class="input-group" id="function-input">
<span class="input-group-btn">
<button class="btn btn-default" id="function-name"></button>
</span>
<input type="text" class="form-control" id="formula" placeholder="Introdu functia">
<span class="input-group-btn">
<button class="btn btn-default btn-success" type="button" onclick="add()"><span class="glyphicon glyphicon-plus" aria-hidden="true"></span></button>
</span>
</div>
</div>
<div class="alert alert-danger col-lg-12" id="wrong-input" role="alert">Ati introdus gresit formula !</div>
<div class="col-lg-12">
<table class="table table-hover table-striped" id="functions-list">
<thead>
<tr>
<td class="col-xs-8">Functia</td>
<td class="col-xs-2">Actiuni</td>
</tr>
</thead>
<tbody>
</tbody>
</table>
<table class="table table-hover table-striped examples hidden-md hidden-xs">
<thead>
<tr>
<td class="col-xs-6">Limbaj</td>
<td class="col-xs-6">Echivalentul matematic</td>
</tr>
</thead>
<tbody>
<tr>
<td>3*x</td>
<td>$$3x$$</td>
</tr>
<tr>
<td>3*x^2</td>
<td>$$3x^2$$</td>
</tr>
<tr>
<td>3*x^4 + 4</td>
<td>$$3x^4 + 4$$</td>
</tr>
<tr>
<td>sin(x)</td>
<td>$$sin(x)$$</td>
</tr>
<tr>
<td>cos(x)</td>
<td>$$cos(x)$$</td>
</tr>
<tr>
<td>tan(x)</td>
<td>$$tan(x)$$</td>
</tr>
<tr>
<td>sqrt(x)</td>
<td>$$\sqrt{x}$$</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="col-md-8 col-xs-12">
<a href="#" class="btn pull-right" onclick="openFullScreen()"><span class="glyphicon glyphicon-resize-full" aria-hidden="true"></span></a>
<div id="plotting-area">
</div>
</div>
<div class="full-screen container-fluid" id="fsc">
<div class="full-screen-header">
<a href="#" class="btn pull-right" onclick="closeFullScreen()"><span class="glyphicon glyphicon-resize-full" aria-hidden="true"></span></a>
</div>
<div class="full-screen-content">
</div>
</div>
<script src="js/graphPlotter.js"></script>
</div>
</body>
</html>