art/ directory
core.xqy ("http://mathling.com/art/core")
Some core art support routines used by some of the components.
Randomizer Operations
core:randomize()
core:loop-randomize()
core:loop-select-randomize()
core:random-parameters()
core:random-parameter-map()
core:randomizer()
Parameter Operations
core:parameter()
core:optional-parameter()
Gradients and Effects
core:colours()
core:gradient()
core:effect()
Canvas Operations
core:canvas()
core:scaling()
core:width()
core:height()
core:inner-canvas()
draw.xqy ("http://mathling.com/art/draw")
Drawing code. Unlike svg/draw.xqy, this library draws to domain specific art XML.
Drawing interface
draw:draw()
draw:perspective-draw()
draw:draw-point-matrix()
draw:draw-colour-buckets()
Metadata Creation
draw:dump-randomizers()
draw:dump-parameters()
draw:dump-dynamic-parameters()
components.xqy ("http://mathling.com/art/components")
Component merging part of art execution framework. (See examples/art.xqy.)
Components run off a component definition map. Each entry in the map is keyed by the component name and includes keys for the module namespace (required), which mode of the component to use (default is "default"), and whether to incorporate rendering parameters (default=true()).
Example:
map {
"example":
map {
"namespace": "http://mathling.com/art/example",
"render": true(),
"mode": "default"
}
}
Components are defined with some well known function names which the component merging framework uses to construct unified bundles of parameters, randomizer descriptors, and so on. If the function is not found, they are presumed to return empty values.
Standard component callback functions
rendering-parameters()
algorithm-mode-parameters()
algorithm-parameters()
randomizers()
colophon()
metadata()
Component merge
components:expand()
components:rendering-parameters()
components:algorithm-parameters()
components:randomizers()
components:metadata()
components:colophons()
components:check-components()
Copyright© Mary Holstege 2020-2024
CC-BY (https://creativecommons.org/licenses/by/4.0/)