mma 随手画

Mathematica 代码

1
2
3
4
5
6
7
f[x_] := -(x - 1)^2 + 4

Manipulate[
Show[Plot[f[x], {x, 0, 4}, AxesOrigin -> {0, -5}, AspectRatio -> 1,
PlotRange -> {-5, 4}, PlotTheme -> "Scientific"],
Graphics[{LightBlue, Triangle[{{0, 3}, {a, f[a]}, {3, 0}}]}]], {a,
0, 4, 0.001}]