tjsm/public/tjsm.html
2024-05-26 21:46:47 -04:00

75 lines
2.6 KiB
HTML

<!DOCTYPE html>
<html>
<!-- CC BY-NC-SA 4.0, gtrrebel, shikhin, zgrep -->
<head>
<title>tjsm</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.css" integrity="sha384-n8MVd4RsNIU0tAv4ct0nTaAbDJwPJzDEaqSD1odI+WdtXRGWt2kTvGFasHpSy3SV" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/katex@0.16.9/dist/katex.min.js" integrity="sha384-XjKyOOlGwcjNTAIQHIpgOno0Hl1YQqzUOEleOLALmuqehneUG+vnGctmUb0ZY0l8" crossorigin="anonymous"></script>
<script src="wasm-main.js" type="text/javascript"></script>
<script src="main.js" type="text/javascript"></script>
<script>
Module.postRun = init
</script>
<style>
table {
display: inline-table;
vertical-align: middle;
}
canvas {
border: 1px solid grey;
vertical-align: top;
max-width: 100%;
max-height: 100%;
aspect-ratio: 1 / 1;
}
#matrix_table input {
width: 280px;
}
</style>
</head>
<body>
<div id="grid_input">
<label id="d_eq"></label><input type="number" id="dim" onChange="dim_update()" value="2" min="2" style="width: 100px;">
<span id="matrix"></span><table id="matrix_table"></table>
</div>
<script type="text/javascript">katex.render("d =\\ ", document.getElementById('d_eq'))</script>
<br>
<div>
<canvas id="picker_canvas" width="400" height="400"></canvas>
<canvas id="drawing_canvas" width="1000" height="1000"></canvas>
<button id="enhance" type="button" onclick="enhance()" disabled>enhance</button>
<button id="clear_button" type="button" onclick="clear_matrix()">clear</button>
<button id="randomize_button" type="button" onclick="randomize_matrix()">randomize</button>
<button id="zoom_in_button" type="button" onclick="zoom_in_dr()">+</button>
<button id="zoom_out_button" type="button" onclick="zoom_out_dr()">-</button>
<button id="copy_button" type="button" onclick="copy_matrix()">copy</button>
<button id="enter_button" type="button" onclick="enter_matrix()">enter matrix</button>
</div>
<br>
<input type="checkbox" id="brownian" onclick="brownian_checkbox()">Brownian motion</input>
<div id="brownian_modifiers" style="display:none">
update time = <input type="number" id="brownian_freq" onChange="brownian_freq_update()" value="50" min="10" max="10000" style="width: 100px;"> ms <br>
speed = <input type="number" id="brownian_eps" onChange="brownian_eps_update()" value="0.1" min="0" max="6" style="width: 100px;">
</div>
<br>
<a href="https://arxiv.org/abs/2310.03227">paper</a> by
<a href="https://web.math.princeton.edu/~oeh">Otte Hein&#228;vaara</a>.
<a href="https://ahti.space/git/shikhin/tjsm">source</a>.
</body>
</html>