Index of /code/art

 NameLast modifiedSizeDescription

 Parent Directory   -  
 3d/ 2025-11-15 17:10 -  
 COLOURS/ 2025-11-15 17:10 -  
 EFFECTS/ 2025-11-15 13:33 -  
 Messages/ 2025-11-15 13:33 -  
 art.zip 2025-11-15 17:23 83M 
 art/ 2025-11-15 17:10 -  
 art_no_data.zip 2025-11-15 17:23 4.3M 
 colourspace/ 2025-11-15 17:10 -  
 components/ 2025-11-15 17:10 -  
 config/ 2025-11-15 13:33 -  
 core/ 2025-11-15 17:10 -  
 data.zip 2025-11-15 17:23 51M 
 data/ 2025-11-15 17:10 -  
 dependencies 2025-11-15 13:34 102K 
 documentation.zip 2025-11-15 17:24 2.7M 
 documentation/ 2025-11-15 16:20 -  
 examples/ 2025-11-15 17:10 -  
 forhumans/ 2025-10-07 09:32 -  
 geo/ 2025-11-15 17:10 -  
 image/ 2025-11-15 17:10 -  
 lib/ 2025-11-15 13:37 -  
 libs.zip 2025-11-15 17:24 25M 
 makefile 2025-11-15 13:33 24K 
 math/ 2025-11-15 14:55 -  
 music/ 2025-11-15 17:10 -  
 noise/ 2025-11-15 17:10 -  
 sdf/ 2025-11-15 17:10 -  
 shapes/ 2025-11-15 17:10 -  
 string/ 2025-11-15 17:10 -  
 structures/ 2025-11-15 14:55 -  
 svg/ 2025-11-15 17:10 -  
 tests/ 2025-11-15 14:55 -  
 tiling/ 2025-11-15 17:10 -  
 types/ 2025-11-15 17:10 -  
 wfc/ 2025-11-15 17:10 -  

Documentation

Documentation

API documentation is available in the documentation) subdirectory. There are also api.html documents in some subdirectories, e.g. string/api.html, which provide summary information but have been mostly superceded by the generated API documentation.

Subdirectory summary

Code directories

Auxiliary directories

Licensing

