Forgot password
 Register account
View 1041|Reply 2

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

[Copy link]

461

Threads

955

Posts

4

Reputation

Show all posts

青青子衿 posted 2019-5-28 10:44 |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

677

Threads

110K

Posts

214

Reputation

Show all posts

kuing posted 2019-5-28 14:19
回复 1# 青青子衿

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

461

Threads

955

Posts

4

Reputation

Show all posts

original poster 青青子衿 posted 2019-5-28 16:15
回复 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

Quick Reply

Advanced Mode
B Color Image Link Quote Code Smilies
You have to log in before you can reply Login | Register account

$\LaTeX$ formula tutorial

Mobile version

2025-7-6 03:44 GMT+8

Powered by Discuz!

Processed in 0.024859 seconds, 22 queries