Initial pass at shadows from level geometry

This commit is contained in:
2021-06-29 15:27:26 +02:00
parent 089dcc3f5d
commit 3d16c33d33
20 changed files with 181 additions and 74 deletions
+7 -7
View File
@@ -8,6 +8,7 @@ import Geometry
import Geometry.Data
import Geometry.Vector3D
import Polyhedra
import Polyhedra.Data
import Data.List
import Data.Maybe
@@ -47,14 +48,13 @@ diagonalLinesRect pa pb w d ang = zip lhsPoints $ map findDiPoint lhsPoints
]
yN = d * 0.5 *.* normalizeV (pa -.- pb)
highPipe :: Point2 -> Point2 -> Picture
highPipe x@(xx,xy) y = pictures
--[color orange . pictures . map (poly3D . map ( ( , black) . ( +.+.+ (x,y,50)))) $ boxXYZ
[ color orange . pictures . map (poly3D . map ( (,black) . (+.+.+ (xx,xy,50))))
highPipe :: Point2 -> Point2 -> [Polyhedra]
highPipe x@(xx,xy) y =
[ Polyhedron . map (map ( (,orange) . (+.+.+ (xx,xy,50))))
$ boxABC (a,b,0) (a',b',0) (0,0,10)
,verticalPipe 5 orange x 0 100
,verticalPipe 5 orange y 0 100
,verticalPipe 5 orange (0.5 *.* (x +.+ y)) 50 100
-- ,verticalPipe 5 orange x 0 100
-- ,verticalPipe 5 orange y 0 100
-- ,verticalPipe 5 orange (0.5 *.* (x +.+ y)) 50 100
]
where
(a,b) = y -.- x