단위 원의 삼각 함수

Oct 06 2020

이 이미지를 Overleaf로 디지털화하려고합니다. 단위 원 내의 일부 삼각 함수 ( sin, cos, tan, cot )를 나타냅니다 . 그렇게하는 것은 매우 어려운 것 같습니다. 실제로 pgfplots 및 유사한 패키지와 관련된 게시물에 대한 도움을 구했지만 아직 도움이되지 않았습니다. 좀 더 시각적 인 접근을 위해 이미지를 첨부하겠습니다.

미리 감사드립니다.

답변

4 SandyG Dec 12 2020 at 03:34

다음은 선택한 각도로 사진을 조정하는 옵션입니다.

이 명령 \trigfuns[<scale>]{<angle>}{<label>}은 원하는 이미지를 생성합니다. 선택적 인수는 전체 그림의 축척 비율입니다. 기본값은 1이며 반경 1cm의 원이 생성됩니다.

각도는도 단위로 제공됩니다. 20보다 작거나 60보다 크면 레이블이 부서지기 시작합니다.

위의 이미지에서 두 번째 다이어그램은 \trigfuns[2]{40}{x}40 ° 각도로으로 레이블이 지정된 으로 생성되었으며 x세 번째 다이어그램은를 사용합니다 \trigfuns[2]{50}{50^{\circ}}.

레이블은 수학 모드에서 구문 분석됩니다. 다음은 코드입니다.

\documentclass{article}

\usepackage{tikz}
%\usetikzlibrary{positioning}

\newcommand{\trigfuns}[3][1]% #1 is scale factor (default=1), #2 is angle
    {\begin{tikzpicture}[scale=#1, semithick, every node/.style={circle, inner sep=.1mm, font=\scriptsize}]
        \draw (0,0) circle[radius=1];
        \draw (0,0) -- (#2:{max(sec(#2),cosec(#2))});
        \draw (0,0) -- (0,1) -- ({cot(#2)},1)node [label={[above, midway]$\theta$}] {};
        \draw (0,0) -- (1,0) -- (1,{tan(#2)})node [label={[right, midway]$w$}] {};
        \draw ({cos(#2)},0) -- ({cos(#2)},{sin(#2)})node [label={[left,midway]$s$}] {} 
            -- (0, {sin(#2)})node [label={[above,midway]$t$}] {};
        \node at ({.5*cos(#2)},{.5*sin(#2)}) [label=#2+90:$1$] {}; 
        \draw (0:.3) arc (0:#2:.3)node [label={[yshift=.3mm,right,midway]$#3$}] {};
    \end{tikzpicture}}

\begin{document}

\trigfuns[2]{30}{\frac{\pi}{6}}\hspace{-3mm}\trigfuns[2]{40}{x}\qquad\trigfuns[2]{50}{50^{\circ}}

\end{document}
2 mariovilar Oct 08 2020 at 00:54

나는 약간 테스트를 해왔는데 이것이 내 결과입니다. 누구든지 그것을 개선하고 싶다면 그렇게 할 수 있습니다.

\documentclass[tikz, border=30pt]{standalone}
\usetikzlibrary{angles, quotes}
\usepackage{tikz}
\usepackage{amsmath}
\usepackage{mathtools}
 % TIKZ STYLES
 \tikzstyle{important line}=[very thick]
 \tikzstyle{information text}=[rounded corners,fill=red!10,inner sep=1ex]
 \def\costhirty{0.8660256}

\begin{document}
\begin{tikzpicture}[
my angle/.style={draw, <->, angle eccentricity=1.3, angle radius=4.5mm}
                        ]
% COLORS
  \colorlet{sincolor}{red}
  \colorlet{tancolor}{orange!80!black}
  \colorlet{coscolor}{blue}
  \colorlet{cotcolor}{yellow}
  \colorlet{omegacolor}{green}
  \colorlet{epsiloncolor}{purple}
% coordinate axis
\draw[<->] (-2.5,0) -- (2.5,0);
\draw[<->] (0,-2.5) -- (0,2.5);
% circle
\draw (0,0) circle (2cm);
% coordinates
\coordinate[pin= 300:{$( 1,0)$}] (A)  at (2,0);
\coordinate[pin=150:{$(0, 1)$}] (B)  at (0,2);
\coordinate (E)  at (1,0);
\coordinate[pin=100:{$(2,2\sqrt{3})$}] (F)  at (2, 3.46410161514);
\coordinate[pin=360:{$\tan x$}] (G)  at (2, 1.26410161514);
\coordinate[pin=270:{$\cos x$}] (H) at (0.55, 0);
\coordinate[pin=280:{$\sin x$}] (I) at (1, 1);
\coordinate (J) at (1.15470053838, 2);
\coordinate[pin=90:{$\cot x$}] (K) at (0.8, 2);
%
\coordinate                 (M) at (60:2);
\coordinate                 (O) at ( 0:0);

% angles
\draw[thick, sincolor]    (M) -- (E);
\draw[thick, coscolor]    (O) -- (E);
\draw[thick]              (O) -- (F);
\draw[thick, tancolor]    (A) -- (F);
\draw[thick, cotcolor]    (B) -- (J);
\pic[my angle, "$t$"]      {angle = E--O--M};
\newline
\end{tikzpicture}
    
\end{document}

2 JairoA.delRio Dec 12 2020 at 08:38

Overleaf로 작업하고 있으므로 TikZ (PSTricks, Metapost, Asymptote)의 대안을 사용할 수 있습니다. 기회를 제공하려는 경우 Metapost를 사용할 수 있습니다.

\documentclass{article}
\usepackage[shellescape,latex]{gmp}
\newcommand{\nicecircle}[2]{%
\begin{mpost}[name=circle]%
vardef nicecircle(expr unit, Angle) = 
    image(
    %Circle
    path C; C := fullcircle scaled (2*unit);
    pair P[];
    %Radius
    P[1] := dir(Angle)*unit;
    %Some other points
    P[2] := P[1] scaled (1/cosd(Angle));
    P[3] := P[1] scaled (1/sind(Angle));
    P[4] := (xpart P[1], 0);
    P[5] := (0, ypart P[1]);
    draw C;
    draw origin -- P[3] -- (up*unit) -- origin;
    draw origin -- P[2] -- (right*unit) -- origin;
    draw P[1] -- P[4];
    draw P[1] -- P[5];
    label.rt(\btex $s$ etex, 1/2[P[1], P[4]]);
    label.top(\btex $t$ etex, 1/2[P[1], P[5]]);
    label.top(\btex $\theta$ etex, 1/2[up*unit, P[3]]);
    label.rt(\btex $w$ etex, 1/2[right*unit, P[2]]);
    label(\btex $x$ etex, 1/5*unit*dir(Angle/2));
    label.top(\btex 1 etex, .5[origin, P[1]]);
    %Metapost circles are divided in 8 parts, so we divide our angle by 45
    draw subpath (0,Angle/45) of fullcircle scaled (1/5*unit);
    )
enddef;
draw nicecircle(\mpdim{#1}, #2)  withpen currentpen;
\end{mpost}%
\usempost{circle}%
}
\begin{document}
\nicecircle{8em}{30}%Try another angle
\end{document}