Working shadows from foreground, not optimised

This commit is contained in:
2021-06-29 16:47:16 +02:00
parent 3d16c33d33
commit 3056e6384b
6 changed files with 23 additions and 16 deletions
+5
View File
@@ -1,5 +1,6 @@
module Polyhedra
where
import Geometry
import Geometry.Data
import Geometry.Vector3D
import Polyhedra.Data
@@ -90,5 +91,9 @@ polysToPic = pictures . concatMap polyToPics
polyToEdges :: Polyhedra -> [(Point3,Point3,Point3,Point3)]
polyToEdges = constructEdges . map (map fst) . _pyFaces
-- rendering for silhouette
polyToRender :: Polyhedra -> [RenderType]
polyToRender = map Render3 . map flat4 . polyToEdges
-- rendering for shape
polyToGeoRender :: Polyhedra -> [RenderType]
polyToGeoRender = map (Render3 . polyToTris . map fst) . _pyFaces