Sclub交友聊天~加入聊天室當版主 # @585 y=\sin x定义与图象

 本帖最后由 色k 于 2018-4-9 23:26 编辑 教学乡长 2018-4-9 23:22 我要画这个 \begin{tikzpicture}[scale=1.3] \draw[->] (-2.5,0)--(6.7,0)node[below]{$x$}; \draw[->] (0,-1.5)--(0,1.5)node[left]{$y$}; \node[below left] at (0,0) {$O$}; \node[below right] at (0,-1) {$-1$}; \node[above right] at (0,1) {$1$}; \node[below] at (3.1416/2,0) {$\frac\pi2$}; \node[above right] at (3.1416,0) {$\pi$}; \node[above] at (3.1416*3/2,0) {$\frac{3\pi}2$}; \node[above] at (3.1416*2,0) {$2\pi$}; \draw[domain=0:2*3.1416,smooth] plot (\x,{sin(\x r)}); \node at (4.5,1.3) {$y=\sin x$, $x\in[0,2\pi]$}; \coordinate (O1) at (-1.5,0); \draw (O1) circle (1); \node[below right] at (O1) {$O_1$}; %%下面才是重点 \foreach \i in {0,...,11} {   \coordinate (A\i) at ({cos(\i*30)-1.5},{sin(\i*30)});   \coordinate (B\i) at (\i*3.1416/6,{sin(\i*30)});   \draw (O1)--(A\i);   \draw[dashed] (A\i)--(A\i|-0,0);   \draw[dashed] (B\i)--(B\i|-0,0); } \foreach \i in {3,4,5} \draw[dashed] (A\i)--(B\i); \draw[dashed] (A7)--(B11); \draw[dashed] (A8)--(B10); \draw[dashed] (A9)--(B9); \node[above right] at (A0) {$A$}; \node[above] at (A3) {$B$}; \node[above] at (B3) {$(B)$}; \end{tikzpicture} 回复 5# kuing 擦……
 无意中看了下这帖，才发现原来原图的正弦线是紫色的……
 回复 3# kuing 如果是完全没用过tikz（或者其它命令式）画图的，解释起来是相当困难的
 教学乡长 12:50:37   \draw[dashed] (A\i)--(A\i|-0,0) 后面那个是怎么回事 设 A(x1,y1), B(x2,y2)，则 (A|-B)=(x1,y2), (A-|B)=(x2,y1) 一图胜千言： 2018-4-11 17:52
 回复 1# 色k "偷"走了，虽然，基本都是直接用GSP演示
 返回列表 回复 发帖