physics-cs-lab mechanics · fields · circuits · semiconductors · quantum

1. Newton's laws & free-body diagram

A block of mass $m$ on a surface. An applied force $F$, friction and gravity combine into a net force; Newton's second law $\;\sum \vec F = m\vec a\;$ gives the acceleration. Watch the block respond and read the force balance live.

net force $F_{net}$
acceleration $a$
state

2. Projectile motion

Launch a projectile at speed $v_0$ and angle $\theta$. Without drag the path is a parabola with range $R=\frac{v_0^2\sin 2\theta}{g}$; enable air drag (quadratic) and the trajectory is integrated numerically and falls short.

range $R$
max height
flight time

3. Work, energy & conservation

A mass on a spring oscillates as simple harmonic motion, $x(t)=A\cos(\omega t)$ with $\omega=\sqrt{k/m}$. Mechanical energy $E=\tfrac12 k x^2+\tfrac12 m v^2$ is conserved, trading between potential and kinetic; add damping to watch it dissipate.

period $T$
total energy $E$

4. Electric field of point charges

Click to place charges; click an existing charge to flip its sign. The field $\vec E=\sum_i \dfrac{kq_i}{r_i^2}\hat r_i$ is sampled on a grid and drawn as arrows, with equipotential shading. Red is positive, blue negative.

charges2
net charge0

click empty space to add (+); click a charge to toggle its sign.

5. Parallel-plate capacitor

A parallel-plate capacitor stores charge $Q=CV$ with capacitance $C=\dfrac{\kappa\varepsilon_0 A}{d}$. Vary the plate separation, area and dielectric $\kappa$; the uniform field $E=V/d$ and stored energy $U=\tfrac12 CV^2$ update live.

capacitance $C$
field $E$
energy $U$

6. Magnetic force on a moving charge

A charge in a uniform magnetic field feels the Lorentz force $\vec F=q\vec v\times\vec B$, perpendicular to its velocity, so it circles with radius $r=\dfrac{mv}{|q|B}$ at the cyclotron frequency. Flip the sign of $q$ to reverse the orbit.

radius $r$
period $T_c$

7. RC circuit — charging & discharging

A resistor and capacitor in series. Charging follows $V_C(t)=V_0\!\left(1-e^{-t/\tau}\right)$ with time constant $\tau=RC$; discharging decays as $e^{-t/\tau}$. After $5\tau$ the capacitor is effectively full / empty.

time constant $\tau$
$V_C$ now

8. Ohm's law & a DC circuit

A battery drives current through two resistors. Ohm's law $V=IR$ with series ($R=R_1+R_2$) or parallel ($\tfrac1R=\tfrac1{R_1}+\tfrac1{R_2}$) wiring sets the total current and the power $P=VI$ dissipated in each resistor.

total $R$
current $I$
power $P$

9. Diode I–V curve & logic gates

A p–n junction conducts only one way. The Shockley equation $I=I_S\!\left(e^{V/(nV_T)}-1\right)$ gives the characteristic curve. Two such diodes plus a resistor build a gate — see the truth table for the selected logic function.

diode current $I$
state

truth table

10. Photoelectric effect

Light of frequency $f$ ejects electrons only when the photon energy beats the work function: $E_k=hf-\phi$. Below the threshold frequency $f_0=\phi/h$ no electrons escape, no matter how bright — Einstein's quantum of light.

photon energy $hf$
threshold $\lambda_0$
$E_k$ ejected

11. Qubit & quantum gates

A qubit state $|\psi\rangle=\cos\tfrac\theta2|0\rangle+e^{i\varphi}\sin\tfrac\theta2|1\rangle$ lives on the Bloch sphere (shown as a circle in the X–Z plane). Apply gates (X, H, Z, S) and read the measurement probabilities $|\alpha|^2,\,|\beta|^2$.

state|0⟩
$P(0)=|\alpha|^2$1.00
$P(1)=|\beta|^2$0.00

X flips, H makes superposition, Z/S add phase.