From: Jan G. <goy...@te...> - 2008-04-21 21:15:35
|
Hi Cliff, No Java code at hand, but in pseudo code this should basically look like this: for angle = 0 to 359 step 1 do x = centerX + raduis * sine(angle) y = centerY + radius * cosine(angle) done (Decrease the step value of the for loop to make it look smoother.) This is assuming the coordinate reference system is carthesian. The projection you'll use for the map is of importance too. As it might not display the geometry as a round circle. Jan On Mon, 21 Apr 2008 20:16:16 +0100 "Cliff Darling" <cli...@gm...> wrote: > Does anyone have a code snippet for creating a polygon that represents a > circle around a center point with a given radius? > > Thanks, > > Cliff > -- Jan Goyvaerts <goy...@te...> |