mirror of
https://github.com/Haskell-Things/ImplicitCAD.git
synced 2024-09-17 16:08:01 +03:00
fmap instead of map.
This commit is contained in:
parent
6afe354619
commit
bb3893fdfe
@ -10,12 +10,12 @@ object2 = squarePipe (10,10,10) 1 100
|
||||
squarePipe :: (ℝ,ℝ,ℝ) -> ℝ -> ℝ -> SymbolicObj3
|
||||
squarePipe (x,y,z) diameter precision =
|
||||
union
|
||||
$ map (\start-> translate start
|
||||
$ fmap (\start-> translate start
|
||||
$ rect3R 0 (0,0,0) (diameter,diameter,diameter)
|
||||
)
|
||||
$ zip3 (map (\n->(fromIntegral n/precision)*x) [0..100])
|
||||
(map (\n->(fromIntegral n/precision)*y) [0..100])
|
||||
(map (\n->(fromIntegral n/precision)*z) [0..100])
|
||||
$ zip3 (fmap (\n->(fromIntegral n/precision)*x) [0..100])
|
||||
(fmap (\n->(fromIntegral n/precision)*y) [0..100])
|
||||
(fmap (\n->(fromIntegral n/precision)*z) [0..100])
|
||||
|
||||
main = writeSTL 1 "example17.stl" object2
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user