The code here is generally licensed as CC-BY (https://creativecommons.org/licenses/by/4.0/).

Attribution should be to Mary Holstege and include a link to the code base at http://mathling.com/code/

Sources

Some of the same data is based on WordNet 3.0® and is made available under that license (see data directory). The UnicodeData.txt file is made available under the Unicode data license (see data directory).

The noise code is a port of noise-rs which is used under an MIT License (see noise directory).

Much of the colour space conversion code is a port of hsluv-c which is used under an MIT License (see colourspace directory).

Much of the SDF code is based in part on code from Inigo Quilez which is used under an MIT License with some operators from Karsten Schmidt which is used under an Apache license, and a few details from Electric Square Ltd., also under and MIT License (see sdf directory).

The gradients are based on gradient definitions from a variety of sources used under MIT, BSD, and CC Licenses (see COLOURS directory).

The Wave Function Collapse algorithm is a port of the WFC code, which is used under an MIT license. See wfc directory.

The Hyphae component is based on a port of Anders Hoff's Hyphae, which is used under an MIT license.

Some of the shape fills are based on ideas from Preet Shihn's rough.js library, which is used under an MIT license.

The Hobby splines are based on code ported and adapted from Jake Low's hobby.js licence, used under an ISC license. See geo/spline.xqy.

UnicodeData.txt is version 15.1.0 and used subject to Unicode license. See data/Unicode_license.txt.

oeis.stripped.txt is from the Online Encyclopedia of Integer Sequences as of 2025/04/07 and is used subject to the OEIS End-User License Agreement. See data/OEIS-LICENSE.txt.

Dependencies

Some of the operations depend on Java extensions provided by Saxon. They will not work with other processors.

PNG image operations depend on various Java libraries (java.io, javax.imageio, java.awt). These classes are part of the Java runtime environment.

IXML operations depend on Normal Walsh's NineML CoffeeSacks (and CoffeePot) version 3.2.9. See structures subdirectory. These libraries are available in the lib subdirectory, subject to an MIT license.

An alternative implementation of IXML operations depends on Gunther Rademacher's MarkupBlitz, which is Copyright (c) 2023-2025 Gunther Rademacher, and is available under the Apache license. See structures subdirectory.

Some of the mathematical operations depend on Apache Commons Math version 3.6.1. See math subdirectory. These libraries are available in the lib subdirectory, subject to the Apache License.

Maker functions

Many of the libraries have maker functions associated with them, marked with the art:maker annotation. These are intended for use with the text interface driver (still a work-in-progress and not currently part of the release). They provide a standardized callback interface for making things and generally provide a limited set of heavily defaulted options. They can be called directly, and can provide examples of how to use some of the APIs. All these functions are bleeding edge, and the details of the interfaces are certainly subject to some change.

The maker functions come in three basic signatures: direct makers, contextual makers, and relationship makers.

Direct makers make something directly. The signature is:

direct-maker(
  $dynamics as map(xs:string,item()*),
  $canvas as map(xs:string,item()*),
  $randomizers as map(xs:string,item()*),
  $parameters as map(xs:string,item()*)
) as map(xs:string,item()*)*

The parameters are:

Contextual makers modify something or make something new from it. The signature is:

contextual-maker(
  $context as map(xs:string,item()*)*,
  $dynamics as map(xs:string,item()*),
  $canvas as map(xs:string,item()*),
  $randomizers as map(xs:string,item()*),
  $parameters as map(xs:string,item()*)
) as map(xs:string,item()*)*

The parameters are the same except for the context:

Relationship makers combine two things something or make something new. The signature is:

contextual-maker(
  $base as map(xs:string,item()*)*,
  $related as map(xs:string,item()*)*,
  $dynamics as map(xs:string,item()*),
  $canvas as map(xs:string,item()*),
  $randomizers as map(xs:string,item()*),
  $parameters as map(xs:string,item()*)
) as map(xs:string,item()*)*

The parameters are the same except for the base and related group:

The canvas, randomizers, and parameters are the standard triad present in all components. The dynamic parameters include special options for the specific maker as well as several standard options. The makers do not require any of the standard options.

Status indicators

Releases

20251115

This release is largely an accumulation of some small bug fixes. The major change is the integration of Markup Blitz for Invisible XML processing, and a reshuffling of those APIs to allow for the selection of processor. Currently CoffeeSacks and Markup Blitz are supported. Libraries are included, although it is up to you to include the right options when you invoke Saxon. See the makefile for examples. Markup Blitz is generally much faster and scales better, due to the separation of tokenization and parsing, but CoffeePot provides more control and better debugging capabilities.

This release also adds full text search to the website, encompassing the documentation as well.

Geometry (geo/euclidean.xqy)

* New function `geom:trace()` which can chain with other operations to provide intermediate tracing using descriptions of geometric objects
* `path:reverse()` now takes sequence of paths, the better to chain operations ([geo/path.xqy](https://mathling.com/code/art/documentation/geo/path.xqy.html))
* Aesthetic: arc edge end-points get snapped when when translating edge
* Adjustment to the logic of swapping in edge normalization
* Bug: `edge:chop()` sometimes computes incorrect splits ([geo/edge.xqy](https://mathling.com/code/art/documentation/geo/edge.xqy.html))
* Bug: `geom:as-polygon()` dropping properties
* Bug: incorrect calculation of tangent vectors on ellipses ([geo/ellipse.xqy](https://mathling.com/code/art/documentation/geo/ellipse.xqy.html))

Miscellaneous

* Add offset adjustment parameter to `fonts:text-as-glyphs()`
* Bug: mishandling of font lookup for characters in FF-FFF range
* Add `component-map()` method to all components to simplify their use

20250714

20241219

This release includes some major (incompatible) restructuring of the core libraries: various libraries have been moved from core to math and many of the functions in "http://mathling.com/core/utilities" (core/utilities.xqy) have been moved to new libraries. There are some new advanced mathematic capabilities, various drawing components, and more capable colouring and rendering.

20240727

This release includes a lot of work on the experimental maker functions: reworking handling of some of the dynamic parameters, adding more maker functions, and adding a new class maker function for relationships. The experimentation with the art shell (not released) that is driving this work has also produced a number of new modules. There are also some follow-up bug fixes from the change to default 3D rendering.

20240521

This release includes a great number of maker functions, a lot of new solids, and the replacement of simple projection with automatic depth-ordered 3D rendering by default. The configuration option $config:RENDER controls this (core/config.xqy).

20240131

(Refreshed 20240202.)

This release includes a number of new capabilities in the area of paths, shapes, and patterns, a reworking of hyperbolic geometry, and some more refactoring of the geometry code.

20231012

A small refresh update to pick up some 3D extensions, fixes, and clean-up of the parametric L-system code.

20231001

With Saxon 12.3 the need for additional JAR files (see 20230424 release notes) is gone. Saxon-JS problems with heap errors and string "too large" errors still apply (see 20230722 release notes). Some of the heap errors now show up with XSL as well (e.g. the fish example). Saxon-JS remains unusable except for very small and constrained examples that do not use many packages. XSL is still broadly usable.

Major changes and incompatibilities

Additional Details

20230722

The Saxon 12 and Saxon-JS issues mentioned in 20230424 still apply. The Saxon-JS issues are further exacerbated by heap errors during export and "too large" errors at run time. Saxon-JS is really not usable yet except for very small and constrained examples that do not use many packages.

20230424

20230224

20221219

20220731

20220626

[1] Requires functions from the http://expath.org/ns/file and http://expath.org/ns/binary namespaces.

[2] Depends on Saxon Java API extensions; metadata saved in a secondary file due to lacunae in Java PNG implementation.

[3] See Paul Bourke "CONREC: A Contouring Subroutine" (http://paulbourke.net/papers/conrec/) for more information.

[4] See https://en.wikipedia.org/wiki/Elementary_cellular_automaton for more information.

[5] See Valeriy G. Narushin, Michael N. Romanov, and Darren K. Griffin " A universal formula for avian egg shape" (https://www.biorxiv.org/content/10.1101/2020.08.15.252148v1) for more information.

[6] See Scott Draves & Erik Reckase "The Fractal Flame Algorithm" (https://flam3.com/flame_draves.pdf) for more information.

20220308

20211222

20211020

20210814