Skip to content

Commit 67ed5ce

Browse files
committed
revert
1 parent 524d194 commit 67ed5ce

26 files changed

+610
-2788
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# pettaboy.github.io
22

33
My project page.\
4-
My first project is already uploaded on the website. Don't forget to check it out!
4+
My second project is now uploaded on the website. Don't forget to check it out!

asset-manifest.json

Lines changed: 0 additions & 24 deletions
This file was deleted.

css/pettaboystyle.css

Lines changed: 286 additions & 0 deletions
Large diffs are not rendered by default.

cymaticssimulator_chladni.html

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
<!DOCTYPE html>
2+
<html lang="en-US">
3+
<head>
4+
<title>Cymatics Simulator - Chladni</title>
5+
<meta charset="UTF-8">
6+
<meta name="viewport" content="width=device-width, initial-scale=1">
7+
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato">
8+
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Montserrat">
9+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
10+
<link rel="icon" href="imgsrc/chladni_plate.png" type="image/x-icon">
11+
<style>
12+
body {font-family: "Lato", sans-serif;}
13+
html, body {height: 100%; width: 100%; margin: 0; color: white; background: #191919; font-size: 14px;}
14+
a {color: inherit; text-decoration: none;}
15+
header {position: fixed; top: 0; left: 0; background-color: rgba(0,0,0,0.4); border-radius: 5px; margin: 10px; padding: 10px; z-index: 2;}
16+
h1 {font-size: 18px; margin-top: 0;}
17+
#settings {display: flex; flex-direction: column;}
18+
label {padding-top: 10px;}
19+
input {margin: 5px 0;}
20+
fieldset>input {width: 15vw; min-width: 200px;}
21+
canvas {position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); max-width: 100vw; max-height: 100vw;}
22+
footer {position: fixed; top: 0; right: 0; margin: 10px; opacity: 0.7; font-size: 18px;}
23+
footer:hover {opacity: 1;}
24+
</style>
25+
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
26+
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js" type="text/javascript"></script>
27+
<script src="https://cdn.jsdelivr.net/npm/p5"></script>
28+
<script src="jssrc/chladni.js" type="text/javascript"></script>
29+
</head>
30+
<body>
31+
<header>
32+
<h1>Settings</h1>
33+
<form id="settings">
34+
<p>Attempt at simulating cymatic patterns on a chladni plate.</p>
35+
<p>Inspired from <a style="color:yellow;" href="https://www.youtube.com/watch?v=Q3oItpVa9fs">this video.</a></p>
36+
<p>Sound wave equation:
37+
\[f(x) = a\sin(\pi nx) \sin(\pi my) + b\sin(\pi mx) \sin(\pi ny)\]
38+
</p>
39+
<fieldset>
40+
<legend>frequency parameters:</legend>
41+
<label for="mSlider">m</label>
42+
<input name="mSlider" type="range" id="mSlider" min="1" max="16" step="1" value="8">
43+
<br>
44+
<label for="nSlider">n</label>
45+
<input name="nSlider" type="range" id="nSlider" min="1" max="16" step="1" value="4">
46+
<br>
47+
<label for="aSlider">a</label>
48+
<input name="aSlider" type="range" id="aSlider" min="-2" max="2" step="1" value="1">
49+
<br>
50+
<label for="bSlider">b</label>
51+
<input name="bSlider" type="range" id="bSlider" min="-2" max="2" step="1" value="1">
52+
</fieldset>
53+
<label for="vSlider">vibration strength:</label>
54+
<input name="vSlider" type="range" id="vSlider" min="0.01" max="0.1" step="0.01" value="0.02">
55+
<label for="numSlider">number of particles:</label>
56+
<input name="numSlider" type="range" id="numSlider" min="2000" max="20000" step="2000" value="20000">
57+
</form>
58+
</header>
59+
<main id="sketch-container"></main>
60+
<footer>
61+
<a alt="More info" href="https://github.com/PettaBoy" target="_blank"><i class="fa fa-github hover-opacity"></i></a>
62+
</footer>
63+
</body>
64+
</html>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2.35 KB
Loading

0 commit comments

Comments
 (0)