Virtual reality (source code)

= Virtual reality

<Virtual reality> presents an interactive simulated environment whose sensory output responds to a user's actions and viewpoint. A <head-mounted display> commonly renders a separate view for each eye and tracks head pose. For a <rigid transformation>[rigid] world point $p$, the current view transform maps $p$ into eye coordinates before <perspective projection>; updating that transform as the head moves makes stationary simulated objects appear fixed in the surrounding space.

The <latency> between movement and the corresponding displayed view matters: stale head pose makes the scene appear to lag behind the observer. Tracking, rendering, display timing and input handling therefore form one feedback loop. A simple experiment is to turn the head while viewing a virtual grid: incorrect orientation updates make the grid move with the head instead of remaining anchored. <WebXR> exposes per-frame viewer poses and eye views through explicit reference spaces, illustrating how a graphics application connects simulated geometry to tracked physical motion.<WebXR Device API by World Wide Web Consortium>[XRViewerPose, XRView and reference spaces]{ref}