learn-physics-0.4.3: Haskell code for learning physics

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

Physics.Learn.Surface

Contents

Description

This module contains functions for working with Surfaces and surface integrals over Surfaces.

Synopsis

Surfaces

data Surface Source

Surface is a parametrized function from two parameters to space, lower and upper limits on the first parameter, and lower and upper limits for the second parameter (expressed as functions of the first parameter).

Constructors

Surface 

Fields

surfaceFunc :: (Double, Double) -> Position

function from two parameters (s,t) into space

lowerLimit :: Double

s_l

upperLimit :: Double

s_u

lowerCurve :: Double -> Double

t_l(s)

upperCurve :: Double -> Double

t_u(s)

unitSphere :: SurfaceSource

A unit sphere, centered at the origin.

centeredSphere :: Double -> SurfaceSource

A sphere with given radius centered at the origin.

sphere :: Double -> Position -> SurfaceSource

Sphere with given radius and center.

northernHemisphere :: SurfaceSource

The upper half of a unit sphere, centered at the origin.

disk :: Double -> SurfaceSource

A disk with given radius, centered at the origin.

shiftSurface :: Displacement -> Surface -> SurfaceSource

Shift a surface by a displacement.

Surface Integrals

surfaceIntegralSource

Arguments

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

number of intervals for first parameter, s

-> Int

number of intervals for second parameter, t

-> Field v

the scalar or vector field to integrate

-> Surface

the surface over which to integrate

-> v

the resulting scalar or vector

A plane surface integral, in which area element is a scalar.

dottedSurfaceIntegralSource

Arguments

:: Int

number of intervals for first parameter, s

-> Int

number of intervals for second parameter, t

-> VectorField

the vector field to integrate

-> Surface

the surface over which to integrate

-> Double

the resulting scalar

A dotted surface integral, in which area element is a vector.