-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjsfibon.html
56 lines (40 loc) · 1.99 KB
/
jsfibon.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
<html>
<head>
<title>A quick little site for when i'm bored!</title>
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body>
<div id="header">
<h1>javascript experiments</h1>
<p>this website is for me to showcase some small javascript things i've been trying in my spare time.</p>
</div>
<div class="topbar">
<h2>js: fibonacci</h2>
<div class="navbar">
<a href="index.html">introduction</a>
<a href="about.html">about</a>
<a href="directory.html">directory</a>
</div>
</div>
<hr />
<div class = "page-content">
<h3>Explanation</h3>
<p>The Fibonacci sequence is mathematical formula (depicted as Fn) based on adding two numbers together to create the next number in the sequence. The formula is most commonly known as visually depicted as 'the Golden Spiral' in artwork, which is an ever-increasing spiral.</p>
<p>0 1 1 2 3 5 8 13 21 34 55 89 144 ...</p>
<p>0 + 1 = 1, <br />1 + 1 = 2, <br />1 + 2 = 3, <br />2 + 3 = 5, <br />3 + 5 = 8, <br />...</p>
<h3>Visualised</h3>
<p></p>
<img src="resources/fibonspiral.svg" alt="A visual display of the spiral formed via the Fibonacci sequence." height="50%" width="75%" />
<h3>Diagram</h3>
<canvas id = "fibCanvas"></canvas><br />
<script src="fibon.js"></script>
<button type="button" onclick="calLines()">Calculate</button>
</div>
<hr />
<div id="footer">
<a href="about.html">summer anderson-cheung</a>
<a href="https://www.ncl.ac.uk/computing/">newcastle university</a>
</div>
</body>
</html>
<!-- Ctrl + Alt + I to Intent! -->