What support is there for drawing slope fields in Doenet?
Exercises 2, 3, and 6 here: Exercise 7.2.5.2: Interpreting solutions for a differential equation with a given slope field were accomplished by having both PreFigure diagrams and Doenet interactives within the same exercise. But that is not working in the dynamic/static setup of exercises that allows Runestone to track and record scores - there is only the Doenet part and there are no graphs. If I remove the dynamic/static elements from the exercise, then both the image and the doenet are visible within the exercise again.
I will post on PreTeXt-dev also, but I suspect the answer will be that the dynamic element was not meant to contain multiple things like this. Even if it should be allowed and this is a PreTeXt bug which can be fixed, it just seems nicer and more portable to have the graphs all contained within the same doenetml document as the questions about the graphs.
But I don’t know how to create graphs of slope fields within Doenet. Can you point me toward how to do that?
Thanks,
Chrissy
The real answer is that we haven’t created any slope/vector field features in Doenet. I have made them by using nested <repeat>s containing vectors or line segments, but (A) it is a pain the butt, and (B) it ends up being quite slow.
A couple better options are:
- create images of the slope fields and load them into DoenetML with the
<image> tag.
- request that DoenetML add a
<slopeField> component. Since both jsxgraph and prefigure have slope field features, it shouldn’t be hard to add <slopeField> to both the default graph and the upcoming graph with renderer="prefigure".
Thanks! Few more questions then:
- Loading an image into DoenetML with the image tag makes perfect sense to me in standalone doenet, but I don’t understand the mechanics of that for within PreTeXt. Can it reference an image in the repository? Maybe it can.
- I know you mentioned an ability to embed a standalone DoenetML activity… can I do that within an interactive within PreTeXt the way I can for Desmos instead of including the code for the activity? Long term that’s not as nice since the PreTeXt project wouldn’t be self-contained, but short-term, that’s cool and easier to test/fix things by changing code on beta.doenet.org instead of pushing, rebuilding, deploying, etc all over again.
- I’m very interested in a PreFigure integration! What’s the status of that?
Chrissy