Draw a regular polygon The goal of this code golf is to draw a regular polygon (one with equal side lengths) given the number of sides and radius (distance from center to vertex).


The number of sides and the radius can be entered via a file, STDIN, or just a plain old variable. Use whatever is shorter in your language. 
-25% of total characters/bytes if the image is actually drawn instead of ASCII art.
LOGO 37 - 25% = 27.75 (with variables)

REPEAT:S[FD:R*2*sin(180/:S)RT 360/:S]


LOGO 49 - 25% = 36.75 (as a function)

TO P:R:S REPEAT:S[FD:R*2*sin(180/:S)RT 360/:S]END


Triangle 

Called with variables

Make "R 100
Make "S 3
REPEAT:S[FD:R*2*sin(180/:S)RT 360/:S]


Used as a function P 100 3



Square 

Called with variables

Make "R 100
Make "S 4
REPEAT:S[FD:R*2*sin(180/:S)RT 360/:S]


Used as a function P 100 4



Pentagon

Called with variables

Make "R 100
Make "S 5
REPEAT:S[FD:R*2*sin(180/:S)RT 360/:S]


Used as a function P 100 5



Decagon 

Called with variables

Make "R 100
Make "S 10
REPEAT:S[FD:R*2*sin(180/:S)RT 360/:S]


Used as a function P 100 10



Circle 

Called with variables

Make "R 100
Make "S 360
REPEAT:S[FD:R*2*sin(180/:S)RT 360/:S]


Used as a function P 100 360