I tried to plot a hexagon using draw-polygon, here a hexagon is defined six vertices
(defparameter hexagon
(list (sdl:point :x (* -10 (cos (/ pi 6))) :y -5)
(sdl:point :x (* -10 (cos (/ pi 6))) :y 5)
(sdl:point :x 0 :y 10)
(sdl:point :x (* 10 (cos (/ pi 6))) :y 5)
(sdl:point :x (* 10 (cos (/ pi 6))) :y -5)
(sdl:point :x 0 :y -10)))
When I called (sdl:draw-polygon hexagon), I expected to have a close hexagon. However,
one of computer gave me close hexagon and another gave me a open hexagon that
one of edges was missing.
Also, when I called (sdl:draw-filled-polygon hexagon), one gave me what I want and another
drew nothing at all. So I'm wondering whether my code is not rigorous or it is a bug.
Could someone tell me what's going on? Thanks a lot.