mesh
Library
Module
Module type
Parameter
Class
Class type
RGB Color representation 0xRRGGBB
. It will be converted to TeX by the functions below.
save mesh file
saves the mesh as LaTeX PGF commands. You can input the file in a tikzpicture
environment to render the mesh.
val write : ?edge:( int -> color option ) -> 'l t -> out_channel -> unit
Same as save
but write the command to the channel.
val level_curves :
?boundary:( int -> color option ) ->
'l t ->
'l vec ->
?level_eq:( float -> float -> bool ) ->
(float * color) list ->
string ->
unit
level_curves mesh z levels file
outputs into file
LaTeX PGF commands to display the level curves at levels
of the P1 FEM surface with values z
on the mesh mesh
. Each level is a couple (l, c)
where l
is the level value and c
is the RGB color to be used to display it. The output is done as TeX macros \meshline{R,G,B}{x1}{y1}{x2}{y2}
, \meshpoint{point
number}{x}{y}
and \meshtriangle{R,G,B}{x1}{y1}{x2}{y2}{x3}{y3}
, so it is easily customizable from within LaTeX. Default values for these macros are provided if they are not defined.
val super_level :
?boundary:( int -> color option ) ->
'l t ->
'l vec ->
float ->
color ->
string ->
unit
super_level mesh z level color file
outputs into file
the LaTeX PGF command to display the super-level { (x,y) | z(x,y) > l }. You can customize the output by defining \meshfilltriangle{R,G,B}{x1}{y1}{x2}{y2}{x3}{y3}
and \meshfillquadrilateral{R,G,B}{x1}{y1}{x2}{y2}{x3}{y3}{x4}{y4}
.
val sub_level :
?boundary:( int -> color option ) ->
'l t ->
'l vec ->
float ->
color ->
string ->
unit
sub_level mesh z level color file
same as super_level
except that the sub-level { (x,y) | z(x,y) < l } is drawn.