Name: Anonymous 2008-06-08 17:09
LISP
circlePts r a b n = map (\x -> (r*cos(x/n*pi)+a, r*sin(x/n*pi)+b, 0.0)) [-n..n]
ringPts o i a b n = concat$map (\(x,y) -> [x,y]) $ zip (circlePts o a b n) (circlePts i a b n)
starPts r x y n = o++i
where
(o,i) = partition (\(x,_) -> odd x)
$zip [1,2..]
$circlePts r x y n