It looks like you working with simple planar geometry - ie on a flat
surface. Whereas the earth is a sphere (or an approximation of one)
So you need more advanced maths, to be honest its beyond me, so cant
actully help you, but know of plenty of circle plotting code, maybe
you can combine in the above equations?
http://www.google.com/search?q=kml+circle