1. A method comprising: determining a locus of positions of a first ultrasonic transmitter in an electronic stylus relative to a given reference point; determining a locus of positions of a second ultrasonic transmitter in the electronic stylus relative to the given reference point; and determining a position of a writing tip in the electronic stylus relative to the given reference point using the determined locus of positions of the first ultrasonic transmitter, determined locus of positions of the second ultrasonic transmitter, and relative positions of the first ultrasonic transmitter, the second ultrasonic transmitter, and the writing tip within the stylus, wherein determining the locus of positions of the first ultrasonic transmitter comprises: emitting an electromagnetic signal from an electromagnetic transmitter in the electronic stylus; receiving the electromagnetic signal at a first electromagnetic receiver; emitting an ultrasonic signal from the first ultrasonic transmitter; receiving the ultrasonic signal at a first ultrasonic receiver, wherein the electromagnetic signal specifies from which of the first and second ultrasonic transmitters the received ultrasonic signal was emitted; and calculating a distance (d 11 ) between the first ultrasonic transmitter and the first ultrasonic receiver based on a difference in time between when the electromagnetic signal was received and when the ultrasonic signal was received, wherein the first ultrasonic transmitter and the second ultrasonic transmitter alternately transmit ultrasonic signals indicating that the writing tip is in contact with a writing material.