Using JSXGraph from F#: A functional visualization EDSL for end-users
Allister Beharry
University of London; 2 Russell Sq, London WC1B 5DN, United Kingdom
Abstract
This talk is an expansion of the demo presented at ICFP FARM ‘23: A Functional EDSL for Mathematics Visualization That Compiles to JavaScript. We developed an F# interface to JSXGraph designed to be used both in F# library code and interactively in Jupyter notebooks for mathematics visualization. The Sylvester language shares some similarities to the approach used by the Penrose language to visualization in that one describes mathematical objects and operations like functions and vectors and matrices using the Sylvester notation which are then drawn and styled using user-specified properties and parameters, as opposed to requiring the user to manipulate vector graphics domain objects like points, lines, arrows, axes, function graphs etc. Visualization in Sylvester is targeted to educators and students and end-users and does not require vector graphics or web development domain knowledge. In this presentation we’ll go into some more details of the Sylvester F#-JavaScript interface and JSXGraph: F# quotations and their use in code generation , the FunScript F#-JavaScript compiler, desiging a statically typed, functional, JSXGraph interface, and composing a higher-level object-oriented visualization API using JSXGraph for mathematical domain objects from vectors to economic functions.