learn-physics-0.4.3: Haskell code for learning physics

Stabilityexperimental
MaintainerScott N. Walck <walck@lvc.edu>
Safe HaskellTrustworthy

Physics.Learn.Curve

Contents

Description

This module contains functions for working with Curves and line integrals along Curves.

Synopsis

Curves

data Curve Source

Curve is a parametrized function into three-space, an initial limit, and a final limit.

Constructors

Curve 

Fields

curveFunc :: Double -> Position

function from one parameter into space

startingCurveParam :: Double

starting value of the parameter

endingCurveParam :: Double

ending value of the parameter

normalizeCurve :: Curve -> CurveSource

Reparametrize a curve from 0 to 1.

concatCurvesSource

Arguments

:: Curve

go first along this curve

-> Curve

then along this curve

-> Curve

to produce this new curve

Concatenate two curves.

concatenateCurves :: [Curve] -> CurveSource

Concatenate a list of curves. Parametrizes curves equally.

reverseCurve :: Curve -> CurveSource

Reverse a curve.

evalCurveSource

Arguments

:: Curve

the curve

-> Double

the parameter

-> Position

position of the point on the curve at that parameter

Evaluate the position of a curve at a parameter.

shiftCurveSource

Arguments

:: Displacement

amount to shift

-> Curve

original curve

-> Curve

shifted curve

Shift a curve by a displacement.

straightLineSource

Arguments

:: Position

starting position

-> Position

ending position

-> Curve

straight-line curve

The straight-line curve from one position to another.

Line Integrals

simpleLineIntegralSource

Arguments

:: (InnerSpace v, Scalar v ~ Double) 
=> Int

number of intervals

-> Field v

scalar or vector field

-> Curve

curve to integrate over

-> v

scalar or vector result

Calculates integral f dl over curve, where dl is a scalar line element.

dottedLineIntegralSource

Arguments

:: Int

number of intervals

-> VectorField

vector field

-> Curve

curve to integrate over

-> Double

scalar result

A dotted line integral.

crossedLineIntegralSource

Arguments

:: Int

number of intervals

-> VectorField

vector field

-> Curve

curve to integrate over

-> Vec

vector result

Calculates integral vf x dl over curve.

compositeSimpsonDottedLineIntegralSource

Arguments

:: Int

number of half-intervals (one less than the number of function evaluations

-> VectorField

vector field

-> Curve

curve to integrate over

-> Double

scalar result

Quadratic approximation to vector field. Quadratic approximation to curve. Composite strategy. Dotted line integral.

compositeSimpsonCrossedLineIntegralSource

Arguments

:: Int

number of half-intervals (one less than the number of function evaluations

-> VectorField

vector field

-> Curve

curve to integrate over

-> Vec

vector result

Quadratic approximation to vector field. Quadratic approximation to curve. Composite strategy. Crossed line integral.