Add laser tunnel lock-key combination

This commit is contained in:
2022-03-09 15:27:35 +00:00
parent a4ec4e4889
commit 3bfebc266b
11 changed files with 104 additions and 75 deletions
+11
View File
@@ -21,6 +21,17 @@ rectNSWE !n !s !w !e = [V2 w n, V2 w s, V2 e s, V2 e n]
rectWH :: Float -> Float -> [Point2]
rectWH w h = rectNSWE h (-h) (-w) w
isotriBWH :: Point2 -> Float -> Float -> [Point2]
isotriBWH (V2 x y) w h = [V2 (x-w) y, V2 (x+w) y, V2 x (y+h)]
-- trapezion
trapezionBWHW :: Point2 -> Float -> Float -> Float -> [Point2]
trapezionBWHW (V2 x y) w1 h w2 =
[ V2 (x-w1) y
, V2 (x+w1) y
, V2 (x+w2) (y+h)
, V2 (x-w2) (y+h)]
rectXH :: Float -> Float -> [Point2]
rectXH x h = rectNSWE h (-h) 0 x