First release of the fork on Clojars, as io.github.buddhilw/emmy-viewers
(upstream owns the org.mentat group):
io.github.buddhilw/emmy-viewers {:mvn/version "0.5.0-fork.1"}
The jar's POM does not list Emmy: the fork depends on the Emmy fork through a
git coordinate, which a POM cannot express. Add Emmy to your own deps.edn,
using the same coordinate as this repository:
io.github.mentat-collective/emmy
{:git/url "https://github.com/BuddhiLW/emmy.git"
:git/tag "v0.33.0-fork.1"
:git/sha "1ed6094"}
BuddhiLW/emmy-viewers#4: depend on the Emmy fork release v0.33.0-fork.1
instead of Maven org.mentat/emmy 0.31.0, so a project using both
libraries resolves one Emmy. emmy.viewer.raster.lower/shared inlines
constants and once-used values again after Emmy's new CSE pass. The
vendored clj-kondo config for Emmy is refreshed from the fork.
BuddhiLW/emmy-viewers#5: new emmy.viewer.export namespace.
fragment->edn / edn->fragment and fragment->json / json->fragment
round-trip fragments, including their viewer metadata, losslessly.
register-viewer! adds transform viewers to the export registry.
export-notebook! builds one notebook into a static HTML folder. See
DEVELOPING.md, "Exporting fragments and single notebooks".
Released from the BuddhiLW/emmy-viewers fork so the changes below can be used before they land upstream. Each entry is an open pull request against mentat-collective/emmy-viewers; the fork returns to upstream releases once they merge.
#83 (computational backends, with raster WebAssembly as the second one):
Adds the Kernel contract to every compile site (compile-1d, compile-2d,
MathBox's compile-3d, physics' ode-compile) via
emmy.viewer.compile/compiled-fn. emmy.viewer.kernel.backend/KernelBackend
has a single kernel-form method; register-backend! makes new backends
available without changing call sites. *backend* accepts a keyword or a
backend value.
Both the default :js backend and the :raster WebAssembly backend now emit
functions with Emmy's per-point convention plus batch(xs, n, ps, out),
ready(), and dims. Raster retains the :js fallback; :js attaches its
batch adapter without wrapping its per-point function.
Adds browser-side emmy.viewer.kernel (kernel?, ready?, dims, batch!,
bind, bind-1d). MathBox explicit surfaces batch their entire grid through
this contract when a Kernel and both ranges are supplied.
Adds shared malli contracts in emmy.viewer.kernel.schema for the Plan,
convention, dimensions, and open backend domain.
#84 moves CI to current GitHub Actions and JDK 25, and bumps Clerk to v0.17.1102 so notebooks and the static build load on JDK 25.
#91, superseding #75 (TeX rendering):
Fixes emmy.clerk/->TeX, which simplified the expression only when
:simplify? was falsy. It now simplifies only when :simplify? is true.
Adds emmy.clerk/tex-viewer, which renders TeX-wrapped values
(emmy.expression.render/tex?) with Clerk's TeX viewer, and installs it
via emmy.clerk/install!. It is inert on Emmy versions without
render/tex?.
emmy.clerk/->TeX and emmy.clerk/multiviewer accept either a string or a
TeX-wrapped value from emmy.env/->TeX.
Adds a TeX rendering example at dev/examples/tex.clj.
#89, superseding #65: adds per-vertex color support for MathBox surfaces (of-xy, of-xz,
of-yz, polar-surface and parametric-surface, plus their
emmy.mathbox.components.plot components):
:color-fn takes [x y z u v] and returns a number; it is compiled
like the surface function and may be wrapped with
emmy.viewer/with-params.
:color-map picks :rainbow (default), :temperature, :bluered or a
custom (fn [frac] [r g b]).
:color-range sets the :color-fn output range mapped onto the color
map, clamping values outside it. Defaults to [0 1].
emmy.mathbox.color is now a cljc namespace with color-maps,
hsl->rgb, normalize and vertex-color-expr. Default surface grid
lines are now :color darkened halfway toward black, and gray when
:color-fn is set.
Adds the examples.mathbox.color-test notebook.
#85, superseding #51 (polar curves):
Documents emmy.mathbox.plot/polar-curve, which plots a radius :r as a
function of theta into the z = 0 plane, and fixes the
emmy.mathbox.components.plot/PolarCurve docstring.
Axis tick labels pass label-fn straight through to mb/Format.
Adds the examples.mathbox.polar notebook and CLJ tests for
polar-curve.
#87, superseding #58 by @vnredmon (implicit surface plotting):
Adds emmy.mathbox.plot/implicit-surface and the backing
emmy.mathbox.components.plot/ImplicitSurface component. Together they plot
the level set f(x, y, z) = level of an Emmy function inside a box.
f compiles to JavaScript through the same path as the other MathBox
plots, and ev/with-params works with it.
Adds emmy.mathbox.marching-cubes, a pure .cljc marching-cubes
extractor (isosurface, triangle-coords). It returns an indexed
triangle mesh with shared vertices, and is tested on the JVM, including
property tests for closure and level-set accuracy.
Adds the examples.mathbox.implicit notebook with a sphere, a torus, and a
parametrized "tangle cube" whose level is driven by a Leva slider.
#86, superseding #36: adds emmy.mathlive.interpreter, which converts MathLive's
MathJSON into Emmy expressions. Covers
arithmetic, powers, roots, logarithms, trigonometric, hyperbolic and inverse
functions, constants, lists and literal function application.
emmy.mathlive/mathjson->expression exposes it, and
dev/emmy_viewers/mathlive.clj demonstrates it.
#90, superseding #64: adds a Foucault pendulum example at examples.simulation.foucault, which
derives the motion from a rotating-frame Lagrangian and checks the simulated
precession rate against $\Omega \sin \varphi$.
#88, superseding #23: adds examples.minimal-bezier, a notebook that finds the cubic Bézier
curves closest to paths of stationary action (shortest path and
brachistochrone) by minimizing the action over their control points, with an
interactive Mafs demo of draggable control points.
#70:
Adds
emmy.mathbox.physics.{phase-vectors,lagrangian-phase-vectors,hamiltonian-phase-vectors,routhian-phase-vectors}
for building out phase portraits like those in the Phase Portrait and
Quartic Well examples.
many geodesics to the Klein bottle examples.
a matrix basis visualization example to examples.mathbox.geom.
ode-curve now sets :simplify? to false by default.
Converts the phase portrait and quartic well examples to use all server side code and components.
emmy.viewer.components.physics/Evolve now adds a :tick entry into its
state to force re-renders, since the :state array is mutable.
#69:
Adds
emmy.mathbox.physics.{lagrangian-curve,hamiltonian-curve,routhian-curve,geodesic}
to the existing ode-curve function.
Adds
emmy.viewer.physics.{evolve-lagrangian,evolve-hamiltonian,evolve-routhian}
to the existing evolve function.
Updates the emmy.viewer.components.physics/Evolve component to use a
pre-allocated JS output array instead of forcing an allocation on each tick.
#57:
Adds emmy.viewer.physics/evolve, for running realtime physics simulations
and updating state into a client-side atom.
Adds emmy.mathbox.physics/comet, for rendering points with trailing,
fading-out history.
Updates examples.simulation.{oscillator,ellipsoid,double-ellipsoid} to use
the new server-side style.
Modifies emmy.viewer/with-let to allow any number of binding pairs, not
just one.
Adds emmy.clerk/multiviewer for presenting literals via emmy.clerk/multi
with their TeX and original representations, both simplified and
unsimplified.
Adds a missing :offset argument and :z-index, :z-bias and :z-offset
to emmy.mathbox.components.plot/Ticks.
Adds :start? and end? arguments to to
emmy.mathbox.components.plot/LabeledAxis. Also, the :z-index, :z-order
and :z-bias arguments are now passed through to Ticks if not supplied
directly.
Makes the range argument for emmy.mathbox.components.plot/SceneAxes
optional.
Moves ode-compile from emmy.mathbox.physics to emmy.viewer.physics.
#56:
removes demo.mathbox and demo.mathlive from the published jar, and
converts demo.mathbox into an examples-directory-only
examples.simulation.utils. The next step is to convert all remaining cljc
files into clj files using the new APIs.
adds hickory and deep-diff2 as provided dependencies to fix the cljdoc
build.
#55 fixes a bug with live-updating ranges not updating axis labels.
#53:
Consolidates emmy.mafs.{core,coordinate,debug,line,plot} into emmy.mafs.
This allows docstrings to appear properly on the ClojureScript side when
using emmy.mafs, which all my documentation says to do.
Moves the CLJS files for emmy.mathbox.{plot,physics}and
emmy.viewer.stopwatch over to emmy.mathbox.components.{plot,physics} and
emmy.viewer.components.stopwatch.
All reagent-fragment-generating .clj files are now cljc files and
included by emmy.viewer.sci. This enables "editor mode" in the latest
Clerk builds.
#49:
Performs a bunch of README etc updates in preparation for the 0.1.0
release.
Bumps portal to 0.42.1 and enables the Leva portal viewers.
Removes custom JS compilation from the emmy-viewers/clerk template, which
no longer needs it thanks to our precompiled JS.
Sets a default camera :up direction of [0 0 1], removing the need to
emit in xzy order. This would almost certainly have been ultra confusing
to anyone trying to extend the library. Thanks to @ChristopherChudzicki for
the suggestion here.
#44:
Adds emmy.viewer.physics and emmy.mathbox.physics in support of the new
emmy.mathbox.physics/ode-curve function, similar to parametric-curve but
powered by a derivative function and initial state. See the new
ode example page
for a demo.
Adds a new Lorenz attractor example at examples.mathbox.ode.
Adds emmy.clerk/{build!,serve!,halt!} to make it more straightforward to
configure Clerk with our custom JS bundle.
Adds a var-arg viewers argument for other viewers to
emmy.clerk/install!.
Adds emmy.viewer.stopwatch with a client and server-side stopwatch
component; this is currently alpha, but will be used for running physics
animations.
Migrates examples.simulation.toroid to full server-side style with no more
custom viewer.
#32 updates the emmy-viewers/clerk template to use the new pre-compiled
bundle and all of the good stuff in it.
#40 is a huge PR that adds a full 3D plotting system into emmy-viewers!!
Adds emmy.viewer.plot with format-number and label-pi functions,
replacing mafs.core/labelPi.
Upgrades the examples.manifold.pq-knot to full server-side function style,
removing it from the JS bundle.
Fixes the :emmy.portal/mafs viewer so that its theming applies in scope;
this lets you toggle the theme away by activating :emmy.portal/reagent
without affecting the other Mafs scenes in portal.
Adds our first set of ClojureScript tests
Adds the following functions in emmy.mathbox.plot, backed by components on
the ClojureScript side:
scene sets up a batteries-included MathBox scene that can host all of
the objects and curves described below.
point, line and vector provide geometric primitives; point even
supports LaTeX labels.
parametric-curve, of-x, of-y and of-z support 1d => 1d curves
polar-surface, of-xy, of-yz and of-xz support 2d => 1d surface
plotting
parametric-surface supports full 2d => 3d surface generation
vector-field is still in progress, but the basics work. This will
eventually expand into the ability to generate vectors along 1d intervals,
2d areas or 3d volumes.
Huge thanks to Chris Chudzicki of https://www.math3d.org/, who inspired my API here. Steven Petryk and his work on Mafs filled in the gaps for me.
See these namespaces for examples of the new API in action:
#39:
moves emmy.mafs.compile to emmy.viewer.compile, for future use by
MathBox.
ports examples over the new style with emmy.clerk and friends.
#34 renames emmy-viewers.sci to emmy.viewer.sci.
#30:
Adds emmy.mathbox, with functions for creating Reagent fragments that
configure the components from MathBox.cljs
for Clerk (no Portal yet!)
dev/emmy_viewers/mathbox.clj shows off a basic demo
#32:
Adds emmy.mathlive, with functions for creating Reagent fragments that
configure the components from MathLive.cljs
for Portal or Clerk
dev/emmy_viewers/mathlive.clj shows off a basic demo
emmy/portal/mathlive.cljs gives Portal the ability to render MathLive
Mathfield instances by loading MathLive into portal's SCI context.
#31:
Adds emmy.jsxgraph, with functions for creating Reagent fragments that
configure the components from JSXGraph.cljs
for Portal or Clerk
dev/emmy_viewers/jsxgraph.clj shows off some basic demos, though these are
not yet organized
emmy/portal/jsxgraph.cljs gives Portal the ability to render JSXGraph
components by loading JSXGraph into portal's SCI context.
#29:
Upgrades viewer dependencies (other than MathBox) to versions compatible with Portal and able to be evaluated via SCI
Adds emmy.leva, with functions for creating Reagent fragments that
configure the components from Leva.cljs for
Portal or Clerk
dev/emmy_viewers/leva.clj shows off some basic demos, though these are not
yet organized
emmy.viewer/fragment now tags its inputs as Reagent components, vs the
accidental mafs-specific tagging that existed before. mafs components
receive correct metadata to render with or without styling.
emmy/portal/leva.cljs gives Portal the ability to render Leva components
by loading Leva into portal's SCI context.
#26:
Adds emmy.clerk with support for configuring Clerk projects and specific
notebooks with this project's viewers.
Call emmy.clerk/install! within a notebook to activate viewers, and
emmy.clerk/install-css! in your dev/user.clj to configure Clerk with the
CSS required to render Mafs and friends.
Adds emmy.viewer with metadata augmentation and functions for declaring
Reagent fragments that can create reagent.core/atom instances on the
client side, and query and manipulate them.
Adds emmy.mafs as an aggregate namespace for the new emmy.mafs.{core, coordinates, line, debug, plot}. These namespaces allow you to create
Reagent fragments that render in Clerk or Portal using
Mafs.cljs, and take
advantage of Emmy's compilation wherever possible.
Upgrades mafs.cljs to 0.3.0 and clerk-utils to 0.6.0.
Adds dev/emmy_viewers/mafs.clj, dev/examples/mafs.clj and
dev/examples/portal.clj to the static site published to
https://emmy-viewers.mentat.org. (These are still quite scattershot and
not built for exposition yet!)
Modifies dev/user.clj to launch with a pre-built JS bundle by default,
instead of compiling each time. This will make bb clerk-watch or other
ways of invoking user/serve! or user/build! much faster.
#28:
Adds Portal support for all existing
Emmy-Viewers code via emmy.portal. See emmy.portal/{prepare!, install!, start!}.
This required the custom viewers emmy.portal.mafs, emmy.portal.tex and
emmy.portal.reagent, as well as emmy.portal.deps for installing the NPM
deps necessary to make each plugin work.
I'll continue the pattern here for MathBox, Leva and JSXGraph as they come along.
adds emmy.viewer.css with CSS maps for each of the Emmy-Viewers
dependencies. Eventually each of these will move down into the appropriate
sub-project.
Can you improve this documentation? These fine people already did:
Sam Ritchie & Pedro Gomes BranquinhoEdit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |