Safe Haskell | None |
---|---|
Language | Haskell98 |
- type ℝ = Float
- type ℝ2 = (ℝ, ℝ)
- type ℝ3 = (ℝ, ℝ, ℝ)
- type ℕ = Int
- (⋅) :: InnerSpace a => a -> a -> Scalar a
- class ComponentWiseMultable a where
- type M2 a = ((a, a), (a, a))
- type M3 a = ((a, a, a), (a, a, a), (a, a, a))
- type Polyline = [ℝ2]
- type Triangle = (ℝ3, ℝ3, ℝ3)
- type NormedTriangle = ((ℝ3, ℝ3), (ℝ3, ℝ3), (ℝ3, ℝ3))
- type TriangleMesh = [Triangle]
- type NormedTriangleMesh = [NormedTriangle]
- type Obj2 = ℝ2 -> ℝ
- type Obj3 = ℝ3 -> ℝ
- type Box2 = (ℝ2, ℝ2)
- type Box3 = (ℝ3, ℝ3)
- type Boxed2 a = (a, Box2)
- type Boxed3 a = (a, Box3)
- type BoxedObj2 = Boxed2 Obj2
- type BoxedObj3 = Boxed3 Obj3
- data SymbolicObj2
- = RectR ℝ ℝ2 ℝ2
- | Circle ℝ
- | PolygonR ℝ [ℝ2]
- | Complement2 SymbolicObj2
- | UnionR2 ℝ [SymbolicObj2]
- | DifferenceR2 ℝ [SymbolicObj2]
- | IntersectR2 ℝ [SymbolicObj2]
- | Translate2 ℝ2 SymbolicObj2
- | Scale2 ℝ2 SymbolicObj2
- | Rotate2 ℝ SymbolicObj2
- | Mirror2 ℝ SymbolicObj2
- | Outset2 ℝ SymbolicObj2
- | Shell2 ℝ SymbolicObj2
- | EmbedBoxedObj2 BoxedObj2
- data SymbolicObj3
- = Rect3R ℝ ℝ3 ℝ3
- | Sphere ℝ
- | Cylinder ℝ ℝ ℝ
- | Complement3 SymbolicObj3
- | UnionR3 ℝ [SymbolicObj3]
- | IntersectR3 ℝ [SymbolicObj3]
- | DifferenceR3 ℝ [SymbolicObj3]
- | Translate3 ℝ3 SymbolicObj3
- | Scale3 ℝ3 SymbolicObj3
- | Rotate3 (ℝ, ℝ, ℝ) SymbolicObj3
- | Rotate3V ℝ ℝ3 SymbolicObj3
- | Mirror3 (ℝ, ℝ, ℝ) SymbolicObj3
- | Outset3 ℝ SymbolicObj3
- | Shell3 ℝ SymbolicObj3
- | EmbedBoxedObj3 BoxedObj3
- | ExtrudeR ℝ SymbolicObj2 ℝ
- | ExtrudeRotateR ℝ ℝ SymbolicObj2 ℝ
- | ExtrudeRM ℝ (Maybe (ℝ -> ℝ)) (Maybe (ℝ -> ℝ)) (Maybe (ℝ -> ℝ2)) SymbolicObj2 (Either ℝ (ℝ2 -> ℝ))
- | RotateExtrude ℝ (Maybe ℝ) (Either ℝ2 (ℝ -> ℝ2)) (Either ℝ (ℝ -> ℝ)) SymbolicObj2
- | ExtrudeOnEdgeOf SymbolicObj2 SymbolicObj2
- type Rectilinear2 = [Box2]
- type Rectilinear3 = [Box3]
- xmlErrorOn :: IORef Bool
- errorMessage :: Int -> String -> IO ()
Documentation
(⋅) :: InnerSpace a => a -> a -> Scalar a Source
class ComponentWiseMultable a where Source
type NormedTriangle = ((ℝ3, ℝ3), (ℝ3, ℝ3), (ℝ3, ℝ3)) Source
A triangle ((v1,n1),(v2,n2),(v3,n3)) has vertices v1, v2, v3 with corresponding normals n1, n2, and n3
type TriangleMesh = [Triangle] Source
A triangle mesh is a bunch of triangles :)
type NormedTriangleMesh = [NormedTriangle] Source
A normed triangle mesh is a bunch of normed trianlges!!
In Implicit CAD, we consider objects as functions
of outwardness
. The boundary is 0, negative is the
interior and positive the exterior. The magnitude is
how far out or in.
For more details, refer to http://christopherolah.wordpress.com/2011/11/06/manipulation-of-implicit-functions-with-an-eye-on-cad/
data SymbolicObj2 Source
A symbolic 2D object format. We want to have a symbolic object so that we can accelerate rendering & give ideal meshes for simple cases.
data SymbolicObj3 Source
A symbolic 3D format!
Rect3R ℝ ℝ3 ℝ3 | |
Sphere ℝ | |
Cylinder ℝ ℝ ℝ | |
Complement3 SymbolicObj3 | |
UnionR3 ℝ [SymbolicObj3] | |
IntersectR3 ℝ [SymbolicObj3] | |
DifferenceR3 ℝ [SymbolicObj3] | |
Translate3 ℝ3 SymbolicObj3 | |
Scale3 ℝ3 SymbolicObj3 | |
Rotate3 (ℝ, ℝ, ℝ) SymbolicObj3 | |
Rotate3V ℝ ℝ3 SymbolicObj3 | |
Mirror3 (ℝ, ℝ, ℝ) SymbolicObj3 | |
Outset3 ℝ SymbolicObj3 | |
Shell3 ℝ SymbolicObj3 | |
EmbedBoxedObj3 BoxedObj3 | |
ExtrudeR ℝ SymbolicObj2 ℝ | |
ExtrudeRotateR ℝ ℝ SymbolicObj2 ℝ | |
ExtrudeRM ℝ (Maybe (ℝ -> ℝ)) (Maybe (ℝ -> ℝ)) (Maybe (ℝ -> ℝ2)) SymbolicObj2 (Either ℝ (ℝ2 -> ℝ)) | |
RotateExtrude ℝ (Maybe ℝ) (Either ℝ2 (ℝ -> ℝ2)) (Either ℝ (ℝ -> ℝ)) SymbolicObj2 | |
ExtrudeOnEdgeOf SymbolicObj2 SymbolicObj2 |
type Rectilinear2 = [Box2] Source
Rectilinear 2D set
type Rectilinear3 = [Box3] Source
Rectilinear 2D set
xmlErrorOn :: IORef Bool Source
Now for something that makes me a bad person... I promise I'll use it for good, not evil! I don't want to reparse the program arguments everytime I want to know if XML errors are needed.
errorMessage :: Int -> String -> IO () Source