|
Author |
kuing
Posted at yesterday 15:43
Last edited by kuing at yesterday 16:01顺便说一下,反三角函数的输出也是角度制,即 atan(1) 得到的是 45 而不是 `\pi/4`。
因此要画 arctan(x) 时如果用
- \tikz{
- \draw[domain=-3:3,smooth] plot (\x,{atan(\x)});
- }
Copy the Code
那线条将会飞上天!(此处无法展示)
应该改成
- \tikz{
- \draw[domain=-3:3,smooth] plot (\x,{atan(\x)/(1r)});
- }
Copy the Code
(我试过直接 /r 是不行的,r 前似乎必须有数值,而 /1r 也不行,必须 /(1r))
效果:
%2F(1r)%7D);%0A%7D)
由以上可知,如果要画 sin(arccos(x)),就不用加任何东西,比如:
- \tikz{
- \draw[domain=-1:1,smooth] plot (\x,{sin(acos(\x))});
- }
Copy the Code
(两边不圆滑,可加大 samples(默认 25),这里仅作演示所以不加)
但如果要画 arccos(sin(x)),那就里外两层都得处理:
- \tikz{
- \draw[domain=0:2*pi] plot (\x,{acos(sin(\x r))/(1r)});
- }
Copy the Code
(由于知道是直线,所以去掉 smooth) |
|