mecha-0.0.5: Mecha is a solid modeling language geared for machine design.




data Asm Source

The Asm holds all the parts and sub-assemblies.

part :: Solid -> AsmSource

Place a part (Solid) in an assembly.

assemble :: [Asm] -> AsmSource

Assemble multiple sub-assemblies together.

type Scene = (Camera, Asm)Source

A Scene is a light position, camera configuration, and an assembly.

data Camera Source

Defines a camera configuration.



Orthographgic projection at the origin with a radius.


Perspective projection given a camera location and a target.


view :: FilePath -> Int -> Int -> Asm -> IO ()Source

Renders 3 orthographic views and 1 perspective view and creates a little html page or the images. Assembly should be within 1 of origin.

animate :: FilePath -> Int -> Int -> Int -> [Scene] -> IO ()Source

Renders a MPEG movie with POVRay and ffmpeg given a file name (w/o file extension), heigth, width, frames-per-second, and a list of scenes.