Module Povray

module Povray: sig .. end

A PovRay module


There are 3 different ways to create a povray scene:

with the description type scene_desc, accumulating to the scene type, or with a type that we can print to a screen.

Scene Description
type location = float * float * float 
module Color: sig .. end
type color = Color.t 
type scene_desc = 
| Background of color
| Camera of location * location
| Light_source of location * color
| Sphere of location * float * string
| Cone of location * float * location * float * string
| Box of location * location * string * location option
module Textures: sig .. end
type texture = Textures.stones 
Adds to a Scene
type scene 
val new_scene : unit -> scene
val string_of_scene : scene -> string
val print_scene : scene -> unit
module Inc_file: sig .. end
type inc_file = Inc_file.t 
val string_of_inc_file : inc:inc_file -> string
val add_include : scene -> inc:inc_file -> scene
val add_background : scene -> color:color -> scene
val add_light_source : scene ->
location:int * int * int -> color:color -> scene
val add_camera : scene ->
location:int * int * int -> look_at:int * int * int -> scene
val add_ambient_light : scene -> color:float * float * float -> scene
val add_texture : scene ->
?color:color ->
?scale:int -> ?def:texture -> unit -> scene
Adds Shapes to a Scene
val add_sphere : scene ->
center:float * float * float ->
radius:float -> ?texture:string -> unit -> scene
val add_cone : scene ->
center1:float * float * float ->
radius1:float ->
center2:float * float * float ->
radius2:float -> ?texture:string -> unit -> scene
val add_box : scene ->
corner1:float * float * float ->
corner2:float * float * float ->
?texture:string -> ?rotate:float * float * float -> unit -> scene
val add_cylinder : scene ->
center1:float * float * float ->
center2:float * float * float ->
radius:float -> ?texture:string -> unit -> scene
val add_torus : scene ->
major:float ->
minor:float ->
?texture:string -> ?translate:float * float * float -> unit -> scene
val add_text : scene ->
font:string ->
text:string ->
?thickness:float -> ?offset:float -> ?texture:string -> unit -> scene
Print to Screen
val get_color : color:color -> string
val get_include : inc:inc_file -> string
val get_background : color:color -> string
val get_light_source : location:int * int * int -> color:color -> string
val get_camera : location:int * int * int -> look_at:int * int * int -> string
val get_ambient_light : color:float * float * float -> string
val get_texture : ?color:color -> ?scale:int -> ?def:texture -> unit -> string
Prints shapes to the Screen
val get_sphere : center:float * float * float ->
radius:float -> ?texture:string -> unit -> string
val get_box : corner1:float * float * float ->
corner2:float * float * float ->
?texture:string -> ?rotate:float * float * float -> unit -> string
val get_cylinder : center1:float * float * float ->
center2:float * float * float ->
radius:float -> ?texture:string -> unit -> string
val get_cone : center1:float * float * float ->
radius1:float ->
center2:float * float * float ->
radius2:float -> ?texture:string -> unit -> string
val get_torus : major:float ->
minor:float ->
?texture:string -> ?translate:float * float * float -> unit -> string
val get_text : font:string ->
text:string ->
?thickness:float -> ?offset:float -> ?texture:string -> unit -> string