Remove Gloss visualization
This commit is contained in:
parent
436823628e
commit
c3e61f6448
2 changed files with 0 additions and 38 deletions
37
app/Main.hs
37
app/Main.hs
|
@ -8,8 +8,6 @@ import Linear.V3
|
||||||
import System.Random
|
import System.Random
|
||||||
import Control.Monad (replicateM)
|
import Control.Monad (replicateM)
|
||||||
|
|
||||||
--import Graphics.Gloss hiding (Point)
|
|
||||||
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
-- Random body generation
|
-- Random body generation
|
||||||
|
@ -83,38 +81,3 @@ main = do
|
||||||
bodies <- replicateM 100 randomBody
|
bodies <- replicateM 100 randomBody
|
||||||
putStrLn $ csvFromInit 10000 (60*20) 0.5 bodies
|
putStrLn $ csvFromInit 10000 (60*20) 0.5 bodies
|
||||||
|
|
||||||
{-
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
-- Gloss
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
width, height, offset :: Int
|
|
||||||
width = 1000
|
|
||||||
height = 750
|
|
||||||
offset = 100
|
|
||||||
|
|
||||||
window :: Display
|
|
||||||
window = InWindow "Orbit" (width, height) (offset, offset)
|
|
||||||
|
|
||||||
displayBody :: Body -> Picture
|
|
||||||
displayBody b = translate (realToFrac x) (realToFrac y) $ circle (realToFrac (bodyRadius b))
|
|
||||||
where P (V3 x y _) = bodyPosition b
|
|
||||||
|
|
||||||
displayBodies :: [Body] -> Picture
|
|
||||||
displayBodies = color white . Pictures . map displayBody
|
|
||||||
|
|
||||||
drawing :: Picture
|
|
||||||
drawing = color white $ circle 80
|
|
||||||
|
|
||||||
main :: IO ()
|
|
||||||
main = do
|
|
||||||
bodies <- replicateM 300 randomBody
|
|
||||||
simulate
|
|
||||||
window
|
|
||||||
black
|
|
||||||
25
|
|
||||||
bodies
|
|
||||||
displayBodies
|
|
||||||
(\_ dt bs -> updateAll (realToFrac dt*1e6) bs)
|
|
||||||
|
|
||||||
-}
|
|
||||||
|
|
|
@ -29,7 +29,6 @@ executable orbit-exe
|
||||||
, orbit
|
, orbit
|
||||||
, linear
|
, linear
|
||||||
, random
|
, random
|
||||||
--, gloss
|
|
||||||
default-language: Haskell2010
|
default-language: Haskell2010
|
||||||
|
|
||||||
test-suite orbit-test
|
test-suite orbit-test
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue