{"id":7757,"date":"2009-04-09T11:16:46","date_gmt":"2009-04-09T08:16:46","guid":{"rendered":"http:\/\/studentpmr.ru\/?p=7757"},"modified":"2009-04-09T11:16:46","modified_gmt":"2009-04-09T08:16:46","slug":"%d1%84%d1%83%d0%bd%d0%ba%d1%86%d0%b8%d1%8f-%d1%80%d0%b8%d1%81%d1%83%d1%8e%d1%89%d0%b0%d1%8f-%d0%b2%d0%be%d0%bb%d1%8c%d1%82%d0%bc%d0%b5%d1%82%d1%80","status":"publish","type":"post","link":"http:\/\/studentpmr.ru\/?p=7757","title":{"rendered":"\u0424\u0443\u043d\u043a\u0446\u0438\u044f, \u0440\u0438\u0441\u0443\u044e\u0449\u0430\u044f \u0432\u043e\u043b\u044c\u0442\u043c\u0435\u0442\u0440"},"content":{"rendered":"<p>void voltmetr(int x1,int y1,int x2,int y2){<\/p>\n<p>int x3,y3;<\/p>\n<p>switch(pozition(x1,y1,x2,y2)){<\/p>\n<p>case 1:<\/p>\n<p> <!--more-->  <\/p>\n<p>if(x2&gt;x1){<\/p>\n<p>y2=y1;<\/p>\n<p>x3=x1+(x2-x1)\/2;<\/p>\n<p>line(x1,y1,x3-10,y1);<\/p>\n<p>line(x3+10,y2,x2,y2);<\/p>\n<p>circle(x3,y1,10);<\/p>\n<p>outtextxy(x3-3,y1-3,&quot;V&quot;);<\/p>\n<p>}<\/p>\n<p>if(x2&lt;x1){<\/p>\n<p>x3=x2+(x1-x2)\/2;<\/p>\n<p>y2=y1;<\/p>\n<p>line(x2,y2,x3-10,y2);<\/p>\n<p>line(x3+10,y1,x1,y2);<\/p>\n<p>circle(x3,y2,10);<\/p>\n<p>outtextxy(x3-3,y2-3,&quot;V&quot;);<\/p>\n<p>}<\/p>\n<p>break;<\/p>\n<p>case 2:<\/p>\n<p>if(y1&lt;y2){<\/p>\n<p>y3=y1+(y2-y1)\/2;<\/p>\n<p>x2=x1;<\/p>\n<p>line(x1,y1,x1,y3-10);<\/p>\n<p>line(x1,y3+10,x2,y2);<\/p>\n<p>circle(x1,y3,10);<\/p>\n<p>outtextxy(x1-3,y3-3,&quot;V&quot;);<\/p>\n<p>}<\/p>\n<p>if(y1&gt;y2){<\/p>\n<p>y3=y2+(y1-y2)\/2;<\/p>\n<p>x2=x1;<\/p>\n<p>line(x1,y1,x1,y3+10);<\/p>\n<p>line(x2,y3-10,x2,y2);<\/p>\n<p>circle(x1,y3,10);<\/p>\n<p>outtextxy(x1-3,y3-3,&quot;V&quot;);<\/p>\n<p>}<\/p>\n<p>break;<\/p>\n<p>case 3:<\/p>\n<p>if(x2&gt;x1){<\/p>\n<p>y2=y1-(x2-x1);<\/p>\n<p>x3=x1+(x2-x1)\/2;<\/p>\n<p>y3=y1+(y2-y1)\/2;<\/p>\n<p>line(x1,y1,x3-7,y3+7);<\/p>\n<p>line(x3+7,y3-7,x2,y2);<\/p>\n<p>circle(x3,y3,10);<\/p>\n<p>outtextxy(x3-3,y3-3,&quot;V&quot;);<\/p>\n<p>}<\/p>\n<p>if(x2&lt;x1){<\/p>\n<p>y2=y1+(x1-x2);<\/p>\n<p>x3=x2+(x1-x2)\/2;<\/p>\n<p>y3=y1+(y2-y1)\/2;<\/p>\n<p>line(x1,y1,x3+7,y3-7);<\/p>\n<p>line(x3-7,y3+7,x2,y2);<\/p>\n<p>circle(x3,y3,10);<\/p>\n<p>outtextxy(x3-3,y3-3,&quot;V&quot;);<\/p>\n<p>}<\/p>\n<p>break;<\/p>\n<p>case 4:<\/p>\n<p>if(x2&gt;x1){<\/p>\n<p>y2=y1+(x2-x1);<\/p>\n<p>x3=x1+(x2-x1)\/2;<\/p>\n<p>y3=y1+(y2-y1)\/2;<\/p>\n<p>line(x1,y1,x3-7,y3-7);<\/p>\n<p>line(x3+7,y3+7,x2,y2);<\/p>\n<p>circle(x3,y3,10);<\/p>\n<p>outtextxy(x3-3,y3-3,&quot;V&quot;);<\/p>\n<p>}<\/p>\n<p>if(x2&lt;x1){<\/p>\n<p>y2=y1-(x1-x2);<\/p>\n<p>x3=x2+(x1-x2)\/2;<\/p>\n<p>y3=y2+(y1-y2)\/2;<\/p>\n<p>line(x1,y1,x3+7,y3+7);<\/p>\n<p>line(x3-7,y3-7,x2,y2);<\/p>\n<p>circle(x3,y3,10);<\/p>\n<p>outtextxy(x3-3,y3-3,&quot;V&quot;);<\/p>\n<p>}<\/p>\n<p>break;<\/p>\n<p>}<\/p>\n<p>}<\/p>\n<p>\/\/ \u0424\u0443\u043d\u043a\u0446\u0438\u044f, \u0440\u0438\u0441\u0443\u044e\u0449\u0430\u044f \u0437\u0430\u0437\u0435\u043c\u043b\u0438\u0442\u0435\u043b\u044c<\/p>\n<p>void zazemlitel(int x1,int y1,int x2,int y2){<\/p>\n<p>switch(pozition(x1,y1,x2,y2)){<\/p>\n<p>case 1:<\/p>\n<p>if(x2&gt;x1){<\/p>\n<p>y2=y1;<\/p>\n<p>line(x1,y1,x2-8,y2);<\/p>\n<p>line(x2-8,y2-7,x2-8,y2+7);<\/p>\n<p>line(x2-4,y2-4,x2-4,y2+4);<\/p>\n<p>line(x2,y2-1,x2,y1+1);<\/p>\n<p>}<\/p>\n<p>if(x2&lt;x1){<\/p>\n<p>y2=y1;<\/p>\n<p>line(x2+8,y2,x1,y1);<\/p>\n<p>line(x2+8,y2-7,x2+8,y2+7);<\/p>\n<p>line(x2+4,y2-4,x2+4,y2+4);<\/p>\n<p>line(x2,y2-1,x2,y2+1);<\/p>\n<p>}<\/p>\n<p>break;<\/p>\n<p>case 2:<\/p>\n<p>if(y1&lt;y2){<\/p>\n<p>x2=x1;<\/p>\n<p>line(x1,y1,x2,y2-8);<\/p>\n<p>line(x2-7,y2-8,x2+7,y2-8);<\/p>\n<p>line(x2-4,y2-4,x2+4,y2-4);<\/p>\n<p>line(x2-1,y2,x2+1,y2);<\/p>\n<p>}<\/p>\n<p>if(y1&gt;y2){<\/p>\n<p>x2=x1;<\/p>\n<p>line(x1,y1,x2,y2+8);<\/p>\n<p>line(x2-7,y2+8,x2+7,y2+8);<\/p>\n<p>line(x2-4,y2+4,x2+4,y2+4);<\/p>\n<p>line(x2-1,y2,x2+1,y2);<\/p>\n<p>}<\/p>\n<p>break;<\/p>\n<p>case 3:<\/p>\n<p>if(x2&gt;x1){<\/p>\n<p>y2=y1-(x2-x1);<\/p>\n<p>line(x1,y1,x2-4,y2+4);<\/p>\n<p>line(x2-9,y2-1,x2+1,y2+9);<\/p>\n<p>line(x2-5,y2-1,x2+1,y2+5);<\/p>\n<p>line(x2-1,y2-1,x2+1,y2+1);<\/p>\n<p>}<\/p>\n<p>if(x2&lt;x1){<\/p>\n<p>y2=y1+(x1-x2);<\/p>\n<p>line(x1,y1,x2+4,y2-4);<\/p>\n<p>line(x2+9,y2+1,x2-1,y2-9);<\/p>\n<p>line(x2+5,y2+1,x2-1,y2-5);<\/p>\n<p>line(x2+1,y2+1,x2-1,y2-1);<\/p>\n<p>}<\/p>\n<p>break;<\/p>\n<p>case 4:<\/p>\n<p>if(x2&gt;x1){<\/p>\n<p>y2=y1+(x2-x1);<\/p>\n<p>line(x1,y1,x2-4,y2-4);<\/p>\n<p>line(x2-9,y2+1,x2+1,y2-9);<\/p>\n<p>line(x2-5,y2+1,x2+1,y2-5);<\/p>\n<p>line(x2-1,y2+1,x2+1,y2-1);<\/p>\n<p>}<\/p>\n<p>if(x2&lt;x1){<\/p>\n<p>y2=y1-(x1-x2);<\/p>\n<p>line(x1,y1,x2+4,y2+4);<\/p>\n<p>line(x2+9,y2-1,x2-1,y2+9);<\/p>\n<p>line(x2+5,y2-1,x2-1,y2+5);<\/p>\n<p>line(x2+1,y2-1,x2-1,y2+1);<\/p>\n<p>}<\/p>\n<p>break;<\/p>\n<p>}<\/p>\n<p>}<\/p>\n<p>\/\/ \u0424\u0443\u043d\u043a\u0446\u0438\u044f, \u0440\u0438\u0441\u0443\u044e\u0449\u0430\u044f \u0434\u0438\u043e\u0434<\/p>\n<p>void diod(int x1,int y1,int x2,int y2){<\/p>\n<p>int x3,y3;<\/p>\n<p>switch(pozition(x1,y1,x2,y2)){<\/p>\n<p>case 1:<\/p>\n<p>if(x2&gt;x1){<\/p>\n<p>y2=y1;<\/p>\n<p>x3=x1+(x2-x1)\/2;<\/p>\n<p>line(x1,y1,x2,y2);<\/p>\n<p>line(x3+7,y1-7,x3+7,y1+7);<\/p>\n<p>line(x3+7,y1,x3-7,y1+7);<\/p>\n<p>line(x3+7,y1,x3-7,y1-7);<\/p>\n<p>line(x3-7,y1-7,x3-7,y1+7);<\/p>\n<p>}<\/p>\n<p>if(x2&lt;x1){<\/p>\n<p>x3=x2+(x1-x2)\/2;<\/p>\n<p>y2=y1;<\/p>\n<p>line(x2,y2,x1,y1);<\/p>\n<p>line(x3-7,y2-7,x3-7,y2+7);<\/p>\n<p>line(x3-7,y2,x3+7,y1+7);<\/p>\n<p>line(x3-7,y2,x3+7,y1-7);<\/p>\n<p>line(x3+7,y1-7,x3+7,y1+7);<\/p>\n<p>}<\/p>\n<p>break;<\/p>\n<p>case 2:<\/p>\n<p>if(y1&lt;y2){<\/p>\n<p>y3=y1+(y2-y1)\/2;<\/p>\n<p>x2=x1;<\/p>\n<p>line(x1,y1,x2,y2);<\/p>\n<p>line(x1-7,y3-7,x1+7,y3-7);<\/p>\n<p>line(x1-7,y3+7,x1+7,y3+7);<\/p>\n<p>line(x1-7,y3-7,x1,y3+7);<\/p>\n<p>line(x1+7,y3-7,x1,y3+7);<\/p>\n<p>}<\/p>\n<p>if(y1&gt;y2){<\/p>\n<p>y3=y2+(y1-y2)\/2;<\/p>\n<p>x2=x1;<\/p>\n<p>line(x1,y1,x2,y2);<\/p>\n<p>line(x1-7,y3+7,x1+7,y3+7);<\/p>\n<p>line(x1-7,y3-7,x1+7,y3-7);<\/p>\n<p>line(x1-7,y3+7,x1,y3-7);<\/p>\n<p>line(x1+7,y3+7,x1,y3-7);<\/p>\n<p>}<\/p>\n<p>break;<\/p>\n<p>case 3:<\/p>\n<p>if(x2&gt;x1){<\/p>\n<p>y2=y1-(x2-x1);<\/p>\n<p>x3=x1+(x2-x1)\/2;<\/p>\n<p>y3=y1+(y2-y1)\/2;<\/p>\n<p>line(x1,y1,x2,y2);<\/p>\n<p>line(x3-10,y3,x3,y3+10);<\/p>\n<p>line(x3,y3-10,x3+10,y3);<\/p>\n<p>line(x3-10,y3,x3+5,y3-5);<\/p>\n<p>line(x3,y3+10,x3+5,y3-5);<\/p>\n<p>}<\/p>\n<p>if(x2&lt;x1){<\/p>\n<p>y2=y1+(x1-x2);<\/p>\n<p>x3=x2+(x1-x2)\/2;<\/p>\n<p>y3=y1+(y2-y1)\/2;<\/p>\n<p>line(x1,y1,x2,y2);<\/p>\n<p>line(x3+10,y3,x3,y3-10);<\/p>\n<p>line(x3,y3+10,x3-10,y3);<\/p>\n<p>line(x3+10,y3,x3-5,y3+5);<\/p>\n<p>line(x3,y3-10,x3-5,y3+5);<\/p>\n<p>}<\/p>\n<p>break;<\/p>\n<p>case 4:<\/p>\n<p>if(x2&gt;x1){<\/p>\n<p>y2=y1+(x2-x1);<\/p>\n<p>x3=x1+(x2-x1)\/2;<\/p>\n<p>y3=y1+(y2-y1)\/2;<\/p>\n<p>line(x1,y1,x2,y2);<\/p>\n<p>line(x3-10,y3,x3,y3-10);<\/p>\n<p>line(x3,y3+10,x3+10,y3);<\/p>\n<p>line(x3-10,y3,x3+5,y3+5);<\/p>\n<p>line(x3,y3-10,x3+5,y3+5);<\/p>\n<p>}<\/p>\n<p>if(x2&lt;x1){<\/p>\n<p>y2=y1-(x1-x2);<\/p>\n<p>x3=x2+(x1-x2)\/2;<\/p>\n<p>y3=y2+(y1-y2)\/2;<\/p>\n<p>line(x1,y1,x2,y2);<\/p>\n<p>line(x3+10,y3,x3,y3+10);<\/p>\n<p>line(x3,y3-10,x3-10,y3);<\/p>\n<p>line(x3+10,y3,x3-5,y3-5);<\/p>\n<p>line(x3,y3+10,x3-5,y3-5);<\/p>\n<p>}<\/p>\n<p>break;<\/p>\n<p>}<\/p>\n<p>}<\/p>\n","protected":false},"excerpt":{"rendered":"<p>void voltmetr(int x1,int y1,int x2,int y2){ int x3,y3; switch(pozition(x1,y1,x2,y2)){ case 1:<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[67],"tags":[],"_links":{"self":[{"href":"http:\/\/studentpmr.ru\/index.php?rest_route=\/wp\/v2\/posts\/7757"}],"collection":[{"href":"http:\/\/studentpmr.ru\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/studentpmr.ru\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/studentpmr.ru\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/studentpmr.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7757"}],"version-history":[{"count":0,"href":"http:\/\/studentpmr.ru\/index.php?rest_route=\/wp\/v2\/posts\/7757\/revisions"}],"wp:attachment":[{"href":"http:\/\/studentpmr.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7757"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/studentpmr.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=7757"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/studentpmr.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=7757"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}