Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Latex 5.97 KB | None | 0 0
  1. \documentclass[12pt, a4paper]{article}
  2. \usepackage[utf8]{inputenc}
  3. % \usepackage{amsmath}
  4. % \usepackage{amssymb}
  5. % \usepackage{polski}
  6. % \usepackage{fancyhdr}
  7. % \pagestyle{fancy}
  8. % %\pagenumbering{gobble}
  9. % \headheight=15pt
  10.  
  11.  
  12. \usepackage{graphicx}
  13. \def\pic#1#2{\DeclareGraphicsRule{.#2}{mps}{*}{}\includegraphics{#1.#2}}
  14.  
  15. \begin{document}
  16.    \includegraphics[scale=1.3]{preview.mps}
  17. \end{document}
  18. % pair a,b,c,s;
  19. % numeric u;
  20. % path P;
  21.  
  22. % color pink;
  23. % pink:=blue+red;
  24.  
  25. % u:=1cm;
  26. % a:=(0,0);
  27. % b:=(0,u);
  28. % c:=(u,0);
  29.  
  30. % s:=(a+b+c)/3;
  31.  
  32. % P:=a--b--c--cycle;
  33.  
  34.  
  35. % fill P withcolor red;
  36. % draw P;
  37.  
  38. % draw s withpen pencircle scaled 1bp withcolor green+red;
  39.  
  40. % label.llft(btex $A$ etex,a) withcolor red;
  41. % label.top(btex $B$ etex,b) withcolor red;
  42. % label.lrt(btex $C$ etex,c) withcolor red;
  43.  
  44. % label.llft(btex $S$ etex,s) withcolor green;
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53. % %-----------------------------------------------------------------
  54. % numeric u;
  55. % pair o,a[];
  56.  
  57. % u:=2cm;
  58.  
  59. % o:=(0,0);
  60.  
  61. % a[1]:=(0,u);
  62.  
  63. % numeric n;
  64. % n:=9;
  65.  
  66. % for i:=2 upto n: a[i]=a[i-1] rotatedaround(o,360/n); endfor
  67.  
  68. % %-----------------------------------------------------------------
  69.  
  70. % draw for i:=1 upto 9: a[i]-- endfor cycle withcolor red;
  71.  
  72. % draw a[1]--a[4]--a[7]--cycle withcolor red;
  73. % draw a[1]--a[3] withcolor red;
  74. % draw a[4]--a[6] withcolor red;
  75. % draw a[7]--a[9] withcolor red;
  76.  
  77. % fill Okragwpisany(a[1],a[2],a[3]) withcolor blue;
  78. % fill Okragwpisany(a[1],a[3],a[4]) withcolor blue;
  79. % fill Okragwpisany(a[4],a[5],a[6]) withcolor blue;
  80. % fill Okragwpisany(a[4],a[6],a[7]) withcolor blue;
  81. % fill Okragwpisany(a[7],a[8],a[9]) withcolor blue;
  82. % fill Okragwpisany(a[7],a[9],a[1]) withcolor blue;
  83. % fill Okragwpisany(a[1],a[4],a[7]) withcolor blue;
  84.  
  85.  
  86.  
  87.  
  88. % %-----------------------------------------------------------------
  89. % numeric u;
  90. % pair a,b,c,cc,d;
  91.  
  92. % u:=2cm;
  93.  
  94. % %-----------------------------------------------------------------
  95.  
  96. % a=(0,0);
  97. % b=(4u,0);
  98. % c=(3u,2u);
  99.  
  100. % draw a--b--c--cycle;
  101. % d:=Rzut(Srodekwpisanego(a,b,c),a,b);
  102. % draw c--d withcolor blue;
  103. % fill Okragwpisany(a,d,c) withcolor red;
  104. % fill Okragwpisany(d,b,c) withcolor green;
  105.  
  106. % draw Srodekwpisanego(a,d,c)--Srodekwpisanego(d,b,c);
  107.  
  108.  
  109.  
  110.  
  111. % %-----------------------------------------------------------------
  112. % numeric u;
  113. % pair a,b,c,cc,d,e,f,g,h;
  114.  
  115. % u:=2cm;
  116.  
  117. % %-----------------------------------------------------------------
  118.  
  119. % a=(0,0);
  120. % b=(4u,0);
  121. % c=(3u,2u);
  122.  
  123. % draw a--b--c--cycle;
  124. % d:=(u,0);
  125. % draw c--d withcolor blue;
  126. % draw Okragwpisany(a,d,c);
  127. % draw Okragwpisany(d,b,c);
  128. % e=Srodekwpisanego(a,d,c);
  129. % f=Srodekwpisanego(d,b,c);
  130. % %draw e--f;
  131.  
  132. % g:=Rzut(e,d,c);
  133. % h:=Rzut(f,d,c);
  134.  
  135.  
  136. % draw (g reflectedabout(e,f))--(h reflectedabout(e,f)) dashed evenly withcolor red;
  137.  
  138. % label.llft(btex $A$ etex,a);
  139. % label.lrt(btex $B$ etex,b);
  140. % label.top(btex $C$ etex,c);\
  141.  
  142.  
  143. % %-----------------------------------------------------------------
  144. % numeric u;
  145. % pair a,b,c,cc,d,e,f,g,h,i,j;
  146.  
  147. % u:=2cm;
  148.  
  149. % %-----------------------------------------------------------------
  150.  
  151. % a=(0,0);
  152. % b=(5u,0);
  153. % c=(4u,3u);
  154.  
  155. % draw a--b--c--cycle;
  156. % d:=(2*u,0);
  157. % draw c--d withcolor blue;
  158. % draw Okragwpisany(a,d,c);
  159. % draw Okragwpisany(d,b,c);
  160. % e=Srodekwpisanego(a,d,c);
  161. % f=Srodekwpisanego(d,b,c);
  162. % %draw e--f;
  163.  
  164. % g:=Rzut(e,d,c);
  165. % h:=Rzut(f,d,c);
  166.  
  167. % i:=g reflectedabout(e,f);
  168. % j:=h reflectedabout(e,f);
  169.  
  170. % draw i--j dashed evenly withcolor red;
  171.  
  172. % Punkt(a);
  173. % Punkt(b);
  174. % Punkt(c);
  175. % Ppunkt(e);
  176. % Ppunkt(f);
  177. % Punkt(g);
  178. % Punkt(h);
  179. % Punkt(i);
  180. % Punkt(j);
  181.  
  182. % label.llft(btex $A$ etex,a);
  183. % label.lrt(btex $B$ etex,b);
  184. % label.top(btex $C$ etex,c);
  185.  
  186. % label.lrt(btex $O_1$ etex,e);
  187. % label.lrt(btex $O_2$ etex,f);
  188.  
  189. % label.rt(btex $K$ etex,g);
  190. % label.lrt(btex $L$ etex,h);
  191. % label.urt(btex $M$ etex,i);
  192. % label.urt(btex $N$ etex,j);
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200. % def Okrag(expr o, r) =
  201. %     (o+(0,r))..(o+(r,0)).. (o+(0,-r))..(o+(-r,0))..cycle
  202. % enddef;
  203.  
  204. % def Dlugosc(expr a,b) =
  205. %     sqrt(xpart(a-b)*xpart(a-b)+ypart(a-b)*ypart(a-b))
  206. % enddef;
  207.  
  208. % def Obwod(expr a,b,c) =
  209. %     (Dlugosc(a,b)+Dlugosc(b,c)+Dlugosc(c,a))
  210. % enddef;
  211.  
  212. % def Pole(expr a,b,c) =
  213. %     begingroup
  214. %         save p; numeric p;
  215. %         p:=Obwod(a,b,c)/2;
  216. %         sqrt(p*(p-Dlugosc(a,b))*(p-Dlugosc(b,c))*(p-Dlugosc(c,a)))
  217. %     endgroup
  218. % enddef;
  219.  
  220. % def Promienwpisanego(expr a,b,c) =
  221. %     2*Pole(a,b,c)/Obwod(a,b,c)
  222. % enddef;
  223.  
  224. % def Punktnadwusiecznej(expr b,a,c) =
  225. %     b rotatedaround(a,(angle(c-a)-angle(b-a))/2)
  226. % enddef;
  227.  
  228. % def Srodekwpisanego(expr a,b,c) =
  229. % begingroup
  230. %     save aa, bb, i; pair aa, bb, i;
  231. %     aa:=Punktnadwusiecznej(b,a,c);
  232. %     bb:=Punktnadwusiecznej(c,b,a);
  233. %     i:=whatever[a,aa]=whatever[b,bb];
  234. %     i
  235. % endgroup
  236. % enddef;
  237.  
  238. % def Okragwpisany(expr a,b,c) =
  239. %     Okrag(Srodekwpisanego(a,b,c),Promienwpisanego(a,b,c))
  240. % enddef;
  241.  
  242. % def Rzut(expr a,b,c) =
  243. % begingroup
  244. %     save aa,r; pair aa,r;
  245. %     aa:=a reflectedabout(b,c);
  246. %     r:=(a+aa)/2;
  247. %     r
  248. % endgroup
  249. % enddef;
  250.  
  251. % def Punkt(expr p) =
  252. %     fill Okrag(p,1bp) withcolor white;
  253. %     draw Okrag(p,1bp) withpen pencircle scaled .6pt;
  254. % enddef;
  255.  
  256. % def Ppunkt(expr p) =
  257. %     fill Okrag(p,1bp);
  258. % enddef;
  259.  
  260. % def Kratka(expr m,n,kolor)=
  261. %     begingroup
  262. %     save p; path p;
  263. %     p:=(m,n)*u--(m,n+1)*u--(m+1,n+1)*u--(m+1,n)*u--cycle;
  264. %     fill p withcolor kolor;
  265. %     draw p;
  266. %     endgroup
  267. % enddef;
  268.  
  269. % def Szachownica(expr m,n) =
  270. %     for i:=0 upto m-1:
  271. %     for j:=0 upto n-1:
  272. %         if((2j-i) mod 5=0):
  273. %         Kratka(i,j,c[3]);
  274. %         label(decimal(i+j),(i+.5,j+.5)*u)
  275. %         else: Kratka(i,j,c[0]); fi;
  276. %     endfor
  277. %     endfor
  278. % enddef;
  279.  
  280. % %-----------------------------------------------------------------
  281. % numeric u;
  282.  
  283. % u:=0.5cm;
  284.  
  285. % color c[];
  286. % c[0]:=white;
  287. % c[1]:=black;
  288. % c[2]:=red;
  289. % c[3]:=blue;
  290. % c[4]:=green;
  291. % c[5]:=blue+red;
  292.  
  293.  
  294. % %-----------------------------------------------------------------
  295.  
  296. % Szachownica(8,8);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement