summaryrefslogtreecommitdiff
path: root/shaperoller.html
blob: 1eddb8a547995b69c0b2625fa038531ec8c3c82c (plain)
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
<html>
    <head>
        <title>Shape roller</title>
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
        <link rel="stylesheet" href="css/style.css">
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.5.2/p5.js"></script>
    </head>
    <body>
        <div id="navbar"></div>
        <script src="navbar.js"></script>
        <h2>Shape Roller</h2>
        <p>This program rolls (invisible) shapes around other (invisible) shapes and traces a point on the shape as it moves along.<br>
        Here's an animation of how it works:<br>
        <img width="100" height="100" src="https://upload.wikimedia.org/wikipedia/commons/d/d0/Cardiod_animation.gif" target="_blank"></p>
        <script src="js/shaperoller.js"></script>

        Speed: <input type="number" id="speed" value="0.5"><br>
        <p>Quality will be lost at higher speeds</p>

        <div id="shapes">

        <span id="rt0">Radius:</span>
        <input type="number" value="100" id="radius0">
        <span id="st0">Shape:</span>
        <select id="shape0">
        <option value="circle">Circle</option>
        <option value="square">Square</option>
        </select>
        <button id="del0" onclick="deleteShape(0);">Delete</button><br id="br0">

        <span id="rt1">Radius:</span>
        <input type="number" value="50" id="radius1">
        <span id="st1">Shape:</span>
        <select id="shape1">
        <option value="circle">Circle</option>
        <option value="square">Square</option>
        </select>
        <button id="del1" onclick="deleteShape(1);">Delete</button><br id="br1">


        </div>

        <button onclick="addShape();">Add shape</button><br>
        <button onclick="startDrawing();">Start!</button>


        <div id="canvasSpot"></div>

    </body>


</html>