Forgot password?
 Create new account
View 905|Reply 2

用MMA绘制平面曲线的单位切向量

[Copy link]

462

Threads

969

Posts

9934

Credits

Credits
9934

Show all posts

青青子衿 Posted at 2019-5-28 10:44:42 |Read mode
  1. f[x_] := {5 Cos[x], 4 Sin[x]}
  2. h[x_] := FullSimplify[Normalize@g, Refine[Element[x, Reals]]]
  3. Manipulate[
  4. Show[ParametricPlot[{f[x]}, {x, 0, 2 Pi},
  5.      PlotRange -> {{-6, 6}, {-5, 5}}],
  6.     Graphics[{Arrow[{f[t], f[t] + Normalize@g /. x -> t}],
  7.     Arrow[{f[t], f[t] - Normalize@D[h[x], x] /. x -> t}]}]], {t, 0.02,2 Pi}
  8.     ]
Copy the Code

701

Threads

110K

Posts

910K

Credits

Credits
94172
QQ

Show all posts

kuing Posted at 2019-5-28 14:19:25
回复 1# 青青子衿

你是不是漏了给出 g 的定义

462

Threads

969

Posts

9934

Credits

Credits
9934

Show all posts

 Author| 青青子衿 Posted at 2019-5-28 16:15:06
回复 2# kuing
是的,确实漏了。
  1. f[x_] := {5 Cos[x], 4 Sin[x]}
  2. g = D[f[x], x]
  3. h[x_] := FullSimplify[Normalize@g, Refine[Element[x, Reals]]]
  4. Manipulate[
  5. Show[ParametricPlot[{f[x]}, {x, 0, 2 Pi},
  6.      PlotRange -> {{-6, 6}, {-5, 5}}],
  7.     Graphics[{Arrow[{f[t], f[t] + Normalize@g /. x -> t}],
  8.     Arrow[{f[t], f[t] - Normalize@D[h[x], x] /. x -> t}]}]], {t, 0.02,2 Pi}
  9.     ]
Copy the Code

手机版Mobile version|Leisure Math Forum

2025-4-20 22:14 GMT+8

Powered by Discuz!

× Quick Reply To Top Return to the list