Library
Module
Module type
Parameter
Class
Class type
Draw meshes and level curves in an OCaml Graphics window.
val draw :
?width:int ->
?height:int ->
?color:int ->
?points:bool ->
?point_idx:(int -> unit) ->
?triangle_idx:(int -> unit) ->
?voronoi:'a Mesh.voronoi ->
?point_marker_color:int ->
'a Mesh.t ->
unit
draw mesh
display the mesh on the current OCaml Graphics window with the bottom left corner at the current position.
val display :
?width:int ->
?height:int ->
?color:int ->
?points:bool ->
?point_idx:(int -> unit) ->
?triangle_idx:(int -> unit) ->
?voronoi:'a Mesh.voronoi ->
?point_marker_color:int ->
'a Mesh.t ->
unit
display mesh
open an OCaml graphic window and draw the mesh on it. To quit the graph and let the program continue, one must press 'q' or 'Q' or click on the graphic. See Mesh_display.draw
for the meaning of the optional parameters.
val level_curves :
?width:int ->
?height:int ->
?boundary:(int -> Graphics.color option) ->
'l Mesh.t ->
'l Mesh.vec ->
?level_eq:(float -> float -> bool) ->
(float * Graphics.color) list ->
unit
level_curves mesh z levels
display a graphics window with the requested level curves. Each level is a couple (l, c)
where l
is the lavel value and c
is the color to be used to display it. The bottom left corner of the mesh is placed at the current position.
val display_level_curves :
?width:int ->
?height:int ->
?boundary:(int -> Graphics.color option) ->
'l Mesh.t ->
'l Mesh.vec ->
?level_eq:(float -> float -> bool) ->
(float * Graphics.color) list ->
unit
display_level_curves mesh z levels
is like level_curves mesh z
levels
but opens the graph and "hold" it until 'q', 'Q' or a mouse button is pressed.
val super_level :
?width:int ->
?height:int ->
?boundary:(int -> Graphics.color option) ->
'l Mesh.t ->
'l Mesh.vec ->
float ->
Graphics.color ->
unit
super_level mesh z level color
fill the super-level { (x,y) | z(x,y) > l } with color
.
val sub_level :
?width:int ->
?height:int ->
?boundary:(int -> Graphics.color option) ->
'l Mesh.t ->
'l Mesh.vec ->
float ->
Graphics.color ->
unit
sub_level mesh z level color
same as super_level
except that the sub-level { (x,y) | z(x,y) < l } is drawn.