When θ = 0 radians, the right angle of the triangle is at the right end of the semicircle. When θ = π radians = 180°, the right angle of the triangle is at the left end of the semicircle. Initially, &theta = π/2 radians = 90°.
main.m
PythagorasAppDelegate
View
setNeedsDisplay
method of the
View
.
To make this happen over and over,
create either a
CADisplayLink
or a
NSTimer
as shown in
this example.