{"id":196104,"date":"2013-10-03T12:46:02","date_gmt":"2013-10-03T08:46:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=196104"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=196104","title":{"rendered":"<span class=\"post_title\">\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0442\u0440\u0435\u0445\u0442\u043e\u0447\u0435\u0447\u043d\u043e\u0433\u043e \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u0430<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t\u041f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e, \u0434\u0440\u0443\u0437\u044c\u044f.<\/p>\n<p>  \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u0432\u0430\u043c \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c <b>\u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u044b\u0439 \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442<\/b>. \u041d\u0430\u0432\u0435\u0440\u043d\u044f\u043a\u0430 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f\u0437\u044b\u043a\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u043c\u0435\u044e\u0442 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0435 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438. \u041c\u044b \u0436\u0435 \u0441 \u0432\u0430\u043c\u0438 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0444\u043e\u0440\u043c\u0443\u043b\u044b. \u0412\u043e\u0442 \u0447\u0442\u043e \u0432 \u0438\u0442\u043e\u0433\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c:<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/1de\/ff0\/96c\/1deff096c6dc99ca07a20f5bbd0ad964.png\"\/><\/p>\n<h4>\u0427\u0442\u043e \u0438\u043c\u0435\u0435\u043c:<\/h4>\n<p> \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a \u0441 \u0432\u0435\u0440\u0448\u0438\u043d\u0430\u043c\u0438 \u0432 \u0442\u043e\u0447\u043a\u0430\u0445 A,B \u0438 C. \u0422\u043e\u0447\u043a\u0438 \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u043f\u0435\u043d\u0434\u0438\u043a\u0443\u043b\u044f\u0440\u043e\u0432, \u043e\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0445 \u0438\u0437 \u0432\u0435\u0440\u0448\u0438\u043d ABC, \u0441 \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u043f\u043e\u043b\u043e\u0436\u043d\u044b\u043c\u0438 \u0441\u0442\u043e\u0440\u043e\u043d\u0430\u043c\u0438 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430 \u043d\u0430\u0437\u043e\u0432\u0435\u043c A&quot;, B&quot; \u0438 C&quot;:<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/27d\/def\/e85\/27ddefe85fe70fd8d27385642ea6fd67.png\"\/><\/p>\n<h4>\u0417\u0430\u0434\u0430\u0447\u0430:<\/h4>\n<p> \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432 \u043a\u0430\u0436\u0434\u043e\u0439 \u0442\u043e\u0447\u043a\u0435 \u0432\u043d\u0443\u0442\u0440\u0438 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430(\u043d\u0430\u0437\u043e\u0432\u0435\u043c \u0442\u0430\u043a\u0443\u044e \u0442\u043e\u0447\u043a\u0443 O), \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u044b \u0431\u043b\u0438\u0437\u043e\u0441\u0442\u0438 \u044d\u0442\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 \u043a \u043a\u0430\u0436\u0434\u043e\u0439 \u0432\u0435\u0440\u0448\u0438\u043d\u0435(A,B,C) \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430. \u041f\u0440\u043e\u0446\u0435\u043d\u0442\u044b \u0432 \u0441\u0443\u043c\u043c\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0434\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 100.<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/3c8\/5a4\/157\/3c85a41577b64508598cf27ef2899a4f.png\"\/><\/p>\n<p>  <a name=\"habracut\"><\/a><\/p>\n<h4>\u0420\u0435\u0448\u0435\u043d\u0438\u0435:<\/h4>\n<p> \u0412\u0441\u0435 \u0447\u0442\u043e \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f, \u044d\u0442\u043e \u0444\u043e\u0440\u043c\u0443\u043b\u044b \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u044f\u043c\u044b\u0445 \u0438 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u043c\u0435\u043d\u0434\u0438\u043a\u0443\u043b\u044f\u0440\u0430, \u043e\u043f\u0443\u0449\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u0437 \u0442\u043e\u0447\u043a\u0438 \u043d\u0430 \u043f\u0440\u044f\u043c\u0443\u044e \u043d\u0430 \u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u0438. \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0442\u043e\u0447\u043a\u0443 \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u044f\u043c\u044b\u0445 \u043c\u043e\u0436\u043d\u043e \u043f\u043e \u0444\u043e\u0440\u043c\u0443\u043b\u0435:  <\/p>\n<pre><code>\/\/ \u043f\u0440\u044f\u043c\u044b\u0435, \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u0434\u0432\u0443\u043c \u0442\u043e\u0447\u043a\u0430\u043c l1 = {p1,p2}; l2 = {p1,p2}; \/\/  d = (l2.p2.y-l2.p1.y) * (l1.p2.x-l1.p1._x) - (l2.p2.x-l2.p1.x) * (l1.p2.y-l1.p1.y); a = (l2.p2.x-l2.p1.x) * (l1.p1.y-l2.p1._y) - (l2.p2.y-l2.p1.y) * (l1.p1.x-l2.p1.x); \/\/ \u0442\u043e\u0447\u043a\u0430 \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u044f x0 = l1.p1.x + a * (l1.p2.x-l1.p1.x)\/d; y0 = l1.p1.y + a * (l1.p2.y-l1.p1.y)\/d; <\/code><\/pre>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u043f\u0435\u043d\u0434\u0438\u043a\u0443\u043b\u044f\u0440\u0430 \u043e\u043f\u0443\u0449\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u0437 \u0442\u043e\u0447\u043a\u0438 A \u043d\u0430 \u043f\u0440\u044f\u043c\u0443\u044e line \u043c\u043e\u0436\u043d\u043e \u0442\u0430\u043a:  <\/p>\n<pre><code>\/\/ \u0442\u043e\u0447\u043a\u0430 \u0437\u0430\u0434\u0430\u043d\u0430 \u043f\u043e \u0434\u0432\u0443\u043c \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0430\u043c A = {x,y}; \/\/ \u043b\u0438\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u043d\u0430 \u043f\u043e \u0434\u0432\u0443\u043c \u0442\u043e\u0447\u043a\u0430\u043c line = {p1,p2}; \/\/ \/\/ \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u0432\u0435\u043a\u0442\u043e\u0440 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043b\u0438\u043d\u0438\u0438 line dir = {0,0}; dir.x = line.p2.x - line.p1.x; dir.y = line.p2.y - line.p1.y; \/\/ \/\/ \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u043f\u0435\u0440\u0432\u0430\u044f \u0442\u043e\u0447\u043a\u0430 \u0438\u0441\u043a\u043e\u043c\u043e\u0439 \u043b\u0438\u043d\u0438\u0438(\u043f\u0435\u0440\u043f\u0435\u043d\u0434\u0438\u043a\u0443\u043b\u044f\u0440\u0430) \u0431\u0443\u0434\u0435\u0442 \u0442\u043e\u0447\u043a\u0430 A \/\/ \u043d\u0430\u0439\u0434\u0435\u043c \u0432\u0442\u043e\u0440\u0443\u044e \u0442\u043e\u0447\u043a\u0443 point2 = {0,0}; if (dir.y != 0) { \ttemp = dir.x*A.x + dir.y*A.y; \tpoint2.x = A.x != 1 ? 1 : 2; \tpoint2.y = (-dir.x * point2.x + temp) \/ dir.y; } else { \tpoint2.x = A.x; \tpoint2.y = line.p1.y; } \/\/ \/\/ \u0438\u0441\u043a\u043e\u043c\u0430\u044f \u043b\u0438\u043d\u0438\u044f, \u043f\u0435\u0440\u043f\u0435\u043d\u0434\u0438\u043a\u0443\u043b\u044f\u0440 \u043e\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0439 \u0438\u0437 \u0442\u043e\u0447\u043a\u0438 A \u043d\u0430 \u043f\u0440\u044f\u043c\u0443\u044e line, \/\/ \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u044f\u043c\u0430\u044f \u043f\u0440\u043e\u0445\u043e\u0434\u044f\u0449\u0430\u044f \u0447\u0435\u0440\u0435\u0437 \u0442\u043e\u0447\u043a\u0438 A \u0438 point2 \/\/ \u0414\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0439 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u0437\u0430\u0434\u0430\u0447\u0438, \/\/ \u043d\u0430\u043c \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043d\u0430\u0439\u0442\u0438 \u0434\u043b\u0438\u043d\u0443 \u0432\u044b\u0441\u043e\u0442\u044b, \/\/ \u043e\u043f\u0443\u0449\u0435\u043d\u043d\u043e\u0439 \u0438\u0437 \u0432\u0435\u0440\u0448\u0438\u043d\u044b \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430 \u043d\u0430 \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u043f\u043e\u043b\u043e\u0436\u043d\u0443\u044e \u0441\u0442\u043e\u0440\u043e\u043d\u0443. \/\/ \u042d\u0442\u0443 \u0434\u043b\u0438\u043d\u0443 \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c. \/\/ \u041d\u0430\u0445\u043e\u0434\u0438\u043c \u0442\u043e\u0447\u043a\u0443 \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u044f\u043c\u043e\u0439 A-point2 \u0438 \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u043f\u043e\u043b\u043e\u0436\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0435 \u0410 \u043f\u0440\u044f\u043c\u043e\u0439 \u0432 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0435, \/\/ \u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u043e\u0439 \u0438 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0439 A. <\/code><\/pre>\n<p>  \u041e\u043f\u0443\u0441\u0442\u0438\u043c \u043f\u0435\u0440\u0435\u043f\u0435\u043d\u0434\u0438\u043a\u0443\u043b\u044f\u0440 \u0438\u0437 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 O \u043d\u0430 \u043f\u0435\u0440\u043c\u0435\u043d\u0434\u0438\u043a\u0443\u043b\u044f\u0440 \u043e\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0439 \u0438\u0437 \u0442\u043e\u0447\u043a\u0438 A \u043d\u0430 \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u043f\u043e\u043b\u043e\u0436\u043d\u0443\u044e \u0441\u0442\u043e\u0440\u043e\u043d\u0443 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430. \u0422\u043e\u0447\u043a\u0443 \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0439 \u043b\u0438\u043d\u0438\u0438 \u0441 \u043f\u0435\u0440\u043f\u0435\u043d\u0434\u0438\u043a\u0443\u043b\u044f\u0440\u043e\u043c, \u043e\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u043c \u0438\u0437 \u0442\u043e\u0447\u043a\u0438 A, \u043d\u0430\u0437\u043e\u0432\u0435\u043c Ah. \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u0442\u043e\u0447\u043a\u0438 Bh \u0438 Ch:<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/234\/c01\/0f9\/234c010f9c903dd89d1a5f7229512ac4.png\"\/><\/p>\n<p>  \u041f\u0440\u043e\u0446\u0435\u043d\u0442 \u0431\u043b\u0438\u0437\u043e\u0441\u0442\u0438 \u043e\u0442 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 \u041e \u043a \u0432\u0435\u0440\u0448\u0438\u043d\u0435 A \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435\u043c AAh\/AA&quot;, \u0433\u0434\u0435 AAh \u2014 \u0434\u043b\u0438\u043d\u0430 \u043e\u0442\u0440\u0435\u0437\u043a\u0430 A-&gt;Ah, \u0430 AA&quot; \u2014 \u0434\u043b\u0438\u043d\u0430 \u0432\u044b\u0441\u043e\u0442\u044b \u043e\u043f\u0443\u0449\u0435\u043d\u043d\u043e\u0439 \u0438\u0437 \u0432\u0435\u0440\u0448\u0438\u043d\u044b A \u043d\u0430 \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u043f\u043e\u043b\u043e\u0436\u043d\u0443\u044e \u0441\u0442\u043e\u0440\u043e\u043d\u0443 (\u0442.\u0435. \u043e\u0442\u0440\u0435\u0437\u043e\u043a A-&gt;A&quot;):<\/p>\n<pre><code>p1 = AAh\/AA&quot;; p2 = BBh\/BB&quot;; p3 = CCh\/CC&quot;; <\/code><\/pre>\n<p>  \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0432 \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u044b \u0431\u043b\u0438\u0437\u043e\u0441\u0442\u0438 \u0442\u043e\u0447\u043a\u0438, \u043c\u043e\u0436\u0435\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0446\u0432\u0435\u0442 \u044d\u0442\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 \u043f\u043e \u0444\u043e\u0440\u043c\u0443\u043b\u0435:<\/p>\n<pre><code>red = color1.red*p1 + color2.red*p2 + color3.red*p3; green = color1.green*p1 + color2.green*p2 + color3.green*p3; blue = color1.blue*p1 + color2.blue*p2 + color3.blue*p3; <\/code><\/pre>\n<p>  \u0413\u0434\u0435 red, green \u0438 blue \u2014 \u044d\u0442\u043e \u043a\u0430\u043d\u0430\u043b\u044b \u0432 \u0446\u0432\u0435\u0442\u043e\u0432\u043e\u0439 \u0441\u0445\u0435\u043c\u0435 RGB. \u041f\u043e\u043b\u0443\u0447\u0438\u0432 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043a\u0430\u043d\u0430\u043b\u043e\u0432 RGB \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0438, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0446\u0432\u0435\u0442\u0430 \u0432 \u0448\u0435\u0441\u043d\u0430\u0434\u0446\u0430\u0442\u0435\u0440\u0438\u0447\u043d\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435:<\/p>\n<pre><code>color = (red &lt;&lt; 16) + (green &lt;&lt; 8) + blue; <\/code><\/pre>\n<p>  \u041e\u0431\u0440\u0430\u0442\u043d\u043e\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\u0437 \u0448\u0435\u0441\u0442\u0430\u043d\u0434\u0446\u0430\u0442\u0435\u0440\u0438\u0447\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0432 RGB \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u043e\u0440\u043c\u0443\u043b:<\/p>\n<pre><code>color = 0xffff00; \/\/ \u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u043a\u0430\u043d\u0430\u043b red = (color &gt;&gt;&gt; 16) & 0xff \/\/ \u0437\u0435\u043b\u0435\u043d\u044b\u0439 \u043a\u0430\u043d\u0430\u043b green = (color &gt;&gt;&gt; 8) & 0xff \/\/ \u0441\u0438\u043d\u0438\u0439 \u043a\u0430\u043d\u0430\u043b blue = color & 0xff <\/code><\/pre>\n<p>  \u0411\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043f\u0440\u043e \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u043a\u0430\u043d\u0430\u043b\u0430\u043c\u0438 RGB \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c <a href=\"http:\/\/flashpress.ru\/blog\/color-part1\/\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<h4>\u041f\u0440\u0438\u043c\u0435\u0440 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 ActionScript 3.0<\/h4>\n<p>  \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u043e <a href=\"http:\/\/flashpress.ru\/blog\/swc\/g3\/simples\/testPointG3Help.swf\">\u0444\u043b\u0435\u0448\u043a\u0435<\/a>.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u0444\u043b\u0435\u0448\u043a\u0438<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"actionscript\">package { \timport flash.display.Sprite; \timport flash.filters.GlowFilter; \t \timport ru.flashpress.callback.ICallback; \timport ru.flashpress.geom.line.FPGLine2d; \timport ru.flashpress.geom.line.math.FPGLineToPoint2dMath; \timport ru.flashpress.geom.point.FPGPoint2d; \timport ru.flashpress.geom.point.FPGPoint2dMath; \timport ru.flashpress.geom.triangles.FPGTriangle2d; \timport ru.flashpress.geom.view.core.FillData; \timport ru.flashpress.geom.view.line.LineView; \timport ru.flashpress.geom.view.point.PointView; \timport ru.flashpress.geom.view.triangle.TriangleView; \t \tpublic class testPointG3 extends Sprite implements ICallback \t{ \t\t\/\/ \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u044f \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430 \t\tprivate var triangle:FPGTriangle2d; \t\t\/\/ \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430 \t\tprivate var triangleView:TriangleView; \t\t\/\/ \u0433\u0435\u043e\u043c\u0435\u0442\u043e\u0440\u0438\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 \t\tprivate var targetPoint:FPGPoint2d; \t\t\/\/ \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 \t\tprivate var targetPointView:PointView; \t\t\/\/ \t\t\/\/ \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u0438 \u0442\u0440\u0435\u0445 \u0432\u0435\u0440\u0448\u0438\u043d \u043d\u0430 \u043f\u0440\u043e\u0442\u0438\u0432\u043f\u043e\u0432\u043e\u043b\u043e\u0436\u043d\u044b\u0435 \u0441\u0442\u043e\u0440\u043e\u043d\u044b \t\tprivate var pHeight1:PointView; \t\tprivate var pHeight2:PointView; \t\tprivate var pHeight3:PointView; \t\t\/\/ \t\t\/\/ \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u0438 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0442\u043e\u0447\u043a\u0438 \u043d\u0430 \u0432\u044b\u0441\u043e\u0442\u044b \t\t\/\/ \u043e\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0435 \u0438\u0437 \u0432\u0435\u0440\u0448\u0438\u043d \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430 \t\tprivate var crossHeight1:PointView; \t\tprivate var crossHeight2:PointView; \t\tprivate var crossHeight3:PointView; \t\t\/\/ \t\t\/\/ \u043f\u0443\u043a\u043d\u0442\u0438\u0440\u043d\u044b\u0435 \u043b\u0438\u043d\u0438\u0438 \u0441\u043e\u0435\u0434\u0438\u043d\u044f\u044e\u0449\u0438\u0435 \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u0442\u043e\u0447\u043a\u0443 \t\t\/\/ \u0441 \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u044f\u043c\u0438 crossHeight(1\/2\/3) \t\tprivate var lineCross1:LineView; \t\tprivate var lineCross2:LineView; \t\tprivate var lineCross3:LineView; \t\t\/\/  \t\tpublic function testPointG3() \t\t{ \t\t\tvar glow:GlowFilter = new GlowFilter(0xffffff, 1, 2, 2, 10, 3); \t\t\t\/\/ \t\t\tvar size:Number = Math.min(stage.stageWidth, stage.stageHeight)*0.8; \t\t\tvar p1:FPGPoint2d = new FPGPoint2d(size\/2, 0); \t\t\tvar p2:FPGPoint2d = new FPGPoint2d(size, size*0.8); \t\t\tvar p3:FPGPoint2d = new FPGPoint2d(0, size*0.8); \t\t\ttriangle = new FPGTriangle2d(p1, p2, p3); \t\t\ttriangle.translate((stage.stageWidth-size)*0.5, (stage.stageHeight-size*0.8)*0.35); \t\t\t\/\/ \t\t\ttriangleView = new TriangleView(triangle, new FillData(0x666666, 3)); \t\t\ttriangleView.visibleHeights = true; \t\t\ttriangleView.heightLines.fill = new FillData(0x9900, 2); \t\t\t\/\/ \t\t\ttriangleView.point1.filters = [glow]; \t\t\ttriangleView.point2.filters = [glow]; \t\t\ttriangleView.point3.filters = [glow]; \t\t\ttriangleView.point1.fill = color1.fill(2); \t\t\ttriangleView.point2.fill = color2.fill(2); \t\t\ttriangleView.point3.fill = color3.fill(2); \t\t\ttriangleView.point1.name = 'A'; \t\t\ttriangleView.point2.name = 'B'; \t\t\ttriangleView.point3.name = 'C'; \t\t\ttriangleView.point1.scale = 1.5; \t\t\ttriangleView.point2.scale = 1.5; \t\t\ttriangleView.point3.scale = 1.5; \t\t\t\/\/ \t\t\ttriangleView.heightLines.line1.fill = color1.fill(2); \t\t\ttriangleView.heightLines.line2.fill = color2.fill(2); \t\t\ttriangleView.heightLines.line3.fill = color3.fill(2); \t\t\t\/\/ \t\t\t\/\/ \t\t\tpHeight1 = new PointView(null, color1.fill()); \t\t\tpHeight1.enabled = false; \t\t\tpHeight1.filters = [glow]; \t\t\tpHeight1.name = 'A&quot;'; \t\t\t\/\/ \t\t\tpHeight2 = new PointView(null, color2.fill()); \t\t\tpHeight2.enabled = false; \t\t\tpHeight2.filters = [glow]; \t\t\tpHeight2.name = 'B&quot;'; \t\t\t\/\/ \t\t\tpHeight3 = new PointView(null, color3.fill()); \t\t\tpHeight3.enabled = false; \t\t\tpHeight3.filters = [glow]; \t\t\tpHeight3.name = 'C&quot;'; \t\t\t\/\/ \t\t\tcrossHeight1 = new PointView(null, color1.fill()); \t\t\tcrossHeight1.enabled = false; \t\t\tcrossHeight1.filters = [glow]; \t\t\tcrossHeight1.name = 'Ah'; \t\t\t\/\/ \t\t\tcrossHeight2 = new PointView(null, color2.fill()); \t\t\tcrossHeight2.enabled = false; \t\t\tcrossHeight2.filters = [glow]; \t\t\tcrossHeight2.name = 'Bh'; \t\t\t\/\/ \t\t\tcrossHeight3 = new PointView(null, color3.fill()); \t\t\tcrossHeight3.enabled = false; \t\t\tcrossHeight3.filters = [glow]; \t\t\tcrossHeight3.name = 'Ch'; \t\t\t\/\/ \t\t\tlineCross1 = new LineView(new FPGLine2d(new FPGPoint2d(0, 0), new FPGPoint2d(100, 100)), 0, 0, color1.fill(1, true)); \t\t\tlineCross2 = new LineView(new FPGLine2d(new FPGPoint2d(0, 0), new FPGPoint2d(100, 100)), 0, 0, color2.fill(1, true)); \t\t\tlineCross3 = new LineView(new FPGLine2d(new FPGPoint2d(0, 0), new FPGPoint2d(100, 100)), 0, 0, color3.fill(1, true)); \t\t\t\/\/ \t\t\tvar xp:Number = p3.x + (triangle.p2.x-p3.x)*0.40; \t\t\tvar yp:Number = p1.y + (triangle.p2.y-p1.y)*0.92; \t\t\ttargetPoint = new FPGPoint2d(xp, yp); \t\t\ttargetPointView = new PointView(targetPoint, new FillData(0x0, 1)); \t\t\ttargetPointView.filters = [glow] \t\t\ttargetPointView.scale = 1.8; \t\t\t\/\/ \t\t\tthis.addChild(triangleView); \t\t\tthis.addChild(pHeight1); \t\t\tthis.addChild(pHeight2); \t\t\tthis.addChild(pHeight3); \t\t\tthis.addChild(crossHeight1); \t\t\tthis.addChild(crossHeight2); \t\t\tthis.addChild(crossHeight3); \t\t\tthis.addChild(lineCross1); \t\t\tthis.addChild(lineCross2); \t\t\tthis.addChild(lineCross3); \t\t\tthis.addChild(targetPointView); \t\t\t\/\/ \t\t\ttargetPoint.addCallback(this); \t\t\ttriangle.addCallback(this); \t\t\tcallbackEvent(null, null); \t\t} \t\t \t\t\/** \t\t * \u0411\u044b\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u044b \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432\u0435\u0440\u0448\u0438\u043d \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430, \t\t * \u0438\u043b\u0438 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0442\u043e\u0447\u043a\u0438 targetPoint \t\t *\/ \t\tpublic function callbackEvent(target:Object, data:Object):void \t\t{ \t\t\tpHeight1.data = triangle.heightA.p2; \t\t\tpHeight2.data = triangle.heightB.p2; \t\t\tpHeight3.data = triangle.heightC.p2; \t\t\t\/\/ \t\t\tvar color:Number = getColor(targetPoint.x, targetPoint.y); \t\t\ttargetPointView.fill = new FillData(color); \t\t} \t\t\t \t\t \t\tprivate var color1:RGB = new RGB(255, 0, 0); \t\tprivate var color2:RGB = new RGB(0, 200, 0); \t\tprivate var color3:RGB = new RGB(0, 0, 255); \t\tprivate function getColor(_x:Number, _y:Number):uint \t\t{ \t\t\tvar point:FPGPoint2d = new FPGPoint2d(_x, _y); \t\t\t\/\/ \t\t\t\/\/ \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0432\u044b\u0441\u043e\u0442\u044b \u043e\u043f\u0443\u0449\u0435\u043d\u043d\u043e\u0439 \u0438\u0437 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0442\u043e\u0447\u043a\u0438(point) \t\t\t\/\/ \u043d\u0430 \u0432\u044b\u0441\u043e\u0442\u0443 \u043e\u043f\u0443\u0449\u0435\u043d\u043d\u0443\u044e \u0438\u0437 \u0432\u0435\u0440\u0448\u0438\u043d\u044b A(triangle.heightA) \t\t\tvar h2mA:FPGLine2d = FPGLineToPoint2dMath.lineHeight(point, triangle.heightA); \t\t\t\/\/ \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u0432\u044b\u0441\u043e\u0442\u044b \u0434\u043b\u044f \u0434\u0440\u0443\u0433\u0438\u0445 \u0442\u043e\u0447\u0435\u043a B \u0438 C \t\t\tvar h2mB:FPGLine2d = FPGLineToPoint2dMath.lineHeight(point, triangle.heightB); \t\t\tvar h2mC:FPGLine2d = FPGLineToPoint2dMath.lineHeight(point, triangle.heightC); \t\t\tif (!h2mA || !h2mB|| !h2mC) return 0xffffff; \t\t\t\/\/ \t\t\t\/\/ h2mA.p2 - \u044d\u0442\u043e \u0442\u043e\u0447\u043a\u0430 \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u044f\u043c\u043e\u0439 h2mA \u0441 \t\t\t\/\/ \u0432\u044b\u0441\u043e\u0442\u043e\u0439 \u043e\u043f\u0443\u0449\u0435\u043d\u043d\u043e\u0439 \u0438\u0437 \u0432\u0435\u0440\u0448\u0438\u043d\u044b A \t\t\tcrossHeight1.data = h2mA.p2; \t\t\tcrossHeight2.data = h2mB.p2; \t\t\tcrossHeight3.data = h2mC.p2; \t\t\t\/\/ \t\t\t\/\/ \t\t\t\/\/ \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043e\u0442 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0432\u0435\u0440\u0448\u0438\u043d\u044b \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430 \t\t\t\/\/ \u0434\u043e \u0442\u043e\u0447\u043a\u0438 \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u044f\u043c\u043e\u0439 h2mA c \u0432\u044b\u0441\u043e\u0442\u043e\u0439, \u043e\u043f\u0443\u0449\u0435\u043d\u043d\u043e\u0439 \u0438\u0437 \u0432\u0435\u0440\u0448\u0438\u043d\u044b A \t\t\tvar h2Alen:Number = FPGPoint2dMath.length(triangle.p1, h2mA.p2); \t\t\t\/\/ \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0434\u043b\u044f \u0434\u0440\u0443\u0433\u0438\u0445 \u0442\u043e\u0447\u0435\u043a \t\t\tvar h2Blen:Number = FPGPoint2dMath.length(triangle.p2, h2mB.p2); \t\t\tvar h2Clen:Number = FPGPoint2dMath.length(triangle.p3, h2mC.p2); \t\t\t\/\/ \t\t\t\/\/ \u0440\u0438\u0441\u0443\u0435\u043c \u043f\u0443\u043d\u043a\u0442\u0440\u0438\u043d\u0443\u044e \u043b\u0438\u043d\u0438\u044e  \t\t\tlineCross1.data = h2mA; \t\t\tlineCross2.data = h2mB; \t\t\tlineCross3.data = h2mC; \t\t\t\/\/ \t\t\t\/\/ \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u044b \u0431\u043b\u0438\u0437\u043e\u0441\u0442\u0438 \t\t\tvar p1:Number = 1-h2Alen\/(triangle.heightA.length); \t\t\tvar p2:Number = 1-h2Blen\/(triangle.heightB.length); \t\t\tvar p3:Number = 1-h2Clen\/(triangle.heightC.length); \t\t\t\/\/ \t\t\t\/\/ \u0437\u0430\u0434\u0430\u0435\u043c \u043d\u0438\u0436\u043d\u044e\u044e \u0433\u0440\u0430\u043d\u0438\u0446\u0443 \t\t\tif (p1 &lt; 0) p1 = 0; \t\t\tif (p2 &lt; 0) p2 = 0; \t\t\tif (p3 &lt; 0) p3 = 0; \t\t\t\/\/ \t\t\t\/\/ \t\t\t\/\/ \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0446\u0432\u0435\u0442\u043e\u0432\u044b\u0445 \u043a\u0430\u043d\u0430\u043b\u043e\u0432 red, green \u0438 blue \t\t\tvar r:Number = color1.r*p1 + color2.r*p2 + color3.r*p3; \t\t\tvar g:Number = color1.g*p1 + color2.g*p2 + color3.g*p3; \t\t\tvar b:Number = color1.b*p1 + color2.b*p2 + color3.b*p3; \t\t\t\/\/ \u0437\u0430\u0434\u0430\u0435\u043c \u0432\u0435\u0440\u0445\u043d\u044e\u044e \u0433\u0440\u0430\u043d\u0438\u0446\u0443 \t\t\tif (r &gt; 255) r = 255; \t\t\tif (g &gt; 255) g = 255; \t\t\tif (b &gt; 255) b = 255; \t\t\t\/\/ \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0446\u0432\u0435\u0442\u0430 \t\t\tvar color:int = (r &lt;&lt; 16) + (g &lt;&lt; 8) + b; \t\t\treturn color; \t\t} \t} } import ru.flashpress.geom.view.core.FillData;    class RGB { \tpublic var r:uint; \tpublic var g:uint; \tpublic var b:uint; \tpublic var code:uint; \tpublic function RGB(r:uint, g:uint, b:uint) \t{ \t\tthis.r = r; \t\tthis.g = g; \t\tthis.b = b; \t\tthis.code = (r &lt;&lt; 16) + (g &lt;&lt; 8) + b; \t} \t \tpublic function fill(stroke:uint=1, dotline:Boolean=false):FillData \t{ \t\treturn new FillData(this.code, stroke, dotline); \t} } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0414\u043b\u044f \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 <a href=\"http:\/\/flashpress.ru\/blog\/libs\/\">FPGeometry2d.swc<\/a>.<\/p>\n<h4>\u041f\u0440\u0438\u043c\u0435\u0440 ActionScript3.0 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0448\u0435\u0439\u0434\u0435\u0440\u0430<\/h4>\n<p>  \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0437\u0430\u043a\u0440\u0430\u0441\u043a\u0438 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0448\u0435\u0439\u0434\u0435\u0440\u0430 \u0432\u043e <a href=\"http:\/\/flashpress.ru\/blog\/swc\/g3\/simples\/testShaderG3.swf\">\u0444\u043b\u0435\u0448\u043a\u0435<\/a>.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0413\u043b\u0430\u0432\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0444\u043b\u0435\u0448\u043a\u0438 testShaderG3.as<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"actionscript\">package { \timport flash.display.Sprite; \timport flash.events.MouseEvent; \timport flash.geom.Point; \t \timport ru.flashpress.filters.G3Shader;  \tpublic class testShaderG3 extends Sprite \t{ \t\t\/\/ \u0448\u0435\u0439\u0434\u0435\u0440, \u0440\u0438\u0441\u0443\u044e\u0449\u0438\u0439 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u044b\u0439 \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442 \t\tprivate var shader:G3Shader; \t\tpublic function testShaderG3() \t\t{ \t\t\tstart(); \t\t} \t\t \t\tprivate var p1:Sprite; \t\tprivate var p2:Sprite; \t\tprivate var p3:Sprite; \t\tprivate function start():void \t\t{ \t\t\tshader = new G3Shader(); \t\t\t\/\/ \t\t\t\/\/ \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0442\u0440\u0438 \u0432\u0435\u0440\u0448\u0438\u043d\u044b \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430 \t\t\tp1 = createPoint(200, 50); \t\t\tp2 = createPoint(350, 350); \t\t\tp3 = createPoint(50, 350); \t\t\t\/\/ \t\t\tshader.initPoints(\tnew Point(p1.x, p1.y), \t\t\t\t\t\t\t\tnew Point(p2.x, p2.y), \t\t\t\t\t\t\t\tnew Point(p3.x, p3.y)); \t\t\t\/\/ \t\t\tredraw(); \t\t} \t\tprivate function createPoint(_x:Number, _y:Number):Sprite \t\t{ \t\t\tvar point:Sprite = new Sprite(); \t\t\tpoint.graphics.beginFill(0x0, 0.5); \t\t\tpoint.graphics.drawCircle(0, 0, 10); \t\t\tthis.addChild(point); \t\t\tpoint.x = _x; \t\t\tpoint.y = _y; \t\t\tpoint.buttonMode = true; \t\t\tpoint.addEventListener(MouseEvent.MOUSE_DOWN, downHandler); \t\t\treturn point; \t\t} \t\tprivate var currentPoint:Sprite; \t\tprivate function downHandler(event:MouseEvent):void \t\t{ \t\t\tcurrentPoint = event.target as Sprite; \t\t\tcurrentPoint.startDrag(); \t\t\tthis.stage.addEventListener(MouseEvent.MOUSE_MOVE, moveHandler); \t\t\tthis.stage.addEventListener(MouseEvent.MOUSE_UP, upHandler); \t\t} \t\tprivate function moveHandler(event:MouseEvent):void \t\t{ \t\t\tevent.updateAfterEvent(); \t\t\tswitch (currentPoint) { \t\t\t\t\/\/  \u0437\u0430\u0434\u0430\u0435\u043c \u0448\u0435\u0439\u0434\u0435\u0440\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432\u0435\u0440\u0448\u0438\u043d \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430 \t\t\t\tcase p1: \t\t\t\t\tshader.point1 = new Point(p1.x, p1.y); \t\t\t\t\tbreak; \t\t\t\tcase p2: \t\t\t\t\tshader.point2 = new Point(p2.x, p2.y); \t\t\t\t\tbreak; \t\t\t\tcase p3: \t\t\t\t\tshader.point3 = new Point(p3.x, p3.y); \t\t\t\t\tbreak; \t\t\t} \t\t\tredraw(); \t\t} \t\tprivate function upHandler(event:MouseEvent):void \t\t{ \t\t\tcurrentPoint.stopDrag(); \t\t\tthis.stage.removeEventListener(MouseEvent.MOUSE_MOVE, moveHandler); \t\t\tthis.stage.removeEventListener(MouseEvent.MOUSE_UP, upHandler); \t\t} \t\t \t\tprivate function redraw():void \t\t{ \t\t\tthis.graphics.clear(); \t\t\tthis.graphics.beginFill(0xff0000, 1); \t\t\tthis.graphics.beginShaderFill(shader); \t\t\tthis.graphics.moveTo(p1.x, p1.y); \t\t\tthis.graphics.lineTo(p2.x, p2.y); \t\t\tthis.graphics.lineTo(p3.x, p3.y); \t\t} \t} }<\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043b\u0430\u0441\u0441 G3Shader.as<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"actionscript\">package ru.flashpress.filters { \timport flash.display.Shader; \timport flash.geom.Point; \t \t\/** \t * \u0428\u0435\u0439\u0434\u0435\u0440, \u0440\u0438\u0441\u0443\u044e\u0449\u0438\u0439 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u044b\u0439 \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442, \u043f\u043e \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u043c \u0442\u043e\u0447\u043a\u0430\u043c \u0438 \u0446\u0432\u0435\u0442\u0430\u043c \u043a \u043d\u0438\u043c \t * @author Serious Sam \t *\/ \tpublic class G3Shader extends Shader \t{ \t\tprivate static var dir:Point = new Point(); \t\tprivate static var point2:Point = new Point(); \t\tprivate static var temp:Number; \t\tprivate static var k1:Number; \t\tprivate static var k2:Number; \t\tprivate static function getHeight(o:Point, p1:Point, p2:Point):void \t\t{ \t\t\tdir.x = p2.x-p1.x; \t\t\tdir.y = p2.y-p1.y; \t\t\tpoint2.x = 0; \t\t\tpoint2.y = 0; \t\t\tif (dir.y != 0) { \t\t\t\ttemp = dir.x*o.x + dir.y*o.y; \t\t\t\tpoint2.x = o.x != 1 ? 1 : 2; \t\t\t\tpoint2.y = (-dir.x * point2.x + temp) \/ dir.y; \t\t\t} else { \t\t\t\tpoint2.x = o.x; \t\t\t\tpoint2.y = p1.y; \t\t\t} \t\t\t\/\/ \t\t\tk1 = (point2.y-o.y)*(p2.x-p1.x) - (point2.x-o.x)*(p2.y-p1.y); \t\t\tk2 = (point2.x-o.x)*(p1.y-o.y) - (point2.y-o.y)*(p1.x-o.x); \t\t\tpointH.x = p1.x + k2*(p2.x-p1.x)\/k1; \t\t\tpointH.y = p1.y + k2*(p2.y-p1.y)\/k1; \t\t} \t\t\/\/ \t\t\/\/ \t\t\/\/ \t\t[Embed(source=&quot;g3.pbj&quot;, mimeType=&quot;application\/octet-stream&quot;)] \t\tprivate var BytecodesClass:Class; \t\t\/\/ \t\t\/** \t\t * @private \t\t *\/ \t\tpublic function G3Shader() \t\t{ \t\t\tsuper(new BytecodesClass()); \t\t} \t\t \t\tprivate static var pointH:Point = new Point(); \t\t\/** \t\t * \u0412 \u044d\u0442\u043e\u043c \u043c\u0435\u0442\u043e\u0434\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u043e\u0431\u0449\u0438\u0442\u044c \u0448\u0435\u0439\u0434\u0435\u0440\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442 \u0432\u0435\u0440\u0448\u0438\u043d (a, b \u0438 c) \t\t * \u0430 \u0442\u0430\u043a \u0436\u0435 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u0439 \u044d\u0442\u0438\u0445 \u0432\u0435\u0440\u0448\u0438\u043d \u043d\u0430 \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u043f\u043e\u043b\u043e\u0436\u043d\u044b\u0435 \u0441\u0442\u043e\u0440\u043e\u043d\u044b (ah, bh, ch) \t\t *\/\t\t \t\tprivate function reinit():void \t\t{ \t\t\t\/\/ \u0432\u0435\u0440\u0448\u0438\u043d\u0430 A \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430 \t\t\tthis.data.a.value = [_point1.x, _point1.y]; \t\t\tgetHeight(_point1, _point2, _point3); \t\t\t\/\/ \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u044f \u0432\u0435\u0440\u0448\u0438\u043d\u044b A \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 BC \t\t\tthis.data.ah.value = [pointH.x, pointH.y]; \t\t\t\/\/ \t\t\tthis.data.b.value = [_point2.x, _point2.y]; \t\t\tgetHeight(_point2, _point3, _point1); \t\t\tthis.data.bh.value = [pointH.x, pointH.y]; \t\t\t\/\/ \t\t\tthis.data.c.value = [_point3.x, _point3.y]; \t\t\tgetHeight(_point3, _point1, _point2); \t\t\tthis.data.ch.value = [pointH.x, pointH.y]; \t\t} \t\t \t\t\/** \t\t * \u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0432\u0435\u0440\u0448\u0438\u043d \u0442\u0440\u0435\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430 \t\t *\/ \t\tpublic function initPoints(p1:Point, p2:Point, p3:Point):void \t\t{ \t\t\tthis._point1.x = p1.x; \t\t\tthis._point1.y = p1.y; \t\t\t\/\/ \t\t\tthis._point2.x = p2.x; \t\t\tthis._point2.y = p2.y; \t\t\t\/\/ \t\t\tthis._point3.x = p3.x; \t\t\tthis._point3.y = p3.y; \t\t\t\/\/ \t\t\treinit(); \t\t} \t\t \t\tprivate var _point1:Point = new Point(100, 0); \t\t\/** \t\t * \u041a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u043f\u0435\u0440\u0432\u043e\u0439 \u0432\u0435\u0440\u0448\u0438\u043d\u044b \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430 \t\t *\/ \t\tpublic function get point1():Point {return this._point1.clone();} \t\tpublic function set point1(value:Point):void \t\t{ \t\t\tthis._point1.x = value.x; \t\t\tthis._point1.y = value.y; \t\t\t\/\/ \t\t\tthis.reinit(); \t\t} \t\t \t\tprivate var _point2:Point = new Point(200, 200); \t\t\/** \t\t * \u041a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0432\u0442\u043e\u0440\u043e\u0439 \u0432\u0435\u0440\u0448\u0438\u043d\u044b \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430 \t\t *\/ \t\tpublic function get point2():Point {return this._point2.clone();} \t\tpublic function set point2(value:Point):void \t\t{ \t\t\tthis._point2.x = value.x; \t\t\tthis._point2.y = value.y; \t\t\t\/\/ \t\t\tthis.reinit(); \t\t} \t\t \t\tprivate var _point3:Point = new Point(0, 200); \t\t\/** \t\t * \u041a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0442\u0440\u0435\u0442\u044c\u0435\u0439 \u0432\u0435\u0440\u0448\u0438\u043d\u044b \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430 \t\t *\/ \t\tpublic function get point3():Point {return this._point3.clone();} \t\tpublic function set point3(value:Point):void \t\t{ \t\t\tthis._point3.x = value.x; \t\t\tthis._point3.y = value.y; \t\t\t\/\/ \t\t\tthis.reinit(); \t\t} \t\t \t\t\/** \t\t * \u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0446\u0432\u0435\u0442\u0430 \u0432\u0435\u0440\u0448\u0438\u043d \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430 \t\t *\/ \t\tpublic function initColors(color1:uint, color2:uint, color3:uint):void \t\t{ \t\t\tthis.color1 = color1; \t\t\tthis.color2 = color2; \t\t\tthis.color3 = color3; \t\t} \t\t \t\tprivate var _color1:Number = 0; \t\t\/** \t\t * \u0426\u0432\u0435\u0442 \u043f\u0435\u0440\u0432\u043e\u0439 \u0432\u0435\u0440\u0448\u0438\u043d\u044b \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430 \t\t *\/ \t\tpublic function get color1():uint {return this._color1;} \t\tpublic function set color1(value:uint):void \t\t{ \t\t\tthis._color1 = value; \t\t\tthis.data.color1.value = [\t((value &gt;&gt;&gt; 16) & 0xff)\/255, \t\t\t\t\t\t\t\t\t\t((value &gt;&gt;&gt;  8) & 0xff)\/255, \t\t\t\t\t\t\t\t\t\t(value & 0xff)\/255]; \t\t} \t\t \t\tprivate var _color2:Number = 0; \t\t\/** \t\t * \u0426\u0432\u0435\u0442 \u0432\u0442\u043e\u0440\u043e\u0439 \u0432\u0435\u0440\u0448\u0438\u043d\u044b \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430 \t\t *\/ \t\tpublic function get color2():uint {return this._color2;} \t\tpublic function set color2(value:uint):void \t\t{ \t\t\tthis._color2 = value; \t\t\tthis.data.color2.value = [\t((value &gt;&gt;&gt; 16) & 0xff)\/255, \t\t\t\t\t\t\t\t\t\t((value &gt;&gt;&gt;  8) & 0xff)\/255, \t\t\t\t\t\t\t\t\t\t(value & 0xff)\/255]; \t\t} \t\t \t\tprivate var _color3:Number = 0; \t\t\/** \t\t * \u0426\u0432\u0435\u0442 \u0442\u0440\u0435\u0442\u044c\u0435\u0439 \u0432\u0435\u0440\u0448\u0438\u043d\u044b \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430 \t\t *\/ \t\tpublic function get color3():uint {return this._color3;} \t\tpublic function set color3(value:uint):void \t\t{ \t\t\tthis._color3 = value; \t\t\tthis.data.color3.value = [\t((value &gt;&gt;&gt; 16) & 0xff)\/255, \t\t\t\t\t\t\t\t\t\t((value &gt;&gt;&gt;  8) & 0xff)\/255, \t\t\t\t\t\t\t\t\t\t(value & 0xff)\/255]; \t\t} \t} }<\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0428\u0435\u0439\u0434\u0435\u0440 g3.pbk<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"actionscript\">&lt;languageVersion: 1.0;&gt;   kernel TriangleGradient &lt;   namespace : &quot;flashpress.ru&quot;;     vendor : &quot;FlashPress.ru&quot;;     version : 1;     description : &quot;Triangle Gradient&quot;; &gt; {          parameter float2 a     &lt;         defaultValue:float2(50.0, 50.0);     &gt;;     parameter float2 ah     &lt;         defaultValue:float2(50.0, 200.0);     &gt;;     parameter float2 b     &lt;         defaultValue:float2(50.0, 200.0);     &gt;;     parameter float2 bh     &lt;         defaultValue:float2(125.0, 125.0);     &gt;;     parameter float2 c     &lt;         defaultValue:float2(200.0, 200.0);     &gt;;     parameter float2 ch     &lt;         defaultValue:float2(50.0, 200.0);     &gt;;     parameter float3 color1     &lt;         minValue:float3(0.0, 0.0, 0.0);         maxValue:float3(1.0, 1.0, 1.0);         defaultValue:float3(1.0, 0.0, 0.0);     &gt;;     parameter float3 color2     &lt;         minValue:float3(0.0, 0.0, 0.0);         maxValue:float3(1.0, 1.0, 1.0);         defaultValue:float3(0.0, 1.0, 0.0);     &gt;;     parameter float3 color3     &lt;         minValue:float3(0.0, 0.0, 0.0);         maxValue:float3(1.0, 1.0, 1.0);         defaultValue:float3(0.0, 0.0, 1.0);     &gt;;      input image4 src;     output float4 dst;      void     evaluatePixel() {     \/\/     \/\/     \/\/     \/\/     float2 direction;     float lineA;     float lineB;     float lineC;     float checkd;     float checka;     float2 point;     float2 o = outCoord();     \/\/      \/\/ \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u043f\u0435\u043d\u0434\u0438\u043a\u0443\u043b\u044f\u0440\u0430 \u043e\u043f\u0443\u0449\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u0437 \u0442\u043e\u0447\u043a\u0438 O \u043d\u0430 \u043f\u0440\u044f\u043c\u0443\u044e a-ah     direction = ah-a;     lineA = -direction.y;     lineB = -direction.x;     lineC = direction.x*o.x + direction.y*o.y;     if (lineA != 0.0) {         point = float2(o.x + 1.0, 0);         point.y = -(lineB*point.x+lineC)\/lineA;     } else {         point = float2(o.x, a.y);     }     \/\/ \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u0435 p1-point \u0438 b-c     checkd = (point.y-o.y)*(ah.x-a.x) - (point.x-o.x)*(ah.y-a.y);     checka = (point.x-o.x)*(a.y-o.y) - (point.y-o.y)*(a.x-o.x);     \/\/ \u0442\u043e\u0447\u043a\u0430 \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u043f\u0435\u043d\u0434\u0438\u043a\u0443\u043b\u044f\u0440\u0430 \u043e\u043f\u0443\u0449\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u0437 A \u0438 \u043f\u0440\u044f\u043c\u043e\u0439 BC     float2 aho = float2(0.0, 0.0);     aho.x = a.x + checka*(ah.x-a.x)\/checkd;     aho.y = a.y + checka*(ah.y-a.y)\/checkd;     \/\/     \/\/     \/\/     \/\/ \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u043f\u0435\u043d\u0434\u0438\u043a\u0443\u043b\u044f\u0440\u0430 \u043e\u043f\u0443\u0449\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u0437 \u0442\u043e\u0447\u043a\u0438 O \u043d\u0430 \u043f\u0440\u044f\u043c\u0443\u044e b-bh     direction = bh-b;     lineA = -direction.y;     lineB = -direction.x;     lineC = direction.x*o.x + direction.y*o.y;     if (lineA != 0.0) {         point = float2(o.x+1.0, 0.0);         point.y = -(lineB*point.x+lineC)\/lineA;     } else {         point = float2(o.x, b.y);     }     \/\/ \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u0435 p1-point \u0438 b-c     checkd = (point.y-o.y)*(bh.x-b.x) - (point.x-o.x)*(bh.y-b.y);     checka = (point.x-o.x)*(b.y-o.y) - (point.y-o.y)*(b.x-o.x);     \/\/ \u0442\u043e\u0447\u043a\u0430 \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u043f\u0435\u043d\u0434\u0438\u043a\u0443\u043b\u044f\u0440\u0430 \u043e\u043f\u0443\u0449\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u0437 A \u0438 \u043f\u0440\u044f\u043c\u043e\u0439 BC     float2 bho = float2(0.0, 0.0);     bho.x = b.x + checka*(bh.x-b.x)\/checkd;     bho.y = b.y + checka*(bh.y-b.y)\/checkd;     \/\/     \/\/     \/\/     \/\/ \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u043f\u0435\u043d\u0434\u0438\u043a\u0443\u043b\u044f\u0440\u0430 \u043e\u043f\u0443\u0449\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u0437 \u0442\u043e\u0447\u043a\u0438 O \u043d\u0430 \u043f\u0440\u044f\u043c\u0443\u044e c-ch     direction = ch-c;     lineA = -direction.y;     lineB = -direction.x;     lineC = direction.x*o.x + direction.y*o.y;     if (lineA != 0.0) {         point = float2(o.x+1.0, 0.0);         point.y = -(lineB*point.x+lineC)\/lineA;     } else {         point = float2(o.x, c.y);     }     \/\/ \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u0435 p1-point \u0438 b-c     checkd = (point.y-o.y)*(ch.x-c.x) - (point.x-o.x)*(ch.y-c.y);     checka = (point.x-o.x)*(c.y-o.y) - (point.y-o.y)*(c.x-o.x);     \/\/ \u0442\u043e\u0447\u043a\u0430 \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u043f\u0435\u043d\u0434\u0438\u043a\u0443\u043b\u044f\u0440\u0430 \u043e\u043f\u0443\u0449\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u0437 A \u0438 \u043f\u0440\u044f\u043c\u043e\u0439 BC     float2 cho = float2(0.0, 0.0);     cho.x = c.x + checka*(ch.x-c.x)\/checkd;     cho.y = c.y + checka*(ch.y-c.y)\/checkd;     \/\/     \/\/     \/\/     float pp1 = 1.0-((a.x-aho.x)*(a.x-aho.x)+(a.y-aho.y)*(a.y-aho.y))\/((a.x-ah.x)*(a.x-ah.x)+(a.y-ah.y)*(a.y-ah.y));     float pp2 = 1.0-((b.x-bho.x)*(b.x-bho.x)+(b.y-bho.y)*(b.y-bho.y))\/((b.x-bh.x)*(b.x-bh.x)+(b.y-bh.y)*(b.y-bh.y));     float pp3 = 1.0-((c.x-cho.x)*(c.x-cho.x)+(c.y-cho.y)*(c.y-cho.y))\/((c.x-ch.x)*(c.x-ch.x)+(c.y-ch.y)*(c.y-ch.y));     \/\/     dst = float4(0.0, 0.0, 0.0, 1.0);     dst.r = color1.r*pp1 + color2.r*pp2 + color3.r*pp3;     dst.g = color1.g*pp1 + color2.g*pp2 + color3.g*pp3;     dst.b = color1.b*pp1 + color2.b*pp2 + color3.b*pp3; } } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/company\/mailru\/blog\/196104\/\"> http:\/\/habrahabr.ru\/company\/mailru\/blog\/196104\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t\u041f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e, \u0434\u0440\u0443\u0437\u044c\u044f.<\/p>\n<p>  \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u0432\u0430\u043c \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c <b>\u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u044b\u0439 \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442<\/b>. \u041d\u0430\u0432\u0435\u0440\u043d\u044f\u043a\u0430 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f\u0437\u044b\u043a\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u043c\u0435\u044e\u0442 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0435 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438. \u041c\u044b \u0436\u0435 \u0441 \u0432\u0430\u043c\u0438 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0444\u043e\u0440\u043c\u0443\u043b\u044b. \u0412\u043e\u0442 \u0447\u0442\u043e \u0432 \u0438\u0442\u043e\u0433\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c:<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/1de\/ff0\/96c\/1deff096c6dc99ca07a20f5bbd0ad964.png\"\/><\/p>\n<h4>\u0427\u0442\u043e \u0438\u043c\u0435\u0435\u043c:<\/h4>\n<p> \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a \u0441 \u0432\u0435\u0440\u0448\u0438\u043d\u0430\u043c\u0438 \u0432 \u0442\u043e\u0447\u043a\u0430\u0445 A,B \u0438 C. \u0422\u043e\u0447\u043a\u0438 \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u043f\u0435\u043d\u0434\u0438\u043a\u0443\u043b\u044f\u0440\u043e\u0432, \u043e\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0445 \u0438\u0437 \u0432\u0435\u0440\u0448\u0438\u043d ABC, \u0441 \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u043f\u043e\u043b\u043e\u0436\u043d\u044b\u043c\u0438 \u0441\u0442\u043e\u0440\u043e\u043d\u0430\u043c\u0438 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430 \u043d\u0430\u0437\u043e\u0432\u0435\u043c A&quot;, B&quot; \u0438 C&quot;:<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/27d\/def\/e85\/27ddefe85fe70fd8d27385642ea6fd67.png\"\/><\/p>\n<h4>\u0417\u0430\u0434\u0430\u0447\u0430:<\/h4>\n<p> \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432 \u043a\u0430\u0436\u0434\u043e\u0439 \u0442\u043e\u0447\u043a\u0435 \u0432\u043d\u0443\u0442\u0440\u0438 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430(\u043d\u0430\u0437\u043e\u0432\u0435\u043c \u0442\u0430\u043a\u0443\u044e \u0442\u043e\u0447\u043a\u0443 O), \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u044b \u0431\u043b\u0438\u0437\u043e\u0441\u0442\u0438 \u044d\u0442\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 \u043a \u043a\u0430\u0436\u0434\u043e\u0439 \u0432\u0435\u0440\u0448\u0438\u043d\u0435(A,B,C) \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430. \u041f\u0440\u043e\u0446\u0435\u043d\u0442\u044b \u0432 \u0441\u0443\u043c\u043c\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0434\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 100.<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/3c8\/5a4\/157\/3c85a41577b64508598cf27ef2899a4f.png\"\/><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-196104","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/196104","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=196104"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/196104\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=196104"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=196104"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=196104"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}