|
|
@ -2,9 +2,9 @@ |
|
|
|
<html lang="en"> |
|
|
|
<html lang="en"> |
|
|
|
<head> |
|
|
|
<head> |
|
|
|
<meta charset="utf-8"> |
|
|
|
<meta charset="utf-8"> |
|
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.9.0/p5.min.js" type="text/javascript"></script> |
|
|
|
<script src="data/lib/p5.min.js" type="text/javascript"></script> |
|
|
|
<script src="https://code.jquery.com/jquery-3.6.4.min.js" type="text/javascript"></script> |
|
|
|
<script src="data/lib/jquery-3.6.4.min.js" type="text/javascript"></script> |
|
|
|
<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script> |
|
|
|
<script src="data/lib/vue.global.js"></script> |
|
|
|
<script src="data/scripts/js/main.js" type="text/javascript"></script> |
|
|
|
<script src="data/scripts/js/main.js" type="text/javascript"></script> |
|
|
|
<link href="styles.css" rel="stylesheet"> |
|
|
|
<link href="styles.css" rel="stylesheet"> |
|
|
|
<link href="data/styles/color_picker.css" rel="stylesheet"> |
|
|
|
<link href="data/styles/color_picker.css" rel="stylesheet"> |
|
|
@ -17,17 +17,81 @@ |
|
|
|
<div id="options"> |
|
|
|
<div id="options"> |
|
|
|
<fieldset id="preparation"> |
|
|
|
<fieldset id="preparation"> |
|
|
|
<legend>Preparation</legend> |
|
|
|
<legend>Preparation</legend> |
|
|
|
|
|
|
|
<label> |
|
|
|
|
|
|
|
Segments: {{ segmentCount }} |
|
|
|
|
|
|
|
<input type="range" v-model.number="segmentCount" min="1" max="20" step="1"> |
|
|
|
|
|
|
|
</label> |
|
|
|
|
|
|
|
<div id="segment_view"> |
|
|
|
|
|
|
|
<span id="segment_header_mass">Mass</span><span id="segment_header_length">Length</span> |
|
|
|
|
|
|
|
<template v-for="i in segmentCount"> |
|
|
|
|
|
|
|
<span class="segment_label">({{ i - 1 }})</span> |
|
|
|
|
|
|
|
<span class="segment_label">{{ masses[i - 1] }}kg</span> |
|
|
|
|
|
|
|
<input type="range" v-model.number="masses[i - 1]" min="0.1" max="10" step=".1"> |
|
|
|
|
|
|
|
<span class="segment_label">{{ lengths[i - 1] }}m</span> |
|
|
|
|
|
|
|
<input type="range" v-model.number="lengths[i - 1]" min="0.1" max="5" step=".1"> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<label> |
|
|
|
|
|
|
|
Starting Angle: {{startAngle}}° |
|
|
|
|
|
|
|
<input type="range" v-model.number="startAngle" min="0" max="360" step="1"> |
|
|
|
|
|
|
|
</label> |
|
|
|
|
|
|
|
<label v-show="!multiple || !rainbow"> |
|
|
|
|
|
|
|
Color: |
|
|
|
|
|
|
|
<input type="color" v-model="color"> |
|
|
|
|
|
|
|
</label> |
|
|
|
|
|
|
|
<br> |
|
|
|
|
|
|
|
<label> |
|
|
|
|
|
|
|
<input type="checkbox" v-model="multiple"> |
|
|
|
|
|
|
|
Add multiple |
|
|
|
|
|
|
|
</label> |
|
|
|
|
|
|
|
<br> |
|
|
|
|
|
|
|
<template v-if="multiple"> |
|
|
|
|
|
|
|
<label> |
|
|
|
|
|
|
|
<input type="checkbox" v-model="rainbow"> |
|
|
|
|
|
|
|
Use rainbow coloring |
|
|
|
|
|
|
|
</label> |
|
|
|
|
|
|
|
<br><br> |
|
|
|
|
|
|
|
<label> |
|
|
|
|
|
|
|
Add Count: {{pendulumCount}} |
|
|
|
|
|
|
|
<input type="range" v-model.number="pendulumCount" min="10" max="250" step="10"> |
|
|
|
|
|
|
|
</label> |
|
|
|
|
|
|
|
<span>Property to change slightly:</span> |
|
|
|
|
|
|
|
<br> |
|
|
|
|
|
|
|
<label> |
|
|
|
|
|
|
|
<input type="radio" value="angle" v-model="changeProperty"> |
|
|
|
|
|
|
|
Starting Angle |
|
|
|
|
|
|
|
</label> |
|
|
|
|
|
|
|
<br> |
|
|
|
|
|
|
|
<label> |
|
|
|
|
|
|
|
<input type="radio" value="mass" v-model="changeProperty"> |
|
|
|
|
|
|
|
Specific Mass |
|
|
|
|
|
|
|
</label> |
|
|
|
|
|
|
|
<br> |
|
|
|
|
|
|
|
<label> |
|
|
|
|
|
|
|
<input type="radio" value="length" v-model="changeProperty"> |
|
|
|
|
|
|
|
Specific Length |
|
|
|
|
|
|
|
</label> |
|
|
|
|
|
|
|
<br><br> |
|
|
|
|
|
|
|
<label v-show="changeProperty === 'mass' || changeProperty === 'length'"> |
|
|
|
|
|
|
|
Index: {{ changeIndex }} |
|
|
|
|
|
|
|
<input type="range" v-model.number="changeIndex" min="0" :max="segmentCount - 1" step="1"> |
|
|
|
|
|
|
|
</label> |
|
|
|
|
|
|
|
<label> |
|
|
|
|
|
|
|
Change Amount: {{ changeAmount * 100 }}% |
|
|
|
|
|
|
|
<input type="range" v-model.number="changeAmount" min="0.0001" max="0.1" step="0.0001"> |
|
|
|
|
|
|
|
</label> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
<button @click="add" id="add_btn"></button> |
|
|
|
</fieldset> |
|
|
|
</fieldset> |
|
|
|
<fieldset id="simulation"> |
|
|
|
<fieldset id="simulation"> |
|
|
|
<legend>Simulation</legend> |
|
|
|
<legend>Simulation</legend> |
|
|
|
<label> |
|
|
|
<label> |
|
|
|
Gravity: {{ gravity }} <sup>N</sup>⁄<sub>kg</sub> |
|
|
|
Gravity: {{ gravity }} <sup>N</sup>⁄<sub>kg</sub> |
|
|
|
<input type="range" v-model="gravity" min="0" max="30" step=".01" autocomplete="off"> |
|
|
|
<input type="range" v-model.number="gravity" min="0" max="30" step=".01"> |
|
|
|
</label> |
|
|
|
</label> |
|
|
|
<label> |
|
|
|
<label> |
|
|
|
Timescale: x{{ timescale }} |
|
|
|
Timescale: x{{ timescale }} |
|
|
|
<input type="range" v-model="timescale" min="0.01" max="3" step=".01" autocomplete="off"> |
|
|
|
<input type="range" v-model.number="timescale" min="0.01" max="3" step=".01"> |
|
|
|
</label> |
|
|
|
</label> |
|
|
|
<button @click="togglePlay" id="play_btn" :class="playingBtn"></button> |
|
|
|
<button @click="togglePlay" id="play_btn" :class="playingBtn"></button> |
|
|
|
</fieldset> |
|
|
|
</fieldset> |
|
|
|