ianmackenzie/elm-geometry/1.0.0

NOTE: this package is not compatible with Elm 0.19.1

Sphere3d

Sphere3d

A Sphere3d is defined by its center point and radius. This module contains functionality for:

  • Constructing spheres through points
  • Scaling, rotating and translating spheres
  • Extracting sphere properties like center point and volume
type alias Sphere3d =
Sphere3d

Constants

unit : Sphere3d

Constructors

withRadius : Float -> Point3d -> Sphere3d
throughPoints : Point3d -> Point3d -> Point3d -> Point3d -> Maybe Sphere3d

Properties

centerPoint : Sphere3d -> Point3d
radius : Sphere3d -> Float
diameter : Sphere3d -> Float
volume : Sphere3d -> Float
surfaceArea : Sphere3d -> Float
circumference : Sphere3d -> Float
boundingBox : Sphere3d -> BoundingBox3d

Queries

contains : Point3d -> Sphere3d -> Bool

Transformations

scaleAbout : Point3d -> Float -> Sphere3d -> Sphere3d
rotateAround : Axis3d -> Float -> Sphere3d -> Sphere3d
translateBy : Vector3d -> Sphere3d -> Sphere3d
translateIn : Direction3d -> Float -> Sphere3d -> Sphere3d
mirrorAcross : Plane3d -> Sphere3d -> Sphere3d
projectOnto : Plane3d -> Sphere3d -> Circle3d
projectInto : SketchPlane3d -> Sphere3d -> Circle2d

Coordinate conversions

relativeTo : Frame3d -> Sphere3d -> Sphere3d
placeIn : Frame3d -> Sphere3d -> Sphere3d