Safe Haskell | None |
---|---|
Language | Haskell2010 |
Language.Cube
- data RSTL a = Stl {}
- type Stl = RSTL Triangle
- class ToStl a where
- class Conjugate a where
- conjugate :: a -> a
- class Num a => Delta a where
- class RFunctor f a b where
- rfmap :: (a -> b) -> f a -> f b
- data Quaternion a = Quaternion {}
- type Cube = Quaternion Float
- data Block a = Block {}
- toSTL :: ToStl a => a -> STL
- toCube :: [Int] -> Cube
- block :: Ord a => [a] -> Block a
- cube :: Int -> Int -> Int -> Cube
- compaction :: Stl -> Stl
- flipTriangle :: Triangle -> Triangle
- writeFileStl :: ToStl a => String -> a -> IO ()
- writeFileStlWithText :: ToStl a => String -> a -> IO ()
- printStl :: ToStl a => a -> IO ()
- nCube :: Int -> Block Cube
- surface' :: Block Cube -> Block Cube
- surface :: Block Cube -> Block Cube
Documentation
Ristricted STL This is the almost same as STL of Graphics.Formats.STL. This is used to instantiate RFunctor of STL. RFunctor provides a function(rfmap) like fmap of Functor.
Generate Ristricted STL
class Conjugate a where Source
class type of mathematical conjugate
Instances
Num a => Conjugate (Quaternion a) |
class Num a => Delta a where Source
Delta move and rotation for quaternion
Methods
delta for x axis
delta for y axis
delta for z axis
delta for real part of quaternion
Arguments
:: Float | radian |
-> a | axes of routation |
-> a |
cons (theta2) + i sin (theta2) + j sin (theta2) + k sin (theta2) of quaternion
Arguments
:: Float | radian |
-> a | axes of routation |
-> a | Input Vector |
-> a |
Routation for quaternion
Arguments
:: Float | radian |
-> a | axes of routation |
-> a | Input Vector |
-> a |
Routation for quaternion This is the same as dR.
data Quaternion a Source
Unit element of Cube.
This is the same as quaternion.
Constructors
Quaternion | |
Instances
Functor Quaternion | |
Delta Cube | |
ToStl Cube | |
Eq a => Eq (Quaternion a) | |
Num a => Num (Quaternion a) | |
Ord a => Ord (Quaternion a) | |
Show a => Show (Quaternion a) | |
Num a => Monoid (Quaternion a) | |
Num a => Conjugate (Quaternion a) |
type Cube = Quaternion Float Source
Set of Cube. This supports boolean operations on polygons. (+) means or. (-) means not. (*) means convolution.
compaction :: Stl -> Stl Source
Remove redundant triangles
flipTriangle :: Triangle -> Triangle Source
Flip rotation of triangle
writeFileStl :: ToStl a => String -> a -> IO () Source
Generate binary STL file from Block
writeFileStlWithText :: ToStl a => String -> a -> IO () Source
Generate text STL file from Block