christianp,
@christianp@mathstodon.xyz avatar

There's a new release of - https://jsxgraph.org/wp/2024-01-26-release-of-version-1.7.0/.
Among other things, it adds an 'implicit curve' object.

I thought I'd try it out in @numbas, then realised that the way Numbas evaluates expressions is far too slow for this kind of numerical approximation - it does a lot of dynamic type-checking that takes a long time.

So I nerdsniped myself into writing a routine to take a Numbas JME expression and make a function which is as close to native JS as I can get. It works on all of the operations that you'd expect a student to use, since those have plain-JS implementations. There's just the control flow stuff and things to do with collections that need the whole JME system.

And now that I've done that, I have a nice, real-time interactive function plotter!
I've made a demo question at https://numbas.mathcentre.ac.uk/question/152679/give-a-function-defining-an-implicit-curve/preview/

It's really simple to implement in Numbas: you set up a JSXGraph diagram, and fill in the function parameter of the implicit curve object with the expression the student typed. Just a few lines of code. Nice!

A Numbas question with a diagram containing a set of Cartesian axes and two sliders, above an input where I type mathematical expressions. I type the implicit formula for a circle, and the diagram shows a circle. I type a more complicated expression and it shows a more complicated curve. When I move the sliders corresponding to parameters in the expression, the curve changes.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • DreamBathrooms
  • ngwrru68w68
  • cubers
  • magazineikmin
  • thenastyranch
  • rosin
  • khanakhh
  • InstantRegret
  • Youngstown
  • slotface
  • Durango
  • kavyap
  • mdbf
  • tacticalgear
  • JUstTest
  • osvaldo12
  • normalnudes
  • tester
  • cisconetworking
  • everett
  • GTA5RPClips
  • ethstaker
  • anitta
  • Leos
  • provamag3
  • modclub
  • megavids
  • lostlight
  • All magazines