From b04ae8759b513c1a2e162c2009eb1fd328f54cac Mon Sep 17 00:00:00 2001 From: nek0 Date: Sun, 8 Jul 2018 07:56:13 +0200 Subject: [PATCH] removing unneeded code --- src/MindMap.hs | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/MindMap.hs b/src/MindMap.hs index 142a975..38b448b 100644 --- a/src/MindMap.hs +++ b/src/MindMap.hs @@ -134,23 +134,6 @@ manhattan graph input = (M.safeGet (r + 1) c mat /= Just Wall) = M.setElem Wall (r, c) mat | otherwise = mat -calculDelta :: AG.Graph MMNode -> MMNode -> (Int, V2 Double) -calculDelta graph node = - let accel = foldl sproing (V2 0 0 :: V2 Double) (vertexList graph) - sproing acc a - | mmId a == mmId node = - acc + V2 0 0 - | a `elem` map snd (filter ((== node) . fst) $ edgeList graph) = - acc + fmap (* (springKonst * (distance (mmPos a) (mmPos node) - l0))) - (normv (mmPos a - mmPos node)) - | node `elem` map snd (filter ((== a) . fst) $ edgeList graph) = - acc - fmap (* (springKonst * (distance (mmPos a) (mmPos node) - l0))) - (normv (mmPos node - mmPos a)) - | otherwise = - acc - fmap (* (1000 / ((distance (mmPos node) (mmPos a)) ^ (2 :: Int)))) - (normv (mmPos a - mmPos node)) - in (mmId node, fmap (* friction) accel) - calculDelta2 :: AG.Graph MMNode -> [(Int, V2 Double)] calculDelta2 graph = let accel2 = sproing2 (zip (vertexList graph) (repeat $ V2 0 0))