An AR surgical navigation system fuses optical or electromagnetic tracking of a probe's pose with a pre-operative 3D model, projecting a virtual target and trajectory guide directly onto the surgeon's view. The scene here places the probe at a point on a sphere of fixed radius around a subsurface target, oriented by the azimuth/elevation you set, then advances it inward as you increase insertion depth.
Real trackers never report a perfect pose — sensor jitter and registration error add noise to every frame. That noise is modelled here as a small random perturbation of the probe's forward axis, which is what actually produces the alignment error and confidence you see, not a cosmetic wobble.
P = T + R·(cosφ cosθ, sinφ, cosφ sinθ) // probe position
d_ideal = normalize(T - P) // ideal aim vector
d_actual = normalize(d_ideal + η·N(0,1)) // tracker-noisy aim, η = noise level
ε = arccos(d_ideal · d_actual) · 180/π // alignment error, degrees
conf = 100 · exp(-0.35 · η²) // tracking confidence, %
- Approach Azimuth / Elevation — orbit the probe's entry point around the target on the tracking sphere.
- Insertion Depth — advances the probe tip from skin surface toward the target along the aim vector.
- Tracking Noise — simulates marker/registration jitter (η), degrading alignment error and confidence.
- AR Overlay — toggles the projected trajectory line, target reticle and feature-point cloud.
- Auto-Scan — sweeps a clipping plane through the torso to reveal skin, muscle and organ layers, as a CT/MRI-fused AR scan would.
This mirrors real systems like HoloLens-guided neurosurgery or laparoscopic AR overlays, where sub-millimetre alignment error and quantified tracking confidence determine whether a projected guide is trustworthy enough to operate by.