generative-art-0.1.0.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

Physics

Documentation

data PhaseSpace Source #

Constructors

PhaseSpace 

Fields

newtype NBody a Source #

Constructors

NBody 

Fields

Instances

Instances details
Foldable NBody Source # 
Instance details

Defined in Physics

Methods

fold :: Monoid m => NBody m -> m #

foldMap :: Monoid m => (a -> m) -> NBody a -> m #

foldMap' :: Monoid m => (a -> m) -> NBody a -> m #

foldr :: (a -> b -> b) -> b -> NBody a -> b #

foldr' :: (a -> b -> b) -> b -> NBody a -> b #

foldl :: (b -> a -> b) -> b -> NBody a -> b #

foldl' :: (b -> a -> b) -> b -> NBody a -> b #

foldr1 :: (a -> a -> a) -> NBody a -> a #

foldl1 :: (a -> a -> a) -> NBody a -> a #

toList :: NBody a -> [a] #

null :: NBody a -> Bool #

length :: NBody a -> Int #

elem :: Eq a => a -> NBody a -> Bool #

maximum :: Ord a => NBody a -> a #

minimum :: Ord a => NBody a -> a #

sum :: Num a => NBody a -> a #

product :: Num a => NBody a -> a #

Traversable NBody Source # 
Instance details

Defined in Physics

Methods

traverse :: Applicative f => (a -> f b) -> NBody a -> f (NBody b) #

sequenceA :: Applicative f => NBody (f a) -> f (NBody a) #

mapM :: Monad m => (a -> m b) -> NBody a -> m (NBody b) #

sequence :: Monad m => NBody (m a) -> m (NBody a) #

Applicative NBody Source # 
Instance details

Defined in Physics

Methods

pure :: a -> NBody a #

(<*>) :: NBody (a -> b) -> NBody a -> NBody b #

liftA2 :: (a -> b -> c) -> NBody a -> NBody b -> NBody c #

(*>) :: NBody a -> NBody b -> NBody b #

(<*) :: NBody a -> NBody b -> NBody a #

Functor NBody Source # 
Instance details

Defined in Physics

Methods

fmap :: (a -> b) -> NBody a -> NBody b #

(<$) :: a -> NBody b -> NBody a #

Show a => Show (NBody a) Source # 
Instance details

Defined in Physics

Methods

showsPrec :: Int -> NBody a -> ShowS #

show :: NBody a -> String #

showList :: [NBody a] -> ShowS #

VectorSpace a => VectorSpace (NBody a) Source # 
Instance details

Defined in Physics

Methods

(+.) :: NBody a -> NBody a -> NBody a Source #

(-.) :: NBody a -> NBody a -> NBody a Source #

(*.) :: Double -> NBody a -> NBody a Source #

(/.) :: NBody a -> Double -> NBody a Source #

zero :: NBody a Source #

negateV :: NBody a -> NBody a Source #

Eq a => Eq (NBody a) Source # 
Instance details

Defined in Physics

Methods

(==) :: NBody a -> NBody a -> Bool #

(/=) :: NBody a -> NBody a -> Bool #

nBody Source #

Arguments

:: (Vec2 -> Double)

External potential, affecting all particles. If you don't require an external potential, use zero.

-> (Vec2 -> Vec2 -> Double)

Interaction term between two particles. Should be symmetric.

-> NBody Double

Particle masses

-> NBody PhaseSpace 
-> NBody PhaseSpace