In a general aspect, a position tracking system includes a sphere magnet that produces a magnetic field in a space. A magnetic field control system is configured to change the magnetic field by rotating the sphere magnet through a time-series of rotations over a time period. A position marker includes a magnetic field sensor that is configured to measure the magnetic field in the space during the time period. A data processing apparatus is configured to determine the position of the position marker based on magnetic field measurements obtained by the magnetic field sensor in the space during the time period.