Advertisement
ngnhtrg

Untitled

Jun 7th, 2025 (edited)
506
0
20 hours
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Latex 4.70 KB | None | 0 0
  1. \begin{frame}[fragile]{Vẽ tam giác}
  2. \textcolor{blue}{\textbf{Asymptote code:}}
  3. \begin{multicols}{2}
  4. \begin{minted}[fontsize=\scriptsize]{asymptote}
  5. size(5cm,0);
  6. pair A = (0.8, 1.5);
  7. pair B = (0, 0);
  8. pair C = (2, 0);
  9. pair D = (B + C)/2;
  10. pair E = (2*A + C)/3;
  11. pair F = (A + 3*B)/4;
  12. pair M = (A+D)/2;
  13. pair N = (2*B+E)/3;
  14. pair P = (3*C+4*F)/7;
  15. fill(M -- N -- P -- cycle, lightblue);
  16. draw(A -- B -- C -- cycle);
  17. draw(A -- D);
  18. draw(B -- E);
  19. draw(C -- F);
  20. label("$A$", A, N);
  21. label("$B$", B, W);
  22. label("$C$", C, E);
  23. label("$D$", D, S);
  24. label("$E$", E, NE);
  25. label("$F$", F, NW);
  26. \end{minted}
  27.  
  28. \columnbreak
  29. \begin{center}
  30. \begin{asy}
  31. size(5cm,0);
  32. pair A = (0.8, 1.5);
  33. pair B = (0, 0);
  34. pair C = (2, 0);
  35. pair D = (B + C)/2;
  36. pair E = (2*A + C)/3;
  37. pair F = (A + 3*B)/4;
  38. fill((3*C+4*F)/7 -- (A+D)/2 -- (2*B+E)/3 -- cycle, lightblue);
  39. draw(A -- B -- C -- cycle);
  40. draw(A -- D);
  41. draw(B -- E);
  42. draw(C -- F);
  43. label("$A$", A, N);
  44. label("$B$", B, W);
  45. label("$C$", C, E);
  46. label("$D$", D, S);
  47. label("$E$", E, NE);
  48. label("$F$", F, NW);
  49. \end{asy}
  50. \end{center}
  51. \end{multicols}
  52. \end{frame}
  53.  
  54. \begin{frame}[fragile]{Vẽ tam giác}
  55. \textcolor{blue}{\textbf{TikZ code:}}
  56. \begin{multicols}{2}
  57. \begin{minted}[fontsize=\scriptsize]{LaTeX}
  58. \coordinate (A) at (0.8, 1.5);
  59. \coordinate (B) at (0, 0);
  60. \coordinate (C) at (2, 0);
  61. \coordinate (D) at ($(B)!0.5!(C)$);
  62. \coordinate (E) at ($(A)!1/3!(C)$);
  63. \coordinate (F) at ($(A)!3/4!(B)$);
  64. \fill[blue!20]
  65.  ($(C)!3/7!(F)$) --
  66.  ($(A)!0.5!(D)$) --
  67.  ($(B)!2/3!(E)$) --
  68.  cycle;
  69. \draw (A) -- (B) -- (C) -- cycle;
  70. \draw (A) -- (D);
  71. \draw (B) -- (E);
  72. \draw (C) -- (F);
  73. \node[above] at (A) {$A$};
  74. \node[below left] at (B) {$B$};
  75. \node[below right] at (C) {$C$};
  76. \node[below] at (D) {$D$};
  77. \node[above right] at (E) {$E$};
  78. \node[above left] at (F) {$F$};
  79. \end{minted}
  80.  
  81. \columnbreak
  82.  
  83. \begin{center}
  84. \begin{tikzpicture}[scale=2]
  85. \coordinate (A) at (0.8, 1.5);
  86. \coordinate (B) at (0, 0);
  87. \coordinate (C) at (2, 0);
  88. \coordinate (D) at ($(B)!0.5!(C)$);
  89. \coordinate (E) at ($(A)!1/3!(C)$);
  90. \coordinate (F) at ($(A)!3/4!(B)$);
  91. \fill[blue!20] ($(C)!4/7!(F)$) -- ($(A)!0.5!(D)$) -- ($(B)!1/3!(E)$) -- cycle;
  92. \draw (A) -- (B) -- (C) -- cycle;
  93. \draw (A) -- (D);
  94. \draw (B) -- (E);
  95. \draw (C) -- (F);
  96. \node[above] at (A) {$A$};
  97. \node[below left] at (B) {$B$};
  98. \node[below right] at (C) {$C$};
  99. \node[below] at (D) {$D$};
  100. \node[above right] at (E) {$E$};
  101. \node[above left] at (F) {$F$};
  102. \end{tikzpicture}  
  103. \end{center}
  104. \end{multicols}
  105. \end{frame}
  106.  
  107. \begin{frame}[fragile]{Vẽ lưới}
  108. \textcolor{blue}{\textbf{Asymptote code:}}
  109. \begin{multicols}{2}
  110. \begin{minted}[fontsize=\scriptsize]{asymptote}
  111. size(5cm);
  112. pair A = (2.5, 2.5);
  113.  
  114. fill(A--(5,4)--(4,4)--(4,5)--cycle, mediumgray);
  115. fill(A--(1,5)--(1,4)--(0,4)--cycle, mediumgray);
  116. fill(A--(0,1)--(1,1)--(1,0)--cycle, mediumgray);
  117. fill(A--(4,0)--(4,1)--(5,1)--cycle, mediumgray);
  118.  
  119. for (int i = 0; i <= 5; ++i)
  120.  draw((i, 0)--(i, 5));
  121.  
  122. for (int j = 0; j <= 5; ++j)
  123.  draw((0, j)--(5, j));
  124.  
  125. draw((0, 1)--(5, 4));
  126. draw((1, 0)--(4, 5));
  127. draw((0, 4)--(5, 1));
  128. draw((4, 0)--(1, 5));
  129. \end{minted}
  130.  
  131. \columnbreak
  132. \begin{center}
  133. \begin{asy}
  134. size(3.5cm);
  135. pair A = (2.5, 2.5);
  136.  
  137. fill(A--(5,4)--(4,4)--(4,5)--cycle, mediumgray);
  138. fill(A--(1,5)--(1,4)--(0,4)--cycle, mediumgray);
  139. fill(A--(0,1)--(1,1)--(1,0)--cycle, mediumgray);
  140. fill(A--(4,0)--(4,1)--(5,1)--cycle, mediumgray);
  141.  
  142. for (int i = 0; i <= 5; ++i)
  143.  draw((i, 0)--(i, 5));
  144.  
  145. for (int j = 0; j <= 5; ++j)
  146.  draw((0, j)--(5, j));
  147.  
  148. draw((0, 1)--(5, 4));
  149. draw((1, 0)--(4, 5));
  150. draw((0, 4)--(5, 1));
  151. draw((4, 0)--(1, 5));
  152. \end{asy}
  153. \end{center}
  154. \end{multicols}
  155. \end{frame}
  156.  
  157. \begin{frame}[fragile]{Vẽ lưới}
  158. \textcolor{blue}{\textbf{TikZ code:}}
  159. \begin{multicols}{2}
  160. \begin{minted}[fontsize=\scriptsize]{LaTeX}
  161. \coordinate (A) at (2.5, 2.5);
  162.  
  163. \fill[gray!60] (A)--(5,4)--(4,4)--(4,5)--cycle;
  164. \fill[gray!60] (A)--(1,5)--(1,4)--(0,4)--cycle;
  165. \fill[gray!60] (A)--(0,1)--(1,1)--(1,0)--cycle;
  166. \fill[gray!60] (A)--(4,0)--(4,1)--(5,1)--cycle;
  167.  
  168. \foreach \i in {0,...,5} {
  169.  \draw (\i,0) -- (\i,5);
  170.  \draw (0,\i) -- (5,\i);
  171. }
  172.  
  173. \draw (0,1) -- (5,4);
  174. \draw (1,0) -- (4,5);
  175. \draw (0,4) -- (5,1);
  176. \draw (4,0) -- (1,5);
  177. \end{minted}
  178.  
  179. \columnbreak
  180.  
  181. \begin{center}
  182. \begin{tikzpicture}[scale=0.8]
  183. \coordinate (A) at (2.5, 2.5);
  184.  
  185. \fill[gray!60] (A)--(5,4)--(4,4)--(4,5)--cycle;
  186. \fill[gray!60] (A)--(1,5)--(1,4)--(0,4)--cycle;
  187. \fill[gray!60] (A)--(0,1)--(1,1)--(1,0)--cycle;
  188. \fill[gray!60] (A)--(4,0)--(4,1)--(5,1)--cycle;
  189.  
  190. \foreach \i in {0,...,5} {
  191.  \draw (\i,0) -- (\i,5);
  192.  \draw (0,\i) -- (5,\i);
  193. }
  194.  
  195. \draw (0,1) -- (5,4);
  196. \draw (1,0) -- (4,5);
  197. \draw (0,4) -- (5,1);
  198. \draw (4,0) -- (1,5);
  199. \end{tikzpicture}
  200. \end{center}
  201. \end{multicols}
  202. \end{frame}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement