67oi678y commited on
Commit
1fffa37
·
verified ·
1 Parent(s): 5978da9

add ion particle as an option and make the slide for superposition and entanglement more specific

Browse files
Files changed (1) hide show
  1. index.html +34 -11
index.html CHANGED
@@ -54,7 +54,7 @@
54
 
55
  <div class="mb-8">
56
  <label class="block text-gray-300 mb-2">Select Particle Type</label>
57
- <div class="grid grid-cols-3 gap-2 mb-4">
58
  <button class="particle-btn bg-purple-900 hover:bg-purple-700 text-white py-3 px-4 rounded-lg transition" data-particle="electron">
59
  <i data-feather="zap" class="inline mr-2"></i> Electron
60
  </button>
@@ -64,21 +64,38 @@
64
  <button class="particle-btn bg-pink-900 hover:bg-pink-700 text-white py-3 px-4 rounded-lg transition" data-particle="quark">
65
  <i data-feather="activity" class="inline mr-2"></i> Quark
66
  </button>
 
 
 
67
  </div>
68
- </div>
69
 
70
  <div class="mb-8">
71
  <label class="block text-gray-300 mb-2">Quantum State Parameters</label>
72
  <div class="space-y-4">
73
  <div>
74
- <label class="text-gray-400">Superposition</label>
75
- <input type="range" min="0" max="100" value="50" class="w-full h-2 bg-gray-700 rounded-lg appearance-none cursor-pointer" id="superposition">
 
 
 
 
 
 
 
76
  </div>
77
  <div>
78
- <label class="text-gray-400">Entanglement</label>
79
- <input type="range" min="0" max="100" value="25" class="w-full h-2 bg-gray-700 rounded-lg appearance-none cursor-pointer" id="entanglement">
 
 
 
 
 
 
 
80
  </div>
81
- <div>
82
  <label class="text-gray-400">Spin</label>
83
  <div class="flex space-x-4">
84
  <button class="spin-btn bg-gray-700 hover:bg-gray-600 text-white py-2 px-4 rounded-lg transition" data-spin="up">↑ Up</button>
@@ -184,8 +201,14 @@
184
  color: "#EC4899",
185
  description: "An elementary particle that combines to form hadrons like protons and neutrons.",
186
  states: ["Up", "Down", "Strange", "Charm", "Bottom", "Top"]
 
 
 
 
 
 
187
  }
188
- };
189
 
190
  // Current state
191
  let currentParticle = null;
@@ -224,18 +247,18 @@
224
  updateVisualization();
225
  });
226
  });
227
-
228
  superpositionSlider.addEventListener('input', () => {
229
  currentSuperposition = superpositionSlider.value;
 
230
  updateVisualization();
231
  });
232
 
233
  entanglementSlider.addEventListener('input', () => {
234
  currentEntanglement = entanglementSlider.value;
 
235
  updateVisualization();
236
  });
237
-
238
- generateBtn.addEventListener('click', () => {
239
  if (!currentParticle) {
240
  alert("Please select a particle type first!");
241
  return;
 
54
 
55
  <div class="mb-8">
56
  <label class="block text-gray-300 mb-2">Select Particle Type</label>
57
+ <div class="grid grid-cols-4 gap-2 mb-4">
58
  <button class="particle-btn bg-purple-900 hover:bg-purple-700 text-white py-3 px-4 rounded-lg transition" data-particle="electron">
59
  <i data-feather="zap" class="inline mr-2"></i> Electron
60
  </button>
 
64
  <button class="particle-btn bg-pink-900 hover:bg-pink-700 text-white py-3 px-4 rounded-lg transition" data-particle="quark">
65
  <i data-feather="activity" class="inline mr-2"></i> Quark
66
  </button>
67
+ <button class="particle-btn bg-green-900 hover:bg-green-700 text-white py-3 px-4 rounded-lg transition" data-particle="ion">
68
+ <i data-feather="atom" class="inline mr-2"></i> Ion
69
+ </button>
70
  </div>
71
+ </div>
72
 
73
  <div class="mb-8">
74
  <label class="block text-gray-300 mb-2">Quantum State Parameters</label>
75
  <div class="space-y-4">
76
  <div>
77
+ <div class="flex justify-between text-gray-400 mb-1">
78
+ <label>Superposition</label>
79
+ <span id="superposition-value">50%</span>
80
+ </div>
81
+ <input type="range" min="0" max="100" step="5" value="50" class="w-full h-2 bg-gray-700 rounded-lg appearance-none cursor-pointer" id="superposition">
82
+ <div class="text-xs text-gray-500 mt-1">
83
+ <span>Collapsed</span>
84
+ <span class="float-right">Superposed</span>
85
+ </div>
86
  </div>
87
  <div>
88
+ <div class="flex justify-between text-gray-400 mb-1">
89
+ <label>Entanglement</label>
90
+ <span id="entanglement-value">25%</span>
91
+ </div>
92
+ <input type="range" min="0" max="100" step="5" value="25" class="w-full h-2 bg-gray-700 rounded-lg appearance-none cursor-pointer" id="entanglement">
93
+ <div class="text-xs text-gray-500 mt-1">
94
+ <span>Independent</span>
95
+ <span class="float-right">Entangled</span>
96
+ </div>
97
  </div>
98
+ <div>
99
  <label class="text-gray-400">Spin</label>
100
  <div class="flex space-x-4">
101
  <button class="spin-btn bg-gray-700 hover:bg-gray-600 text-white py-2 px-4 rounded-lg transition" data-spin="up">↑ Up</button>
 
201
  color: "#EC4899",
202
  description: "An elementary particle that combines to form hadrons like protons and neutrons.",
203
  states: ["Up", "Down", "Strange", "Charm", "Bottom", "Top"]
204
+ },
205
+ ion: {
206
+ name: "Ion",
207
+ color: "#10B981",
208
+ description: "An atom or molecule with a net electric charge due to loss or gain of electrons.",
209
+ states: ["Ground State", "Excited State", "Rydberg State"]
210
  }
211
+ };
212
 
213
  // Current state
214
  let currentParticle = null;
 
247
  updateVisualization();
248
  });
249
  });
 
250
  superpositionSlider.addEventListener('input', () => {
251
  currentSuperposition = superpositionSlider.value;
252
+ document.getElementById('superposition-value').textContent = `${currentSuperposition}%`;
253
  updateVisualization();
254
  });
255
 
256
  entanglementSlider.addEventListener('input', () => {
257
  currentEntanglement = entanglementSlider.value;
258
+ document.getElementById('entanglement-value').textContent = `${currentEntanglement}%`;
259
  updateVisualization();
260
  });
261
+ generateBtn.addEventListener('click', () => {
 
262
  if (!currentParticle) {
263
  alert("Please select a particle type first!");
264
  return;