Group Abstract Group Abstract

Message Boards Message Boards

Convert a Mathematica Notebook into a fully interactive web page?

Posted 8 years ago
Attachments:
POSTED BY: Sebastian Kuhn
6 Replies
Posted 8 years ago

Yeah but this can get mad expensive for something not worth the cost, unless you write a dispatch API to 5000 free cloud accounts to make use of their 5000 free cloud credits.

D3 is definitely the way to go (also will probably give better performance than the cloud), but it's a non-trivial export process.

POSTED BY: b3m2a1 ​ 
Posted 8 years ago
POSTED BY: Sebastian Kuhn
Posted 8 years ago

Is there more code than what you posted? It seems to be incomplete when I try and run the notebook - missing functions for theta[t]. It also seems that you could publish something similar to what you can find on the Wolfram Demonstrations Projects website and it would work just fine for this use-case. Hell - I might even put it right on the Demo Website itself.

POSTED BY: William Duhe

Why not just send your notebook to the students? Mathematica notebooks are the best medium of technical communication, exploration and learning there is! Much better than "outside of Mathematica documents produced with Mathematica" .

I'm sure there is a reason associated with budgetary or some other kind of restraint, but still it is a shame that teachers and professors get to use Mathematica and many students can't use it.

You can try exporting as cdf, but you had better making the panels self-contained, without relying on separate sliders:

g = 9.81;
rdot = 0.05;
theta0 = 0.2;
thetadot0 = 0;
s = ParametricNDSolveValue[{theta''[t] == 
     Sin[theta[t]]*Cos[theta[t]]*omega^2 - g/r0*Sin[theta[t]], 
    theta[0] == theta0, theta'[0] == thetadot0}, 
   theta, {t, 0, 100}, {omega, r0}];
Manipulate[
 Graphics[{Blue, Circle[{0.0, 0.0}, r0], Black, 
   Line[{{-1.2, 0}, {1.2, 0}}], Line[{{0, -1.2}, {0, 1.2}}], Black, 
   Inset[Style[NumberForm[t, {3, 2}], 20], {1.0, 1.1}], Red, 
   Disk[{r0*Sin[s[omega, r0][t]], -r0*Cos[s[omega, r0][t]]}, rdot]}],
 {t, 0, 100, 0.001, Animator, AnimationRunning -> False, 
  AnimationRepetitions -> 1, AnimationRate -> anrate},
 {anrate, 0.1, 1, 0.05},
 {omega, 0, 20, 0.5},
 {{r0, 1}, 0.01, 2, 0.1}, SaveDefinitions -> True]
POSTED BY: Gianluca Gorni
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard