Add line shadow shader

This commit is contained in:
2021-06-26 22:20:41 +02:00
parent 726cd425f2
commit 06f22a3ea5
21 changed files with 128 additions and 74 deletions
+8 -8
View File
@@ -46,15 +46,15 @@ diagonalLinesRect pa pb w d ang = zip lhsPoints $ map findDiPoint lhsPoints
highPipe :: Point2 -> Point2 -> Picture
highPipe x y = pictures
[setDepth (-0.2) $ thickLine [x,y] 10
,setDepth (-0.19) $ color orange $ thickLine [x,y] 10
,verticalPipe 5 orange x 0 (-0.2)
,verticalPipe 5 orange y 0 (-0.2)
,verticalPipe 5 orange (0.5 *.* (x +.+ y)) (-0.1) (-0.2)
[setDepth 100 $ thickLine [x,y] 10
,setDepth 90 $ color orange $ thickLine [x,y] 10
,verticalPipe 5 orange x 0 100
,verticalPipe 5 orange y 0 100
,verticalPipe 5 orange (0.5 *.* (x +.+ y)) 50 100
]
girderZ :: Float -> Point2 -> Point2 -> Picture
girderZ w x y = setDepth (-0.1) $ color red $ pictures $
girderZ w x y = setDepth 50 $ color red $ pictures $
[ thickLine [xt,yt] 3
, thickLine [xb,yb] 3
]
@@ -70,7 +70,7 @@ girderZ w x y = setDepth (-0.1) $ color red $ pictures $
ps' = map (\p -> intersectSegLine' xt yt p (p +.+ dia)) ps
ls = catMaybes $ zipWith (fmap . (,)) ps ps'
girderV :: Color -> Float -> Point2 -> Point2 -> Picture
girderV col w x y = setDepth (-0.1) $ color col $ pictures $
girderV col w x y = setDepth 50 $ color col $ pictures $
[ thickLine [xt,yt] 3
, thickLine [xb,yb] 3
]
@@ -89,7 +89,7 @@ girderV col w x y = setDepth (-0.1) $ color col $ pictures $
bs' = catMaybes $ zipWith (fmap . (,)) as $ f (3*pi/4) as
girder :: Color -> Float -> Point2 -> Point2 -> Picture
girder col w x y = pictures $
setDepth (-0.1) (color col $ pictures $
setDepth 50 (color col $ pictures $
[ thickLine [xt,yt] 3
, thickLine [xb,yb] 3
]