Draw barrels properly

This commit is contained in:
2025-06-14 23:38:46 +01:00
parent 078a3cc7ea
commit 3f9b76b8d0
3 changed files with 19 additions and 14 deletions
+2 -2
View File
@@ -42,7 +42,7 @@ import Geometry
import qualified Quaternion as Q
import Shape.Data
-- - approximate a circle by a polygon with n*2 points of radius x
-- - approximate a circle around the z axis by a polygon with n*2 points of radius x
polyCirc :: Int -> Float -> [Point2]
{-# INLINE polyCirc #-}
polyCirc n x = map (\a -> rotateV a (V2 x 0)) $ take (n * 2) [0, pi / fromIntegral n ..]
@@ -120,9 +120,9 @@ upperPrismPolyTS :: Float -> [Point2] -> Shape
upperPrismPolyTS = upperPrismPoly Tiny Superfluous
upperPrismPoly ::
-- | height, expected to be strictly positive
Size ->
Importance ->
-- | height, expected to be strictly positive
Float ->
-- | Should be anticlockwise
[Point2] ->