XQuery/XSLT Code Page

XQuery and XSLT modules available for download here. See the art page for more context. The code has been tested on Saxon 12.3 (HE/PE/EE). Some modules require EXPath binary and file module implementations. A couple require Saxon-specific extensions. Currently only the basic modules have been ported to XSLT. I have tested these in SaxonJS 2.5 as well, but there are currently some serious performance issues and scaling problems in some cases. There are also some issues with Saxon 12 with respect to performance options. See the release notes.

As of 20230424 all APIs, tests, and examples are available in both XQuery and XSLT.

Main components:

  1. Randomizers: parameterized random distributions of various kinds
  2. Noise: various noise function implementations and modifiers
  3. Core utilities: Error handling, vectors, sparse matrixes, complex and quaternion numbers, polynomials, integer sequences, various basic operations, wrappers, and convenience functions
  4. Geometry: basic geometric types (points, edges, ellipses, polygons, Platonic solids, etc.) and some operations over them; basic KML parsing
  5. Colour spaces: colour space points, conversions and interpolations
  6. Strings: Aho-Corasick implementation with higher-level "entity" matching API, text justification
  7. Images: raw (PPM) image manipulation (requires EXPath modules) and PNG read/write (requires Saxon Java APIs)
  8. Tiling: isohedral tiling, Wave Function Collapse implementation
  9. SDF: signed distance function, plus some rendering/lighting functions
  10. 3D: reading 3D model STL files
  11. Gradients: Various gradients in SVG format (and wrapped in XSLT). These gradients are mostly designed to be perceptual uniform and ordered, often with preservation of these properties for various colour-vision deficiencies. There are also some isoluminant gradients.
  12. Effects: Various SVG filter effects shown as exemplars plus code for munipulating and combining them. If you have Inkscape installed you can set up to use those as well; see `effects.xqy`.
  13. Shapes: patterns, grids, curves.
  14. L-systems: deterministic, stochastic, and parametric varieries.

Latest release 20231012: Minor refresh update to add some improvements, clean-ups, and bug-fixes to L-systems. Upgrade to ScientificColourMaps v8.0.1.

20231001: Extensive rewrite and expansion of L-system support, better geometric delegation, various additional components, features, examples, tests, bug fixes.

20230723: More extensive analytic support (e.g. complex polynomials in sin(z)), more integer sequences, more geometric operations (especially path and solid geometry operations, plus additional projections), more random distributions, music-based noise fields, density maps. More higher level components, tests, and examples; various bug fixes and extensions.

20230424: Complete XSLT parity and full linked HTML documentation. Extensions to hexagonal grids, sequences, mutations, polynomials. More higher level components, tests, and examples; various bug fixes and extensions.

20230224: XSLT ports, linked HTML documentation, major reworking of drawing and SDF functions. 3D blocks, new sequences, more higher level components, various bug fixes and extensions.

20221219: Quaternions, text justification, image convolution and pixel sorting, more geometry improvements and refactoring, pseudospirals, polynomial spirals, refraction, MusicXML parsing, more higher level components, various bug fixes and extensions.

20220731: Wave Function collapse algorithm, better handling of edge intersections, refactoring of edge operations, various bug fixes and examples.

20220627: 3D STL files, PNG files, improved solid geometry, more higher level components, extensive set of curves, more colours and gradients, miscellaneous improvements, additions, bug fixes, tests.

20220308: Solid geometry, graph layout, more geometric code and refactoring, higher level components, various utility operations, matrix math, etc.

20211222: Extensive additions to geometric code; additional SVG support; various tests, small additions, bug fixes.

20211110: Major refactoring of geometric code, add SDF, gradients, complex numbers; more tests, examples, various small additions and bug fixes.

20210827: Port of tactile-js

20210814: Fixes to some random distributions, more tests for same; advice of Saxon optimizer flags.


Visualization of Exoplanet catalog (hover over signature for more information).

Your Hosts

Mary Holstege (@mathling)

Dan Ford

Bonus: Ian's Snake.