Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- \begin{frame}[fragile]{Vẽ tam giác}
- \textcolor{blue}{\textbf{Asymptote code:}}
- \begin{multicols}{2}
- \begin{minted}[fontsize=\scriptsize]{asymptote}
- size(5cm,0);
- pair A = (0.8, 1.5);
- pair B = (0, 0);
- pair C = (2, 0);
- pair D = (B + C)/2;
- pair E = (2*A + C)/3;
- pair F = (A + 3*B)/4;
- pair M = (A+D)/2;
- pair N = (2*B+E)/3;
- pair P = (3*C+4*F)/7;
- fill(M -- N -- P -- cycle, lightblue);
- draw(A -- B -- C -- cycle);
- draw(A -- D);
- draw(B -- E);
- draw(C -- F);
- label("$A$", A, N);
- label("$B$", B, W);
- label("$C$", C, E);
- label("$D$", D, S);
- label("$E$", E, NE);
- label("$F$", F, NW);
- \end{minted}
- \columnbreak
- \begin{center}
- \begin{asy}
- size(5cm,0);
- pair A = (0.8, 1.5);
- pair B = (0, 0);
- pair C = (2, 0);
- pair D = (B + C)/2;
- pair E = (2*A + C)/3;
- pair F = (A + 3*B)/4;
- fill((3*C+4*F)/7 -- (A+D)/2 -- (2*B+E)/3 -- cycle, lightblue);
- draw(A -- B -- C -- cycle);
- draw(A -- D);
- draw(B -- E);
- draw(C -- F);
- label("$A$", A, N);
- label("$B$", B, W);
- label("$C$", C, E);
- label("$D$", D, S);
- label("$E$", E, NE);
- label("$F$", F, NW);
- \end{asy}
- \end{center}
- \end{multicols}
- \end{frame}
- \begin{frame}[fragile]{Vẽ tam giác}
- \textcolor{blue}{\textbf{TikZ code:}}
- \begin{multicols}{2}
- \begin{minted}[fontsize=\scriptsize]{LaTeX}
- \coordinate (A) at (0.8, 1.5);
- \coordinate (B) at (0, 0);
- \coordinate (C) at (2, 0);
- \coordinate (D) at ($(B)!0.5!(C)$);
- \coordinate (E) at ($(A)!1/3!(C)$);
- \coordinate (F) at ($(A)!3/4!(B)$);
- \fill[blue!20]
- ($(C)!3/7!(F)$) --
- ($(A)!0.5!(D)$) --
- ($(B)!2/3!(E)$) --
- cycle;
- \draw (A) -- (B) -- (C) -- cycle;
- \draw (A) -- (D);
- \draw (B) -- (E);
- \draw (C) -- (F);
- \node[above] at (A) {$A$};
- \node[below left] at (B) {$B$};
- \node[below right] at (C) {$C$};
- \node[below] at (D) {$D$};
- \node[above right] at (E) {$E$};
- \node[above left] at (F) {$F$};
- \end{minted}
- \columnbreak
- \begin{center}
- \begin{tikzpicture}[scale=2]
- \coordinate (A) at (0.8, 1.5);
- \coordinate (B) at (0, 0);
- \coordinate (C) at (2, 0);
- \coordinate (D) at ($(B)!0.5!(C)$);
- \coordinate (E) at ($(A)!1/3!(C)$);
- \coordinate (F) at ($(A)!3/4!(B)$);
- \fill[blue!20] ($(C)!4/7!(F)$) -- ($(A)!0.5!(D)$) -- ($(B)!1/3!(E)$) -- cycle;
- \draw (A) -- (B) -- (C) -- cycle;
- \draw (A) -- (D);
- \draw (B) -- (E);
- \draw (C) -- (F);
- \node[above] at (A) {$A$};
- \node[below left] at (B) {$B$};
- \node[below right] at (C) {$C$};
- \node[below] at (D) {$D$};
- \node[above right] at (E) {$E$};
- \node[above left] at (F) {$F$};
- \end{tikzpicture}
- \end{center}
- \end{multicols}
- \end{frame}
- \begin{frame}[fragile]{Vẽ lưới}
- \textcolor{blue}{\textbf{Asymptote code:}}
- \begin{multicols}{2}
- \begin{minted}[fontsize=\scriptsize]{asymptote}
- size(5cm);
- pair A = (2.5, 2.5);
- fill(A--(5,4)--(4,4)--(4,5)--cycle, mediumgray);
- fill(A--(1,5)--(1,4)--(0,4)--cycle, mediumgray);
- fill(A--(0,1)--(1,1)--(1,0)--cycle, mediumgray);
- fill(A--(4,0)--(4,1)--(5,1)--cycle, mediumgray);
- for (int i = 0; i <= 5; ++i)
- draw((i, 0)--(i, 5));
- for (int j = 0; j <= 5; ++j)
- draw((0, j)--(5, j));
- draw((0, 1)--(5, 4));
- draw((1, 0)--(4, 5));
- draw((0, 4)--(5, 1));
- draw((4, 0)--(1, 5));
- \end{minted}
- \columnbreak
- \begin{center}
- \begin{asy}
- size(3.5cm);
- pair A = (2.5, 2.5);
- fill(A--(5,4)--(4,4)--(4,5)--cycle, mediumgray);
- fill(A--(1,5)--(1,4)--(0,4)--cycle, mediumgray);
- fill(A--(0,1)--(1,1)--(1,0)--cycle, mediumgray);
- fill(A--(4,0)--(4,1)--(5,1)--cycle, mediumgray);
- for (int i = 0; i <= 5; ++i)
- draw((i, 0)--(i, 5));
- for (int j = 0; j <= 5; ++j)
- draw((0, j)--(5, j));
- draw((0, 1)--(5, 4));
- draw((1, 0)--(4, 5));
- draw((0, 4)--(5, 1));
- draw((4, 0)--(1, 5));
- \end{asy}
- \end{center}
- \end{multicols}
- \end{frame}
- \begin{frame}[fragile]{Vẽ lưới}
- \textcolor{blue}{\textbf{TikZ code:}}
- \begin{multicols}{2}
- \begin{minted}[fontsize=\scriptsize]{LaTeX}
- \coordinate (A) at (2.5, 2.5);
- \fill[gray!60] (A)--(5,4)--(4,4)--(4,5)--cycle;
- \fill[gray!60] (A)--(1,5)--(1,4)--(0,4)--cycle;
- \fill[gray!60] (A)--(0,1)--(1,1)--(1,0)--cycle;
- \fill[gray!60] (A)--(4,0)--(4,1)--(5,1)--cycle;
- \foreach \i in {0,...,5} {
- \draw (\i,0) -- (\i,5);
- \draw (0,\i) -- (5,\i);
- }
- \draw (0,1) -- (5,4);
- \draw (1,0) -- (4,5);
- \draw (0,4) -- (5,1);
- \draw (4,0) -- (1,5);
- \end{minted}
- \columnbreak
- \begin{center}
- \begin{tikzpicture}[scale=0.8]
- \coordinate (A) at (2.5, 2.5);
- \fill[gray!60] (A)--(5,4)--(4,4)--(4,5)--cycle;
- \fill[gray!60] (A)--(1,5)--(1,4)--(0,4)--cycle;
- \fill[gray!60] (A)--(0,1)--(1,1)--(1,0)--cycle;
- \fill[gray!60] (A)--(4,0)--(4,1)--(5,1)--cycle;
- \foreach \i in {0,...,5} {
- \draw (\i,0) -- (\i,5);
- \draw (0,\i) -- (5,\i);
- }
- \draw (0,1) -- (5,4);
- \draw (1,0) -- (4,5);
- \draw (0,4) -- (5,1);
- \draw (4,0) -- (1,5);
- \end{tikzpicture}
- \end{center}
- \end{multicols}
- \end{frame}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement