Use rounded shapes instead of TopPrism

This commit is contained in:
2023-03-17 01:05:41 +00:00
parent 539cbe8b18
commit 6425ef3f0a
7 changed files with 73 additions and 65 deletions
+16 -17
View File
@@ -9,8 +9,8 @@ module ShapePicture
, noShape
-- , _spShape
-- , _spPicture
, mirrorSPyz
, mirrorSPxz
-- , mirrorSPyz
-- , mirrorSPxz
, overPosSP
) where
import ShapePicture.Data
@@ -19,10 +19,7 @@ import Picture
import Geometry
import Data.Bifunctor
import Control.Lens
shMap :: (Surface -> Surface) -> Shape -> Shape
shMap = map
--import Control.Lens
-- should all this be inlined/inlinable?
noPic :: Shape -> SPic
@@ -61,14 +58,16 @@ rotateSP :: Float -> SPic -> SPic
{-# INLINE rotateSP #-}
rotateSP a = bimap (rotateSH a) (rotate a)
mirrorSPxz :: SPic -> SPic
{-# INLINE mirrorSPxz #-}
mirrorSPxz = bimap (shMap (over sfVs reverse) . overPosSH flipy) mirrorxz
where
flipy (V3 x y z) = V3 x (negate y) z
mirrorSPyz :: SPic -> SPic
{-# INLINE mirrorSPyz #-}
mirrorSPyz = bimap (shMap (over sfVs reverse) . overPosSH flipx) mirroryz
where
flipx (V3 x y z) = V3 (negate x) y z
-- Be careful when mirroring: remember the first vertices may indicate the
-- center of the object or other guides
--mirrorSPxz :: SPic -> SPic
--{-# INLINE mirrorSPxz #-}
--mirrorSPxz = bimap (map (over sfVs reverse) . overPosSH flipy) mirrorxz
-- where
-- flipy (V3 x y z) = V3 x (negate y) z
--
--mirrorSPyz :: SPic -> SPic
--{-# INLINE mirrorSPyz #-}
--mirrorSPyz = bimap (map (over sfVs reverse) . overPosSH flipx) mirroryz
-- where
-- flipx (V3 x y z) = V3 (negate x) y z