
Drawing and Writing • Chapter 23 451
Actually you know the ∆O
R
you want to get, it corresponds to the desired
turning angle of the turtle, and it’s the input to your subroutine.What you’re
looking for is the Count of the rotation sensor that produces that ∆O
R
.The first
step is to obtain T from the previous equation:
T = ∆O
R
x B / 2
As Count corresponds to T / F, you get:
Count = (∆O
R
x B / 2) / F = ∆O
R
x B / 2F
Here is where you convert radians to degrees, using the following formula:
∆O
R
= ∆O
D
x π / 180
Applying the conversion to the previous equation for Count, the new expres-
sion becomes:
Count = (∆O
D
x π / 180) x B / 2F = ∆O
D
x π x B / (360 x F)
In our tur