forked from dlecocq/webglot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
p_curve.html
41 lines (37 loc) · 1 KB
/
p_curve.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
<!DOCTYPE html>
<html>
<head>
<title>WebGLot Alpha</title>
<script src="primitive.js"> </script>
<script src="stopwatch.js"> </script>
<script src="curve.js"> </script>
<script src="p_curve.js"> </script>
<script src="scalar_field.js"> </script>
<script src="CanvasMatrix.js"> </script>
<script src="screen.js"> </script>
<script src="grapher.js"> </script>
<script>
function start() {
var glot = new grapher();
glot.initialize();
glot.add(new p_curve(glot.getContext(), "sin(s * t), cos(1.5 * s * t)"));
glot.add(new p_curve(glot.getContext(), "sin(s * 6.3 + sin(s * 6.3)) + 4.0, cos(s * 6.3 + cos(s * 6.3)) + 2.0"))
var f = function() { glot.reshape(); glot.display() };
setInterval(f, 10);
}
</script>
<style type="text/css">
canvas {
border: 1px solid black;
width:100%;
height:400px;
}
</style>
</head>
<body onload="start()">
<canvas id="glot">
There is supposed to be an example drawing here, but it's not important.
</canvas>
<div id="framerate">15</div>
</body>
</html>