Mathematica Manipulate [ ] example to port over to Observable

Sliders lag, just click or drag to a final setting and wait for a second or two:

https://my.compclassnotes.com/guest/8943/frame
https://my.compclassnotes.com/guest/8944/frame
https://www.wolframcloud.com/obj/ccn/Published/concave_lense_focal.nb

These are Manipulate [ ] Dynamic Modules running remotely live in Wolfram Cloud, issues:

  1. Sliders are 1-4s delayed worldwide, students and teachers are not complaining but is a problem requires fixing

  2. In order for these to work they need to connect to Wolfram Cloud or else nothing works!

  3. Gif: We tried to do animations in gif using the gif players, it all worked really nice but resolution is very low e.g. if we use serious mathematical typesetting with small fonts and sub and post scripts the symbols are difficult for the students read off of gif or even jpg. Therefore we need SVG.

  4. Advantage: the lens could be arbitrary shape e.g. a lens with cavity inside or the cavity filled with different refractive material! In Mathematica we handle the arbitrary shapes by Regions:

https://reference.wolfram.com/language/guide/GeometricSpecialRegions.html

The programmer then does not need to parametrize and chase boundaries to cut and glue and all that solid modelling computations, simply define boolean or parametric regions and call global intersection union complement functions. The code is small but very general.

To do this in Observable using Python or Java libraries is quite a large takeover.

Proposal: We develop API functions that Observable code calls into Wolfram cloud to obtain the JSON structure for each frame or call simply upload a JSON file already in place somewhere.

For the starter we might start with one slider to avoid the combinatorics of possibilities.

Also as a part of the JSON we can dump the solvers from Mathematica i.e. for complicated symbolic systems, we can simply rely on Mathematica solvers, cached or on-demand, and place the symbolics and solutions into the JSON.

This way Observable notebook does what is excellent at and Mathematica does what it is excellent at.

I wanted to do this 5 years back with D3, and as beautiful as it was, it was not capable of such computing. Bostock made a lot of great decisions.

Much more on this later

Dara