Forgot password?
 Create new account
View 690|Reply 0

MMA绘制引力大小示意图

[Copy link]

462

Threads

969

Posts

9934

Credits

Credits
9934

Show all posts

青青子衿 Posted at 2021-5-3 11:38:09 |Read mode
  1. Clear["Global`*"]
  2. G = 6.67259*10^(-11);
  3. Manipulate[Fg = G*(M*m)/r^2;
  4. Show[Plot[G*(M*m)/R^2, {R, 0, 1},
  5.    PlotRange -> {{0, 1.2}, {0, 2*10^(-8)}}],
  6.   Graphics[{Red, PointSize[Large],
  7.     Tooltip[Point[#], #] &[{r, G*(M*m)/r^2}]}]],
  8. Row[{Control[{{M, 5}, 1, 10, 0.01}], "  ", Dynamic[M], "(kg)"}],
  9. Row[{Control[{{m, 1}, 1, 10, 0.01}], "  ", Dynamic[m], "(kg)"}],
  10. Row[{"   ", Control[{{r, 0.3}, 0.1, 1, 0.01}], "  ", Dynamic[r],
  11.    "(metre)"}],
  12. Text@Style[StringForm["F = ``(N)", Dynamic[Fg]], Black],
  13. TrackedSymbols :> {M, m, r}]
Copy the Code

手机版Mobile version|Leisure Math Forum

2025-4-20 21:40 GMT+8

Powered by Discuz!

× Quick Reply To Top Return to the list