-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvirtualparticles.html
130 lines (117 loc) · 4.69 KB
/
virtualparticles.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Virtual Qutrits and String Theory</title>
<style>
body {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100vh;
background-color: #f0f0f0;
font-family: Arial, sans-serif;
}
#dieGrid {
display: grid;
grid-template-columns: repeat(auto-fill, 10px);
gap: 10px;
width: auto;
justify-content: center;
}
.dieResult {
font-size: 10px;
width: 10px;
height: 10px;
text-align: center;
line-height: 10px;
opacity: 0;
animation: fadeIn 20s ease-in-out forwards;
}
@keyframes fadeIn {
0% { opacity: 0; }
100% { opacity: 1; }
}
.content {
text-align: center;
max-width: 600px;
margin: 20px auto;
}
.content h1 {
margin-bottom: 10px;
}
.content p {
text-align: left;
}
</style>
</head>
<body>
<div class="content">
<h1>Understanding Virtual Qutrits in String Theory</h1>
<h1> Looped Strings in Quantum Mechanics</h1>
<p>
In the realm of string theory, particles are envisioned not as points, but as one-dimensional strings. These strings vibrate and loop, creating the diverse tapestry of the universe. This visualization takes inspiration from the core concepts of string theory, integrating the idea of looped strings with quantum randomness. Each dot, representing a qutrit state, is a visual metaphor for a vibrating string in multiple quantum states.
</p>
<p>
The 'H', '𝕏', and '+' states echo the uncertainty and duality found in quantum mechanics, akin to the wave-particle duality and the unpredictable nature of quantum states. As these elements orbit in a visually appealing pattern, they symbolize the dance of subatomic particles in space, bound by the unseen forces of the quantum world. This dynamic interplay is a nod to the complex and beautiful choreography of the universe's fundamental building blocks as described by string theory.
</p>
<p>
This interactive piece, marrying the abstract concepts of string theory with concrete visual representation, aims to offer a glimpse into the mysterious yet fascinating world of quantum mechanics and string theory.
</p>
</div>
<figure id="dieGrid"></figure>
<script>
const quantum = {
getRandom: function(min, mid, max) {
if (typeof min !== "number" || typeof mid !== "number" || typeof max !== "number") {
throw new Error("min, mid, and max must be numbers");
}
if (min >= mid || mid >= max) {
throw new Error("Values must be in order: min < mid < max");
}
const buffer = new Uint32Array(1);
window.crypto.getRandomValues(buffer);
const normalizedRandom = buffer[0] / (0xFFFFFFFF + 1);
if (normalizedRandom < 0.33) {
return this.cryptoRandom(min, mid);
} else if (normalizedRandom < 0.67) {
return this.cryptoRandom(mid, max);
} else {
return this.cryptoRandom(max, max + (max - mid));
}
},
cryptoRandom: function(min, max) {
const range = max - min;
const buffer = new Uint32Array(1);
window.crypto.getRandomValues(buffer);
return (buffer[0] / (0xFFFFFFFF + 1)) * range + min;
}
};
function rollQuantumDie() {
let dieGrid = document.getElementById('dieGrid');
dieGrid.innerHTML = '';
for (let i = 0; i < 4000; i++) {
let outcome = quantumDieOutcome();
let resultSpan = document.createElement('span');
resultSpan.classList.add('dieResult');
resultSpan.style.animationDelay = `${i * 0.005}s`;
resultSpan.textContent = outcome;
dieGrid.appendChild(resultSpan);
}
}
function quantumDieOutcome() {
const result = quantum.getRandom(0, 1, 2);
if (result < 1) {
return 'H';
} else if (result < 2) {
return '𝕏';
} else {
return '+';
}
}
rollQuantumDie();
</script>
</body>
</html>