Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: b55047545a
Fetching contributors…

Cannot retrieve contributors at this time

47 lines (38 sloc) 1.526 kb
<html>
<head>
<title>Sandbox - Canvas test</title>
<script src="https://www.google.com/jsapi?key=ABQIAAAAddaxGoMurZGMYvNwzLhxSxR31IAHTsp0eFaPdeui82dKLzGy9hQShbrzolMYmlOa0kW3rQ6b3Dn4EA" type="text/javascript"></script>
<script tyle="text/javascript">
google.load("jquery", "1.4.3");
google.load("jqueryui", "1.8.6");
</script>
<link rel="stylesheet" type="text/css" href="jquery-ui.css">
<script type="text/javascript" src="nbody.js"></script>
<link rel="stylesheet" type="text/css" href="nbody.css">
<style>
#canvas { border: 1px solid black; }
</style>
</head>
<body>
<p><a href="/">Back to the sandbox</a></p>
<p>N-body problem using an n<sup>2</sup> verlet integration. An exercise in pseudo-physics, canvas, and jquery.</p>
<p>Warning: If you are not using Google Chrome, this will (probably) be extremely slow.</p>
<canvas id="canvas" width="800" height="500"></canvas>
<div id="stats">
<span id="numBodies"></span>
</div>
<div "controls">
<input type="checkbox" id="run" checked="checked" />Run
<input type="button" id="clear" value="Clear" />
<input type="button" id="protodisk" value="Generate Disk" />
<br />
<a href="#" id="protoOptsLink">Disk controls</a>
<div id="protoOpts">
Size: <span id="protoSizeLabel"></span><br />
<div id="protoSize" class="slider"></div>
Number: <span id="protoNumLabel"></span><br />
<div id="protoNum" class="slider"></div>
</div>
</div>
</body>
</html>
Jump to Line
Something went wrong with that request. Please try again.