Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

LISP [Part 6]

Name: Anonymous 2008-06-08 17:09

LISP

Name: Anonymous 2008-06-16 16:35

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


Hello, Christopher.

Newer Posts