How to make parabola animation?

Maybe you can post a zip of your work-in-progress? It could be a number of things so the actual code within the context of the .hype document would be useful to see what is happening and help. Thanks!

Ah, I apologize: I'd meant to upload the actual Hype file in my earlier post so you could see the code, but now see I only zipped the exported files. Oops! The Hype doc is attached to this post, and in this one I've changed the slider bounds as you requested, which you can see if you look in the "loadCalc()" function tab (lines 42-48).

Typically I find it easiest to set up a calculator pretty much the way I want it on the Desmos website, and then open the browser's console and enter

copy(Calc.getState());

which copies the settings from that calculator. (You may see undefined in response. Just ignore that; the settings are actually on your clipboard.) Then paste that code into this part of the loadCalc() function:

calculator.setState( 
     [PASTE HERE] 
);

which would mean replacing lines 9 - 64 in this Hype document. Even the Desmos folks say this process is the easiest way to get everything mostly set the way you want it, including letting the site handle writing the equations (via LaTeX) correctly; just much easier than trying to work purely via the API from scratch.

Happy to help you make more progress here, especially if you post your in-progress .hype file as @jonathan suggested. :slightly_smiling_face:

Desmos-in-Hype.hype.zip (15.3 KB)

2 Likes

jonathanJonathan DeutschTeam Tumult
you can post a zip of your work-in-progress

Thank you. here is my file.
quadratic.hype.zip (16.5 KB)
But I was treating exported JavaScript inadvertently and it made my case very complicated.

Thank you again for kind suport.
I was handling the exported JavaScript, which was very complicated :sweat_smile:
and taught me how hype treats our user code in exporting process.

Now I got the picture!
-> vist Demo Site
-> make what you want
-> do "copy(Calc.getState())" in console
-> paste in setState method

nice idea !

2 Likes

Did someone mention drawing curves(especially Sinusoidal ones)!
doublecurvature.github.io/HRSC

1 Like