{"id":7755,"date":"2009-04-09T11:15:30","date_gmt":"2009-04-09T08:15:30","guid":{"rendered":"http:\/\/studentpmr.ru\/?p=7755"},"modified":"2009-04-09T11:15:30","modified_gmt":"2009-04-09T08:15:30","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%b3%d0%b0%d0%bb%d1%8c%d0%b2%d0%b0%d0%bd%d0%be%d0%bc%d0%b5%d1%82%d1%80","status":"publish","type":"post","link":"http:\/\/studentpmr.ru\/?p=7755","title":{"rendered":"\u0424\u0443\u043d\u043a\u0446\u0438\u044f, \u0440\u0438\u0441\u0443\u044e\u0449\u0430\u044f \u0433\u0430\u043b\u044c\u0432\u0430\u043d\u043e\u043c\u0435\u0442\u0440"},"content":{"rendered":"<p>void galvanometr(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>line(x3-5,y1+3,x3+5,y1-3);<\/p>\n<p>line(x3+5,y1-3,x3,y1-2);<\/p>\n<p>line(x3+5,y1-3,x3+3,y1-1);<\/p>\n<p>putpixel(x3+2,y1,15);<\/p>\n<p>putpixel(x3+2,y1+1,15);<\/p>\n<p>putpixel(x3+1,y1,15);<\/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>line(x3-5,y1+3,x3+5,y1-3);<\/p>\n<p>line(x3+5,y1-3,x3,y1-2);<\/p>\n<p>line(x3+5,y1-3,x3+3,y1-1);<\/p>\n<p>putpixel(x3+2,y1,15);<\/p>\n<p>putpixel(x3+2,y1+1,15);<\/p>\n<p>putpixel(x3+1,y1,15);<\/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>line(x1-5,y3+3,x1+5,y3-3);<\/p>\n<p>line(x1+5,y3-3,x1,y3-2);<\/p>\n<p>line(x1+5,y3-3,x1+3,y3-1);<\/p>\n<p>putpixel(x1+2,y3,15);<\/p>\n<p>putpixel(x1+2,y3+1,15);<\/p>\n<p>putpixel(x1+1,y3,15);<\/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>line(x1-5,y3+3,x1+5,y3-3);<\/p>\n<p>line(x1+5,y3-3,x1,y3-2);<\/p>\n<p>line(x1+5,y3-3,x1+3,y3-1);<\/p>\n<p>putpixel(x1+2,y3,15);<\/p>\n<p>putpixel(x1+2,y3+1,15);<\/p>\n<p>putpixel(x1+1,y3,15);<\/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>line(x3-5,y3+3,x3+5,y3-3);<\/p>\n<p>line(x3+5,y3-3,x3,y3-2);<\/p>\n<p>line(x3+5,y3-3,x3+3,y3-1);<\/p>\n<p>putpixel(x3+2,y3,15);<\/p>\n<p>putpixel(x3+2,y3+1,15);<\/p>\n<p>putpixel(x3+1,y3,15);<\/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>line(x3-5,y3+3,x3+5,y3-3);<\/p>\n<p>line(x3+5,y3-3,x3,y3-2);<\/p>\n<p>line(x3+5,y3-3,x3+3,y3-1);<\/p>\n<p>putpixel(x3+2,y3,15);<\/p>\n<p>putpixel(x3+2,y3+1,15);<\/p>\n<p>putpixel(x3+1,y3,15);<\/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>line(x3-5,y3+3,x3+5,y3-3);<\/p>\n<p>line(x3+5,y3-3,x3,y3-2);<\/p>\n<p>line(x3+5,y3-3,x3+3,y3-1);<\/p>\n<p>putpixel(x3+2,y3,15);<\/p>\n<p>putpixel(x3+2,y3+1,15);<\/p>\n<p>putpixel(x3+1,y3,15);<\/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>line(x3-5,y3+3,x3+5,y3-3);<\/p>\n<p>line(x3+5,y3-3,x3,y3-2);<\/p>\n<p>line(x3+5,y3-3,x3+3,y3-1);<\/p>\n<p>putpixel(x3+2,y3,15);<\/p>\n<p>putpixel(x3+2,y3+1,15);<\/p>\n<p>putpixel(x3+1,y3,15);<\/p>\n<p>}<\/p>\n<p>break;<\/p>\n<p>}<\/p>\n<p>}<\/p>\n","protected":false},"excerpt":{"rendered":"<p>void galvanometr(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\/7755"}],"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=7755"}],"version-history":[{"count":0,"href":"http:\/\/studentpmr.ru\/index.php?rest_route=\/wp\/v2\/posts\/7755\/revisions"}],"wp:attachment":[{"href":"http:\/\/studentpmr.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7755"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/studentpmr.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=7755"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/studentpmr.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=7755"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}