Add more sounds
This commit is contained in:
+9
-7
@@ -17,6 +17,7 @@ module Geometry
|
||||
, module Geometry.Vector3D
|
||||
, module Geometry.LHS
|
||||
, module Geometry.Polygon
|
||||
, loopPairs
|
||||
) where
|
||||
import Geometry.Data
|
||||
import Geometry.Polygon
|
||||
@@ -25,10 +26,11 @@ import Geometry.Bezier
|
||||
import Geometry.Vector
|
||||
import Geometry.Vector3D
|
||||
import Geometry.LHS
|
||||
import ListHelp
|
||||
--import Geometry.ConvexPoly
|
||||
|
||||
--import Data.Maybe
|
||||
import Data.List
|
||||
--import Data.List
|
||||
-- | Return a point a distance away from a first point towards a second point.
|
||||
-- Does not go past the second point.
|
||||
alongSegBy :: Float -> Point2 -> Point2 -> Point2
|
||||
@@ -122,6 +124,7 @@ polyToTris'' _ = []
|
||||
|
||||
polyToTris :: [s] -> [s]
|
||||
{-# INLINABLE polyToTris #-}
|
||||
--polyToTris (x:xs) = foldr (f x) [] $ foldPairs xs
|
||||
polyToTris (x:xs) = foldr (f x) [] $ zip xs $ tail xs
|
||||
where
|
||||
f a (b,c) ls = a:b:c:ls
|
||||
@@ -133,9 +136,8 @@ polyToTris' [] = []
|
||||
polyToTris' (a:as) = prependTwo a as
|
||||
|
||||
prependTwo :: a -> [a] -> [a]
|
||||
prependTwo _ [] = []
|
||||
prependTwo _ [_] = []
|
||||
prependTwo sep (x:y:xs) = sep : x : y : prependTwo sep (y:xs)
|
||||
prependTwo _ _ = []
|
||||
|
||||
-- | Return n equidistant points on a circle with a radius of 600.
|
||||
nRays :: Int -> [Point2]
|
||||
@@ -307,10 +309,10 @@ chainPairs xs = zip xs $ tail xs
|
||||
|
||||
-- | Given a list of points, returns pairs of points linking the points into a
|
||||
-- loop.
|
||||
loopPairs :: [a] -> [(a,a)]
|
||||
loopPairs [] = error "tried to make loop with empty list of elements"
|
||||
loopPairs [_] = error "tried to make loop with singleton list of elements"
|
||||
loopPairs (x:xs) = zip (x:xs) (xs ++ [x])
|
||||
--loopPairs :: [a] -> [(a,a)]
|
||||
--loopPairs [] = error "tried to make loop with empty list of elements"
|
||||
--loopPairs [_] = error "tried to make loop with singleton list of elements"
|
||||
--loopPairs (x:xs) = zip (x:xs) (xs ++ [x])
|
||||
-- | Test whether a point is in a cone.
|
||||
-- Note the pair is ordered.
|
||||
-- Doesn't work for obtuse angles.
|
||||
|
||||
Reference in New Issue
Block a user