learn-physics-0.6.2: Haskell code for learning physics

Copyright(c) Scott N. Walck 2012-2018
LicenseBSD3 (see LICENSE)
MaintainerScott N. Walck <walck@lvc.edu>
Stabilityexperimental
Safe HaskellSafe
LanguageHaskell98

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

normalizeCurve :: Curve -> Curve Source #

Reparametrize a curve from 0 to 1.

concatCurves Source #

Arguments

:: Curve

go first along this curve

-> Curve

then along this curve

-> Curve

to produce this new curve

Concatenate two curves.

concatenateCurves :: [Curve] -> Curve Source #

Concatenate a list of curves. Parametrizes curves equally.

reverseCurve :: Curve -> Curve Source #

Reverse a curve.

evalCurve Source #

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.

shiftCurve Source #

Arguments

:: Displacement

amount to shift

-> Curve

original curve

-> Curve

shifted curve

Shift a curve by a displacement.

straightLine Source #

Arguments

:: Position

starting position

-> Position

ending position

-> Curve

straight-line curve

The straight-line curve from one position to another.

Line Integrals

simpleLineIntegral Source #

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.

dottedLineIntegral Source #

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

A dotted line integral. Convenience function for compositeSimpsonDottedLineIntegral.

crossedLineIntegral Source #

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

Calculates integral vf x dl over curve. Convenience function for compositeSimpsonCrossedLineIntegral.

compositeTrapezoidDottedLineIntegral Source #

Arguments

:: Int

number of intervals

-> VectorField

vector field

-> Curve

curve to integrate over

-> Double

scalar result

A dotted line integral, performed in an unsophisticated way.

compositeTrapezoidCrossedLineIntegral Source #

Arguments

:: Int

number of intervals

-> VectorField

vector field

-> Curve

curve to integrate over

-> Vec

vector result

Calculates integral vf x dl over curve in an unsophisticated way.

compositeSimpsonDottedLineIntegral Source #

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.

compositeSimpsonCrossedLineIntegral Source #

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.