This commit is contained in:
2023-05-20 15:06:05 +01:00
parent 6c71e1d5bb
commit f2183e9954
25 changed files with 69 additions and 86 deletions
+2 -2
View File
@@ -9,7 +9,7 @@ import Picture
wedgeOfThickness :: Float -> Point2 -> Point2 -> Picture
wedgeOfThickness t x y
| x == y = blank
| otherwise = pictures
| otherwise = fold
[uncurryV translate x $ circleSolid (0.5*t)
,polygon [x +.+ n x y, x -.- n x y, y]
]
@@ -17,7 +17,7 @@ wedgeOfThickness t x y
n a b = (t*0.5) *.* errorNormalizeV 4200 (vNormal (a -.- b))
verticalPipe :: Float -> Color -> Point2 -> Float -> Float -> Picture
verticalPipe w col (V2 xx xy) za zb = pictures $ map (poly3Col . f) ps
verticalPipe w col (V2 xx xy) za zb = foldMap (poly3Col . f) ps
where
x = V3 xx xy 0
xs = map ((\(V2 a b) -> x +.+.+ V3 a b za) . toV2) [(w,0),(0,w),(-w,0),(0,-w)]