Add simple high pipes

This commit is contained in:
2021-06-21 16:29:24 +02:00
parent 04ed034a3e
commit c2297cd114
8 changed files with 54 additions and 12 deletions
+14
View File
@@ -40,3 +40,17 @@ wedgeOfThickness t x y
]
where
n a b = (t*0.5) *.* errorNormalizeV 4200 (vNormal (a -.- b))
verticalPipe :: Float -> Color -> Point2 -> Float -> Float -> Picture
verticalPipe w col (xx,xy) za zb = pictures $ map (poly3D . f) ps
where
x = (xx,xy,0)
xs = map (\(a,b) -> x +.+.+ (a,b,za)) [(w,0),(0,w),(-w,0),(0,-w)]
ps = zip xs (tail xs ++ [head xs])
f (a,b) = map f' [a,b,g b,g a]
g :: Point3 -> Point3
g (a,b,_) = (a,b,zb)
f' a = (a,col)
thickLinePlane :: Float -> Point3 -> Point3 -> Point3 -> [Point3]
thickLinePlane = undefined