Index of values

( *** ) [Math.Vector]

vec *** f is mult vec f.

( **. ) [Math.Vector]

v1 **. v2 is dot v1 v2.

(++) [Math.Vector]

v1 ++ v2 is add v1 v2.

(--) [Math.Vector]

v1 -- v2 is sub v1 v2.

(//) [Math.Vector]

vec // f is div vec f.

(~.) [Math]

~. i is float_of_int i.

(~<) [Math.Vector]

~< (x, y) is x.

(~>) [Math.Vector]

~> (x, y) is y.

(~||) [Math.Vector]

~|| vec is mag vec.

A
abs [Math.Math]

abs i is the absolute value of i.

absf [Math.Math]

absf f is the absolute value of f.

acos [Math.Math]

acos f is the inverse cosine of f.

add [Math.Vector]

add v1 v2 is the sum of v1 and v2.

alt_l [Key.KeyUnicode]
alt_r [Key.KeyUnicode]
anchor1 [Bezier]

anchor1 bez is the first anchor point of bez.

anchor2 [Bezier]

anchor2 bez is the second anchor point of bez.

angle_avg [Math.Math]

angle_avg theta1 theta2 is the average angle between theta1 and theta2.

angle_between [Math.Vector]

angle_between v1 v2 is the smallest angle between v1 and v2.

angle_diff [Math.Math]

angle_diff theta1 theta2 is the difference between the angles theta1 and theta2.

angle_sum [Math.Math]

angle_sum theta1 theta2 is the sum of the angles theta1 and theta2.

apply_color [Gtk_cairo.Gtk_cairo]
apply_dynamic_hotswap [Runner.Dynamic]
apply_handler [Runner.Dynamic]
apply_paint_update [Paint]

apply_paint_update update paint is paint with update applied.

arc [Shape]

arc point size theta1 theta2 is the shape representing the arc (portion of a full ellipse) centered at point and inscribed in rect point ~align:`Center size from angle theta1 to theta2.

asin [Math.Math]

asin f is the inverse sine of f.

atan [Math.Math]

atan f is the inverse tangent of f.

atan2 [Math.Math]

atan2 y x is the angle from the origin to (y, x).

B
background [Shape]

background color is the shape that sets the background to color.

backspace [Key.KeyUnicode]
backspace [Key.Key]
begin_draw [Gtk_cairo.Gtk_cairo]
begin_draw [Graph.Graph]
begin_draw [Renderer.Renderer]

begin_draw () is called before draw begins.

bezier [Shape]

bezier bez is the shape representing the Bezier curve bez.

bleach [Shape]

bleach shape is shape with all color (fill or stroke) information removed.

build_mouse_coords [Gtk_cairo.Gtk_cairo]
C
caps_lock [Key.KeyUnicode]
ceil [Math.Math]

ceil f is the integer closest to f in the direction of positive infinity.

char_of_string [Misc]

char_of_string s is the sole character in s if s has length one; raises Failure "char_of_string" otherwise.

check_key [Config]

check_key config char is true if the key char is pressed in config and false otherwise.

check_key_uchar [Config]

check_key_uchar config char is true if the key char is pressed in config and false otherwise.

circle [Shape]

circle point radius is ellipse point (radius, radius).

clear [Gtk_cairo.Gtk_cairo]

clear buffer does not modify the buffer.

clear [Graph.Graph]
clear [Renderer.Renderer]

clear buffer removes all rendered shapes from buffer.

constrain [Math.Math]

constrain i min max is min if i <= min, max if i >= max, or i otherwise.

constrainf [Math.Math]

constrainf f min max is min if f <= min, max if f >= max, or f otherwise.

control1 [Bezier]

control1 bez is the first control point of bez.

control2 [Bezier]

control2 bez is the second control point of bez.

control_l [Key.KeyUnicode]
control_r [Key.KeyUnicode]
cos [Math.Math]

cos theta is the cosine of theta.

create [Bezier]

create a1 c1 c2 a2 is (a1, c1, c2, a2).

create [Math.Vector]

create x y is (x, y).

create [Paint]

create is the default paint.

create_buffer [Gtk_cairo.Gtk_cairo]
create_buffer [Graph.Graph]
create_buffer [Renderer.Renderer]

create_buffer frame_rate display is a new buffer with the specified frame rate and display settings.

D
degrees [Math.Math]

degrees theta is theta, which is in radians, converted to degrees.

delete [Key.KeyUnicode]
delete [Key.Key]
display [Sketch.Sketch]

The type of the display, e.g.

display [Sketch.Base]
dist [Math.Vector]

dist v1 v2 is the distance between v1 and v2, which is equivalent to mag (sub v1 v2).

dist [Math.Math]

dist x1 y1 x2 y2 is the distance between the points (x1, y1) and (x2, y2).

distf [Math.Math]

distf x1 y1 x2 y2 is the distance between the points (x1, y1) and (x2, y2).

div [Math.Vector]

div vec f is mult vec (1. /. f).

dot [Math.Vector]

dot v1 v2 is the dot product of v1 and v2, i.e.

down [Key.KeyUnicode]
draw [Sketch.Sketch]

draw config state is the shape that should be drawn in the given state.

draw [Sketch.Base]
draw_path [Gtk_cairo.Gtk_cairo]
draw_path_sep [Gtk_cairo.Gtk_cairo]
E
e [Math.Math]

e is the constant e.

ellipse [Shape]

ellipse point size is the shape representing the ellipse centered at point and inscribed in rect point ~align:`Center size.

empty [Shape]

empty is the shape that draws nothing.

end_draw [Gtk_cairo.Gtk_cairo]
end_draw [Graph.Graph]
end_draw [Renderer.Renderer]

end_draw () is called after draw ends.

enter [Key.KeyUnicode]
enter [Key.Key]
esc [Key.KeyUnicode]
esc [Key.Key]
event_notifiers [Gtk_cairo.Gtk_cairo]
event_queue [Gtk_cairo.Gtk_cairo]
event_queue [Graph.Graph]
event_queue [Renderer.Renderer]

event_queue buffer retrieves and removes the list of queued events for buffer.

expose [Gtk_cairo.Gtk_cairo]
F
fill [Shape]

fill color shape is shape with fill color, used to draw the inside of shapes.

fill_action [Graph.Graph]
find_name [Shape]

find_name name shape is Some found where found is the first shape tagged with name in shape, or None if shape contains no shapes tagged name.

find_names [Shape]

find_names name shape is the list of all shapes in shape that are tagged with name.

find_tag [Shape]

find_tag tag shape is Some found where found is the first shape tagged with tag in shape, or None if shape contains no shapes tagged tag.

find_tags [Shape]

find_tags tag shape is the list of all shapes in shape that are tagged with tag.

floor [Math.Math]

floor f is the integer closest to f in the direction of negative infinity.

G
get_key [Gtk_cairo.Gtk_cairo]
get_keys [Config]

get_keys config is the list of all keys that are currently pressed in config, or [] if there are no keys pressed.

get_keys_uchar [Config]

key_keys_uchar config is the list of all keys that are currently pressed in config, or [] if there are no keys pressed.

get_mouse_button [Gtk_cairo.Gtk_cairo]
get_mouse_coords [Graph.Graph]
gray [Color]

gray val is the opaque color represented by the grayscale value val, which is equivalent to each of red, green, and blue values of val.

graya [Color]

gray val a is gray val, but with an alpha value of a.

group [Shape]

group shapes is the shape that draws shapes in order.

H
half_pi [Math.Math]

half_pi is pi /. 2..

handle_apply_shape [Gtk_cairo.Gtk_cairo]
handle_apply_vertex [Gtk_cairo.Gtk_cairo]
handle_key_pressed [Gtk_cairo.Gtk_cairo]
handle_key_released [Gtk_cairo.Gtk_cairo]
handle_mouse_moved [Gtk_cairo.Gtk_cairo]
handle_mouse_pressed [Gtk_cairo.Gtk_cairo]
handle_mouse_released [Gtk_cairo.Gtk_cairo]
handle_mouse_scroll [Gtk_cairo.Gtk_cairo]
handle_shape [Graph.Graph]
handle_vertex [Graph.Graph]
handle_window_delete [Gtk_cairo.Gtk_cairo]
handle_window_enter [Gtk_cairo.Gtk_cairo]
handle_window_leave [Gtk_cairo.Gtk_cairo]
handle_window_resized [Gtk_cairo.Gtk_cairo]
has_changed [Runner.Dynamic]
has_dynamic_hotswap [Runner.Dynamic]
heading [Math.Vector]

heading vec is the heading of vec, i.e.

height [Gtk_cairo.Gtk_cairo]
height [Graph.Graph]
height [Renderer.Renderer]

height buffer is the height of buffer.

hex [Color]

hex hex_str is the color represented by hex_str in hexadecimal notation.

hsv [Color]

hsv h s v is the opaque color represented by the hue, saturation, and value values of h, s, and v, respectively.

hsva [Color]

hsva h s v a is hsv h s v, but with an alpha value of a.

I
interpolate [Bezier]

interpolate bez time is the point at time along bez, where time is in [0, 1].

is_dynamic [Runner.Dynamic]
is_initialized [Runner.Dynamic]
K
key_pressed [Sketch.Sketch]

key_pressed config state is the state that results after a key is pressed in state.

key_pressed [Sketch.Base]
key_released [Sketch.Sketch]

key_released config state is the state that results after a key is released in state.

key_released [Sketch.Base]
key_typed [Sketch.Sketch]

key_typed config state is the state that results after a key is typed (pressed and released) in state.

key_typed [Sketch.Base]
L
left [Key.KeyUnicode]
lerp [Math.Vector]

lerp v1 v2 t is the linear interpolation from v1 to v2 by t, where t is in [0, 1].

lerp [Math.Math]

lerp a b t is the linear interpolation from a to b by t, where t is in [0, 1].

lerpf [Math.Math]

lerpf a b t is the linear interpolation from a to b by t, where t is in [0, 1].

limit [Math.Vector]

limit vec f is vec with a maximum magnitude of f, which is equivalent to with_mag vec (min (mag vec) f).

line [Shape]

line v1 v2 is the shape representing the line between v1 and v2.

load_dynamic_module [Runner.Runner]
log [Math.Math]

log f b is the base-b logarithm of f.

loop [Sketch.Sketch]

loop config state is the state that results after advancing state through one time step.

loop [Sketch.Base]
M
mag [Math.Vector]

mag vec is the magnitude of vec, i.e.

mag [Math.Math]

mag x y is dist x y 0 0.

mag_sq [Math.Vector]

mag_sq vec is the squared magnitude of vec, i.e.

magf [Math.Math]

magf x y is distf x y 0 0.

map [Math.Math]

map i low1 high1 low2 high2 is i mapped from the range [low1, high1] to the range [low2, high2].

mapf [Math.Math]

mapf f low1 high1 low2 high2 is f mapped from the range [low1, high1] to the range [low2, high2].

max [Math.Math]

max a b is the maximum of a and b.

maxf [Math.Math]

maxf a b is the maximum of a and b.

meta_l [Key.KeyUnicode]
meta_r [Key.KeyUnicode]
min [Math.Math]

min a b is the minimum of a and b.

minf [Math.Math]

minf a b is the minimum of a and b.

mouse_clicked [Sketch.Sketch]

mouse_clicked config state is the state that results after the mouse is clicked (pressed and then released) in state.

mouse_clicked [Sketch.Base]
mouse_dragged [Sketch.Sketch]

mouse_dragged config state is the state that results after the mouse is dragged (moved while pressed) in state.

mouse_dragged [Sketch.Base]
mouse_moved [Sketch.Sketch]

mouse_moved config state is the state that results after the mouse is moved in state.

mouse_moved [Sketch.Base]
mouse_pressed [Sketch.Sketch]

mouse_pressed config state is the state that results after the mouse is pressed in state.

mouse_pressed [Sketch.Base]
mouse_released [Sketch.Sketch]

mouse_released config state is the state results after the mouse is released in state.

mouse_released [Sketch.Base]
mouse_scrolled [Sketch.Sketch]

mouse_scrolled config state is the state that results after the mouse is scrolled in state.

mouse_scrolled [Sketch.Base]
mult [Math.Vector]

mult vec f is the scalar multiplication of vec by f.

N
name [Shape]

name n shape is shape tagged with name n, which can be looked up with find_name.

no_fill [Shape]

no_fill shape is shape with fill cleared.

no_stroke [Shape]

no_stroke shape is shape with stroke cleared.

norm [Math.Vector]

norm vec is vec with a magnitude of 1., which is equivalent to div vec (mag vec).

norm [Math.Math]

norm i low high is map i low high 0 1.

normf [Math.Math]

normf f low high is mapf f low high 0. 1..

O
of_angle [Math.Vector]

of_angle theta is the unit vector (cos theta, sin theta).

of_tuple [Math.Vector]

of_tuple (x, y) is (x, y).

P
pi [Math.Math]

pi is the constant pi.

point [Shape]

point vertex is the shape representing the point at position vertex.

poly [Shape]

poly vertices is the shape representing the polygon with vertices.

project [Math.Vector]

project v1 v2 is the projection of v1 on to v2.

Q
quad [Shape]

quad v1 v2 v3 v3 is polygon [v1; v2; v3; v4].

queue_event [Gtk_cairo.Gtk_cairo]
R
radians [Math.Math]

radians d is d, which is in degrees, converted to radians.

random_bool [Math.Math]

random_bool () is either true or false with an equal probability of either.

random_float [Math.Math]

random_float bound is a random float between 0. (inclusive) and bound (exclusive).

random_int [Math.Math]

random_int bound is a random integer between 0 (inclusive) and bound (exclusive).

rect [Shape]

rect point size is the shape representing the rectangle with corner at point and dimensions size.

redraw_trigger [Gtk_cairo.Gtk_cairo]
render [Gtk_cairo.Gtk_cairo]
render [Graph.Graph]
render [Renderer.Renderer]

render buffer shape draws shape to buffer.

return [Key.KeyUnicode]
return [Key.Key]
rgb [Color]

rgb r g b is the opaque color with red, green and blue values of r, g, and b, respectively.

rgba [Color]

rgba r g b a is rgb r g b, but with an alpha value of a.

right [Key.KeyUnicode]
rotate [Shape]

rotate angle shape is shape rotated angle radians about the origin.

rotate [Math.Vector]

rotate vec theta is vec rotated by angle theta.

round [Math.Math]

round f is the integer closest to f; 0.5 rounds up.

run [Runner.Runner]
run_sketch [Runner]

run_sketch (module MySketch) runs the sketch in the module MySketch.

S
scale [Shape]

scale (scale_x, scale_y) shape is shape scaled by factors of scale_x and scale_y in the x and y directions, respectively, about the origin.

set_change_notifier [Runner.Dynamic]
set_dynamic_handler [Runner.Dynamic]
set_dynamic_hotswap [Runner.Dynamic]
set_initialized [Runner.Dynamic]
setup [Sketch.Sketch]

setup config is the initial state.

shape [Shape]

shape sh tr is the shape sh translated by tr.

shift_l [Key.KeyUnicode]
shift_r [Key.KeyUnicode]
sin [Math.Math]

sin theta is the sine of theta.

sqrt [Math.Math]

sqrt f is the square root of f.

string_of_char [Misc]

string_of_char c is the string containing the character c.

stroke [Shape]

stroke color shape is shape with stroke color, used to draw the outline of shapes.

stroke_action [Graph.Graph]
stroke_cap [Shape]

stroke_cap c shape is shape with stroke cap c, the way that the ends of lines are drawn.

stroke_join [Shape]

stroke_join j shape is shape with stroke join j, the way that vertices between two lines are drawn.

stroke_weight [Shape]

stroke_weight w shape is shape with stroke weight w, the width of the stroke lines.

sub [Math.Vector]

sub v1 v2 is the difference between v1 and v2, which is equivalent to add v1 (mult v2 (-1.)).

T
tab [Key.KeyUnicode]
tab [Key.Key]
tag [Shape]

tag tg shape is shape tagged with tag tg, which can be looked up with find_tag.

tan [Math.Math]

tan theta is the tangent of theta.

tangent [Bezier]

tangent bez time is the vector tanget to bez at time, where time is in [0, 1].

to_string [Math.Vector]

to_string vec is the string representation of vec.

transform_color [Graph.Graph]
transform_coords [Graph.Graph]
transform_coords_f [Graph.Graph]
translate [Shape]

translate tr shape is shape translated by offset tr.

triangle [Shape]

triangle v1 v2 v3 is polygon [v1; v2; v3].

two_pi [Math.Math]

two_pi is pi *. 2..

U
uncurry [Graph.Graph]
up [Key.KeyUnicode]
W
width [Gtk_cairo.Gtk_cairo]
width [Graph.Graph]
width [Renderer.Renderer]

width buffer is the width of buffer.

window_closed [Sketch.Sketch]

window_closed config state is the state that results after the window is closed in state.

window_closed [Sketch.Base]
window_resized [Sketch.Sketch]

window_resized config state is the state that results after the window is resized in state.

window_resized [Sketch.Base]
with_mag [Math.Vector]

with_mag vec f is vec with a magnitude of f, which is equivalent to mult (norm vec) f.