{"id":264615,"date":"2015-08-31T11:57:02","date_gmt":"2015-08-31T07:57:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=264615"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=264615","title":{"rendered":"\u041f\u0438\u0448\u0435\u043c \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u0448\u0443\u043c \u041f\u0435\u0440\u043b\u0438\u043d\u0430"},"content":{"rendered":"<p>             \u041f\u043e \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u043e\u043c\u0443 \u0437\u0430\u043f\u0440\u043e\u0441\u0443 <i>\u0448\u0443\u043c \u043f\u0435\u0440\u043b\u0438\u043d\u0430<\/i> \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442\u0441\u044f <a href=\"http:\/\/habrahabr.ru\/post\/142592\/\">\u044d\u0442\u043e\u0442 \u043f\u0435\u0440\u0435\u0432\u043e\u0434<\/a> \u043d\u0430 \u0425\u0430\u0431\u0440\u0435. \u041a\u0430\u043a \u0441\u043f\u0440\u0430\u0432\u0435\u0434\u043b\u0438\u0432\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u043b\u0438 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u043a \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438, \u0440\u0435\u0447\u044c \u0438\u0434\u0451\u0442 \u0432\u043e\u0432\u0441\u0435 \u043d\u0435 \u043e \u0448\u0443\u043c\u0435 \u041f\u0435\u0440\u043b\u0438\u043d\u0430. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0430\u0432\u0442\u043e\u0440 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0430 \u0438 \u0441\u0430\u043c \u0431\u044b\u043b \u043d\u0435 \u0432 \u043a\u0443\u0440\u0441\u0435.<\/p>\n<p>  \u0427\u0435\u043c \u0432\u044b\u0433\u043e\u0434\u043d\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u0448\u0443\u043c \u041f\u0435\u0440\u043b\u0438\u043d\u0430, \u043b\u0435\u0433\u043a\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0435\u0441\u043b\u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438.<\/p>\n<p>  \u041e\u0431\u044b\u0447\u043d\u044b\u0439 \u0448\u0443\u043c (\u0438\u0437 \u0442\u043e\u0439 \u0441\u0430\u043c\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438):<br \/>  <img loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"150\" src=\"http:\/\/freespace.virgin.net\/hugo.elias\/models\/perlin_b.jpg\" alt=\"image\"\/><\/p>\n<p>  \u0428\u0443\u043c \u041f\u0435\u0440\u043b\u0438\u043d\u0430:<br \/>  <img loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"150\" src=\"http:\/\/paulbourke.net\/texture_colour\/perlin\/perlin2d_0.gif\" alt=\"image\"\/><\/p>\n<p>  \u0418 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043e\u043a\u0442\u0430\u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u043a\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u043f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0448\u044c. \u042f \u043d\u0435 \u0431\u0443\u0434\u0443 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0434\u043e\u0441\u0442\u043e\u0438\u043d\u0441\u0442\u0432\u0430 \u0448\u0443\u043c\u0430 \u041f\u0435\u0440\u043b\u0438\u043d\u0430 \u0438 \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f, \u0430 \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u0442\u044c \u043a\u0430\u043a \u043e\u043d \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d. \u0414\u0443\u043c\u0430\u044e, \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u043c\u043d\u043e\u0433\u0438\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0430\u043c, \u0432\u0435\u0434\u044c \u0445\u0430\u043a\u0435\u0440\u0441\u043a\u0438\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u041a\u0435\u043d\u0430 \u041f\u0435\u0440\u043b\u0438\u043d\u0430 \u043d\u0435 \u043c\u043d\u043e\u0433\u043e \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u044e\u0442 \u0434\u0430\u0436\u0435 \u043f\u0440\u0438 \u043d\u0430\u043b\u0438\u0447\u0438\u0438 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0434\u0432\u0443\u0445\u043c\u0435\u0440\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442. \u041f\u043e\u043a\u0430 \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043b\u0430\u0441\u0441-\u0437\u0430\u0433\u043e\u0442\u043e\u0432\u043a\u0443. \u0412\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u2014 \u0434\u0432\u0443\u0445\u043c\u0435\u0440\u043d\u044b\u0439 \u0432\u0435\u043a\u0442\u043e\u0440 \u0438\u043b\u0438 \u0434\u0432\u0430 \u0447\u0438\u0441\u043b\u0430 \u0441 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0435\u0439 \u0442\u043e\u0447\u043a\u043e\u0439: x, y.<\/p>\n<p>  \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u2014 \u0447\u0438\u0441\u043b\u043e \u043e\u0442 -1.0 \u0434\u043e 1.0:  <\/p>\n<pre><code class=\"cs\">public class Perlin2d {   public float Noise(float x, float y)   {     throw new NotImplementedException();   } } <\/code><\/pre>\n<p>  <\/p>\n<h3>\u041f\u0430\u0440\u0443 \u0441\u043b\u043e\u0432 \u043e\u0431 \u0438\u043d\u0442\u0435\u0440\u043f\u043e\u043b\u044f\u0446\u0438\u0438<\/h3>\n<p>  \u0418\u0434\u0435\u044f \u043e\u0431\u044b\u0447\u043d\u043e\u0433\u043e \u0441\u0433\u043b\u0430\u0436\u0435\u043d\u043d\u043e\u0433\u043e \u0448\u0443\u043c\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0435\u0441\u0442\u044c \u0434\u0438\u0441\u043a\u0440\u0435\u0442\u043d\u0430\u044f \u0441\u0435\u0442\u043a\u0430 \u043f\u0441\u0435\u0432\u0434\u043e\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439, \u0438 \u0434\u043b\u044f \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u043c\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0438\u043d\u0442\u0435\u0440\u043f\u043e\u043b\u044f\u0446\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u0443\u0437\u043b\u0430\u043c\u0438 \u0441\u0435\u0442\u043a\u0438 (\u0447\u0435\u043c \u0431\u043b\u0438\u0436\u0435 \u0442\u043e\u0447\u043a\u0430 \u043a \u043a\u0430\u043a\u043e\u043c\u0443-\u043d\u0438\u0431\u0443\u0434\u044c \u0443\u0437\u043b\u0443 \u0441\u0435\u0442\u043a\u0438, \u0442\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e \u0443\u0437\u043b\u0430).<\/p>\n<p>  \u0417\u0434\u0435\u0441\u044c \u0432 \u0442\u0440\u0435\u0442\u044c\u0435\u043c \u0443\u0441\u043b\u043e\u0432\u043d\u043e\u043c \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0435 \u0442\u043e\u0447\u043a\u0430 \u0432 \u0441\u0430\u043c\u043e\u043c \u0446\u0435\u043d\u0442\u0440\u0435 \u043f\u043e\u0441\u043b\u0435 \u0438\u043d\u0442\u0435\u0440\u043f\u043e\u043b\u044f\u0446\u0438\u0438 \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 3:<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/s2.postimg.org\/jr77bycfd\/lerp.png\" alt=\"image\"\/><\/p>\n<p>  \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u0435\u0435 \u043a\u0430\u043a \u0442\u0430\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0442\u0440\u043e\u0439\u043a\u0430. \u041a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0442\u043e\u0447\u043a\u0438: <br \/>  <code> x:2.5,  y:0.5 <\/code><\/p>\n<p>  \u0426\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0442\u043e\u0447\u043a\u0438 (\u0432\u0435\u0440\u0445\u043d\u0438\u0439 \u043b\u0435\u0432\u044b\u0439 \u0443\u0433\u043e\u043b \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0430): <br \/>  <code> x:2,  y:0  <\/code><br \/>  \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442\u0441\u044f \u043e\u043a\u0440\u0443\u0433\u043b\u0435\u043d\u0438\u0435\u043c \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 0 (\u0444\u0443\u043d\u043a\u0446\u0438\u044f floor).<\/p>\n<p>  \u041b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0442\u043e\u0447\u043a\u0438 \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442\u0441\u044f \u0432\u044b\u0447\u0438\u0442\u0430\u043d\u0438\u0435\u043c: <br \/>  <code> x = 2.5 &ndash; 2 = 0.5,  y = 0.5 &ndash; 0 = 0.5 <\/code><\/p>\n<p>  \u0411\u0435\u0440\u0451\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043b\u0435\u0432\u043e\u0433\u043e \u0432\u0435\u0440\u0445\u043d\u0435\u0433\u043e \u0443\u0433\u043b\u0430 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0430 (1) \u0438 \u0432\u0435\u0440\u0445\u043d\u0435\u0433\u043e \u043f\u0440\u0430\u0432\u043e\u0433\u043e (2). \u0418\u043d\u0442\u0435\u0440\u043f\u043e\u043b\u0438\u0440\u0443\u0435\u043c \u0432\u0435\u0440\u0445\u043d\u044e\u044e \u0433\u0440\u0430\u043d\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0443 x (0.5). \u041b\u0438\u043d\u0435\u0439\u043d\u0430\u044f \u0438\u043d\u0442\u0435\u0440\u043f\u043e\u043b\u044f\u0446\u0438\u044f \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:  <\/p>\n<pre><code class=\"cs\">static float Lerp(float a, float b, float t) { \/\/ return a * t + b * (1 - t); \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u0442\u044c \u0441 \u043e\u0434\u043d\u0438\u043c \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435\u043c (\u0440\u0430\u0441\u043a\u0440\u044b\u0442\u044c \u0441\u043a\u043e\u0431\u043a\u0438, \u0432\u0437\u044f\u0442\u044c \u0432 \u0434\u0440\u0443\u0433\u0438\u0435 \u0441\u043a\u043e\u0431\u043a\u0438):   return a + (b - a) * t; } <\/code><\/pre>\n<p>  \u0411\u0435\u0440\u0451\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043b\u0435\u0432\u043e\u0433\u043e \u043d\u0438\u0436\u043d\u0435\u0433\u043e \u0443\u0433\u043b\u0430 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0430 (2) \u0438 \u043d\u0438\u0436\u043d\u0435\u0433\u043e \u043f\u0440\u0430\u0432\u043e\u0433\u043e (7). \u0418\u043d\u0442\u0435\u0440\u043f\u043e\u043b\u0438\u0440\u0443\u0435\u043c \u043d\u0438\u0436\u043d\u044e\u044e \u0433\u0440\u0430\u043d\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0432\u0441\u0451 \u0442\u0443 \u0436\u0435 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0443 x (0.5).<br \/>  \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b:<br \/>  <code> \u0432\u0435\u0440\u0445\u043d\u044f\u044f: 1.5 \u043d\u0438\u0436\u043d\u044f\u044f: 4.5 <\/code><\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043e\u0441\u0442\u0430\u043b\u0430\u0441\u044c \u0438\u043d\u0442\u0435\u0440\u043f\u043e\u043b\u044f\u0446\u0438\u044f \u0432\u0435\u0440\u0445\u043d\u0435\u0439 \u0438 \u043d\u0438\u0436\u043d\u0435\u0439 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b y (\u0442\u043e\u0436\u0435 0.5):<br \/>  <code> 1.5 * 0.5 + 4.5 * (1 &ndash; 0.5) = 3 <\/code><\/p>\n<p>  \u0411\u0438\u043b\u0438\u043d\u0435\u0439\u043d\u0430\u044f \u0438\u043d\u0442\u0435\u0440\u043f\u043e\u043b\u044f\u0446\u0438\u044f \u0441\u0430\u043c\u0430\u044f \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u043d\u043e \u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043d\u0435 \u0441\u0430\u043c\u044b\u0439 \u043f\u0440\u0438\u0432\u043b\u0435\u043a\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439.<\/p>\n<p>  \u0414\u0440\u0443\u0433\u0438\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0438\u043d\u0442\u0435\u0440\u043f\u043e\u043b\u044f\u0446\u0438\u0438 \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u044e\u0442 \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b (\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 t) \u043f\u0435\u0440\u0435\u0434 \u0438\u043d\u0442\u0435\u0440\u043f\u043e\u043b\u044f\u0446\u0438\u0435\u0439. \u041f\u043e\u043b\u0443\u0447\u0430\u044e\u0442\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u043f\u043b\u0430\u0432\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u044b \u0432\u043e\u0437\u043b\u0435 \u0433\u0440\u0430\u043d\u0438\u0447\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 (0 \u0438 1).<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/s1.postimg.org\/vm4tj0dlb\/fade_curve.png\" alt=\"image\"\/><\/p>\n<p>  \u0412 \u0448\u0443\u043c\u0435 \u041f\u0435\u0440\u043b\u0438\u043d\u0430 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u043d \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u043e\u043d \u0434\u0430\u0451\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0441\u0438\u043b\u044c\u043d\u043e\u0435 \u0438\u0441\u043a\u0440\u0438\u0432\u043b\u0435\u043d\u0438\u0435.  <\/p>\n<pre><code class=\"cs\">static float QunticCurve(float t) {   return t * t * t * (t * (t * 6 - 15) + 10); } ... \/\/ \u043a\u043e\u043c\u0431\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u043f\u043e\u043b\u044f\u0446\u0438\u0438: Lerp(a, b, QuinticCurve(t)) <\/code><\/pre>\n<h3>\u0413\u043b\u0430\u0432\u043d\u0430\u044f \u0438\u0434\u0435\u044f \u0438 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u0448\u0443\u043c\u0430 \u041f\u0435\u0440\u043b\u0438\u043d\u0430<\/h3>\n<p>  \u0412\u0441\u0451 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e:<br \/>  1. \u0412 \u0443\u0437\u043b\u0430\u0445 \u0441\u0435\u0442\u043a\u0438 \u2014 \u043f\u0441\u0435\u0432\u0434\u043e\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0435 <b>\u0432\u0435\u043a\u0442\u043e\u0440\u0430<\/b> (\u0434\u0432\u0443\u0445\u043c\u0435\u0440\u043d\u044b\u0435 \u0434\u043b\u044f \u0434\u0432\u0443\u0445\u043c\u0435\u0440\u043d\u043e\u0433\u043e \u0448\u0443\u043c\u0430, \u0442\u0440\u0435\u0445\u043c\u0435\u0440\u043d\u044b\u0435 \u0434\u043b\u044f \u0442\u0440\u0435\u0445\u043c\u0435\u0440\u043d\u043e\u0433\u043e \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435), <b>\u0430 \u043d\u0435<\/b> \u043f\u0441\u0435\u0432\u0434\u043e\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0435 <b>\u0447\u0438\u0441\u043b\u0430<\/b>.<br \/>  2. <b>\u0418\u043d\u0442\u0435\u0440\u043f\u043e\u043b\u0438\u0440\u0443\u0435\u043c \u043c\u0435\u0436\u0434\u0443 \u0441\u043a\u0430\u043b\u044f\u0440\u043d\u044b\u043c\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f\u043c\u0438<\/b> a) \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432 \u043e\u0442 \u0432\u0435\u0440\u0448\u0438\u043d \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0430 \u0434\u043e \u0442\u043e\u0447\u043a\u0438 \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0430 (\u043a\u0443\u0431\u0430 \u0432 \u0442\u0440\u0435\u0445\u043c\u0435\u0440\u043d\u043e\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0435) \u0438 b) \u043f\u0441\u0435\u0432\u0434\u043e\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432 (\u043f\u0440\u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u0448\u0443\u043c\u0430 \u041f\u0435\u0440\u043b\u0438\u043d\u0430 \u0438\u0445 \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043d\u044b\u043c\u0438 \u0432\u0435\u043a\u0442\u043e\u0440\u0430\u043c\u0438).<\/p>\n<p>  \u0412 \u0441\u0432\u043e\u0451\u043c <a href=\"http:\/\/mrl.nyu.edu\/~perlin\/noise\/\">\u0443\u043b\u0443\u0447\u0448\u0435\u043d\u043d\u043e\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0435<\/a> \u0448\u0443\u043c\u0430 \u041a\u0435\u043d \u041f\u0435\u0440\u043b\u0438\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0432\u0441\u0435\u0433\u043e 12 \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043d\u044b\u0445 \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432. \u0414\u043b\u044f \u0434\u0432\u0443\u0445\u043c\u0435\u0440\u043d\u043e\u0433\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0432\u0441\u0435\u0433\u043e 4 &mdash; \u043f\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0443 \u0433\u0440\u0430\u043d\u0435\u0439 (\u0443 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0430 \u0438\u0445 4). \u0412\u0435\u043a\u0442\u043e\u0440\u0430 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u044b (\u0443\u0441\u043b\u043e\u0432\u043d\u043e \u0438\u0437 \u0446\u0435\u043d\u0442\u0440\u0430 \u043a\u0443\u0431\u0430\/\u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0430) \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0437 \u0433\u0440\u0430\u043d\u0435\u0439 \u0438 \u043d\u0435 \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b.<\/p>\n<p>  \u0412\u043e\u0442 \u043e\u043d\u0438:  <\/p>\n<pre><code class=\"cs\">{  1, 0 } { -1, 0 } {  0, 1 } {  0,-1 } <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"http:\/\/s10.postimg.org\/yvynpsgi1\/dist.png\" alt=\"image\"\/><\/p>\n<p>  \u0418\u0442\u0430\u043a, \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0443\u0437\u043b\u0443 \u0441\u0435\u0442\u043a\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043e\u0434\u0438\u043d \u0438\u0437 \u0447\u0435\u0442\u044b\u0440\u0451\u0445 \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432. \u041f\u0443\u0441\u0442\u044c \u0432\u0435\u043a\u0442\u043e\u0440 \u0443 \u043d\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u043c float-\u043e\u0432.  <\/p>\n<pre><code class=\"cs\">    float[] GetPseudoRandomGradientVector(int x, int y)     {         int v = \/\/ \u043f\u0441\u0435\u0432\u0434\u043e-\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u043e\u0442 0 \u0434\u043e 3 \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u043d\u0435\u0438\u0437\u043c\u0435\u043d\u043d\u043e \u043f\u0440\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 x \u0438 y          switch (v)         {             case 0:  return new float[]{  1, 0 };             case 1:  return new float[]{ -1, 0 };             case 2:  return new float[]{  0, 1 };             default: return new float[]{  0,-1 };         }     } <\/code><\/pre>\n<h3>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f<\/h3>\n<p>  \u041d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0441\u043a\u0430\u043b\u044f\u0440\u043d\u043e\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432:  <\/p>\n<pre><code class=\"cs\">    static float Dot(float[] a, float[] b)     {         return a[0] * b[0] + a[1] * b[1];     } <\/code><\/pre>\n<p>  \u0413\u043b\u0430\u0432\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434:  <\/p>\n<pre><code class=\"cs\">    public float Noise(float fx, float fy)     {         \/\/ \u0441\u0440\u0430\u0437\u0443 \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u043b\u0435\u0432\u043e\u0439 \u0432\u0435\u0440\u0445\u043d\u0435\u0439 \u0432\u0435\u0440\u0448\u0438\u043d\u044b \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0430         int left = (int)System.Math.Floor(fx);         int top  = (int)System.Math.Floor(fy);          \/\/ \u0430 \u0442\u0435\u043f\u0435\u0440\u044c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0442\u043e\u0447\u043a\u0438 \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0430         float pointInQuadX = fx - left;         float pointInQuadY = fy - top;          \/\/ \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u043c \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043d\u044b\u0435 \u0432\u0435\u043a\u0442\u043e\u0440\u044b \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0432\u0435\u0440\u0448\u0438\u043d \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0430:         float[] topLeftGradient     = GetPseudoRandomGradientVector(left,   top  );         float[] topRightGradient    = GetPseudoRandomGradientVector(left+1, top  );         float[] bottomLeftGradient  = GetPseudoRandomGradientVector(left,   top+1);         float[] bottomRightGradient = GetPseudoRandomGradientVector(left+1, top+1);          \/\/ \u0432\u0435\u043a\u0442\u043e\u0440\u0430 \u043e\u0442 \u0432\u0435\u0440\u0448\u0438\u043d \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0430 \u0434\u043e \u0442\u043e\u0447\u043a\u0438 \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0430:         float[] distanceToTopLeft     = new float[]{ pointInQuadX,   pointInQuadY   };         float[] distanceToTopRight    = new float[]{ pointInQuadX-1, pointInQuadY   };         float[] distanceToBottomLeft  = new float[]{ pointInQuadX,   pointInQuadY-1 };         float[] distanceToBottomRight = new float[]{ pointInQuadX-1, pointInQuadY-1 };          \/\/ \u0441\u0447\u0438\u0442\u0430\u0435\u043c \u0441\u043a\u0430\u043b\u044f\u0440\u043d\u044b\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0431\u0443\u0434\u0435\u043c \u0438\u043d\u0442\u0435\u0440\u043f\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \/*  tx1--tx2   |    |  bx1--bx2 *\/         float tx1 = Dot(distanceToTopLeft,     topLeftGradient);         float tx2 = Dot(distanceToTopRight,    topRightGradient);         float bx1 = Dot(distanceToBottomLeft,  bottomLeftGradient);         float bx2 = Dot(distanceToBottomRight, bottomRightGradient);          \/\/ \u0433\u043e\u0442\u043e\u0432\u0438\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0438\u043d\u0442\u0435\u0440\u043f\u043e\u043b\u044f\u0446\u0438\u0438, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0430 \u043d\u0435 \u0431\u044b\u043b\u0430 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439:         pointInQuadX = QunticCurve(pointInQuadX);         pointInQuadY = QunticCurve(pointInQuadY);          \/\/ \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0438\u043d\u0442\u0435\u0440\u043f\u043e\u043b\u044f\u0446\u0438\u044f:         float tx = Lerp(tx1, tx2, pointInQuadX);         float bx = Lerp(bx1, bx2, pointInQuadX);         float tb = Lerp(tx, bx, pointInQuadY);          \/\/ \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:         return tb;     } <\/code><\/pre>\n<p>  \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u043e\u043d\u0443\u0441\u0430:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u043c\u0443\u043b\u044c\u0442\u0438\u043e\u043a\u0442\u0430\u0432\u043d\u044b\u0439 \u0448\u0443\u043c<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code>    public float Noise(float fx, float fy, int octaves, float persistence = 0.5f)     {         float amplitude = 1; \/\/ \u0441\u0438\u043b\u0430 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0448\u0443\u043c\u0430 \u043a \u043e\u0431\u0449\u0435\u0439 \u043a\u0430\u0440\u0442\u0438\u043d\u0435, \u0431\u0443\u0434\u0435\u0442 \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0442\u044c\u0441\u044f \u0441 &quot;\u043c\u0435\u043b\u044c\u0447\u0430\u043d\u0438\u0435\u043c&quot; \u0448\u0443\u043c\u0430         \/\/ \u043a\u0430\u043a \u0441\u0438\u043b\u044c\u043d\u043e \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0442\u044c\u0441\u044f - \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u0443\u0435\u0442 persistence         float max = 0; \/\/ \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043b\u044f \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430         float result = 0; \/\/ \u043d\u0430\u043a\u043e\u043f\u0438\u0442\u0435\u043b\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430          while (octaves-- &gt; 0)         {             max += amplitude;             result += Noise(fx, fy) * amplitude;             amplitude *= persistence;             fx *= 2; \/\/ \u0443\u0434\u0432\u0430\u0438\u0432\u0430\u0435\u043c \u0447\u0430\u0441\u0442\u043e\u0442\u0443 \u0448\u0443\u043c\u0430 (\u0434\u0435\u043b\u0430\u0435\u043c \u0435\u0433\u043e \u0431\u043e\u043b\u0435\u0435 \u043c\u0435\u043b\u043a\u0438\u043c) \u0441 \u043a\u0430\u0436\u0434\u043e\u0439 \u043e\u043a\u0442\u0430\u0432\u043e\u0439             fy *= 2;         }          return result\/max;     } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0418 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0441\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c\u0438 \u0447\u0438\u0441\u043b\u0430\u043c\u0438. \u0412 \u043a\u043e\u0434\u0435 \u041a\u0435\u043d\u0430 \u041f\u0435\u0440\u043b\u0438\u043d\u0430 \u0442\u0430\u043a\u0430\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u043d\u0430 \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0438 \u0434\u043e\u0441\u0442\u0430\u044e\u0442\u0441\u044f \u043e\u0442\u0442\u0443\u0434\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u043e\u0432\u0441\u0435\u043c \u043f\u043e-\u0434\u0440\u0443\u0433\u043e\u043c\u0443. \u0417\u0434\u0435\u0441\u044c \u043c\u043e\u0436\u043d\u043e \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u043e\u0442 \u044d\u0442\u043e\u0433\u043e \u043d\u0435\u043c\u0430\u043b\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u0440\u0430\u0432\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u044c \u0448\u0443\u043c\u0430 \u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u0432 \u043d\u0451\u043c \u044f\u0432\u043d\u044b\u0445 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u043e\u0432.<\/p>\n<p>  \u042f \u0441\u0434\u0435\u043b\u0430\u043b  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0442\u0430\u043a<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">class Perlin2D {     byte[] permutationTable;      public Perlin2D(int seed = 0)     {         var rand = new System.Random(seed);         permutationTable = new byte[1023];         rand.NextBytes(permutationTable); \/\/ \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c\u0438 \u0431\u0430\u0439\u0442\u0430\u043c\u0438     }      private float[] GetPseudoRandomGradientVector(int x, int y)     { \/\/ \u0445\u044d\u0448-\u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0441 \u041f\u0440\u043e\u0441\u0442\u044b\u043c\u0438 \u0447\u0438\u0441\u043b\u0430\u043c\u0438, \u043e\u0431\u0440\u0435\u0437\u043a\u043e\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0434\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0441\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c\u0438 \u0431\u0430\u0439\u0442\u0430\u043c\u0438         int v = (int)(((x * 1836311903) ^ (y * 2971215073) + 4807526976) & 1023);         v = permutationTable[v]&3;          switch (v)         {             ... <\/code><\/pre>\n<p>  <b>&#038; 3<\/b> \u0437\u0434\u0435\u0441\u044c \u043e\u0431\u0440\u0435\u0437\u0430\u0435\u0442 \u043b\u044e\u0431\u043e\u0435 int32 \u0447\u0438\u0441\u043b\u043e \u0434\u043e 3, \u0447\u0438\u0442\u0430\u0439\u0442\u0435 <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%91%D0%B8%D1%82%D0%BE%D0%B2%D1%8B%D0%B5_%D0%BE%D0%BF%D0%B5%D1%80%D0%B0%D1%86%D0%B8%D0%B8#.D0.9F.D0.BE.D0.B1.D0.B8.D1.82.D0.BE.D0.B2.D0.BE.D0.B5_.D0.98_.28AND.29\">\u043e\u0431 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 AND \u043d\u0430 \u0432\u0438\u043a\u0438\u043f\u0435\u0434\u0438\u0438<\/a><br \/>  \u041e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u0442\u0438\u043f\u0430 <b>% 3<\/b> \u0442\u043e\u0436\u0435 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0430 \u0431\u044b, \u043d\u043e \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0439.  <\/div>\n<\/div>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u0446\u0435\u043b\u0438\u043a\u043e\u043c (\u0431\u0435\u0437 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432)<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">class Perlin2D {     byte[] permutationTable;      public Perlin2D(int seed = 0)     {         var rand = new System.Random(seed);         permutationTable = new byte[1023];         rand.NextBytes(permutationTable);     }      private float[] GetPseudoRandomGradientVector(int x, int y)     {         int v = (int)(((x * 1836311903) ^ (y * 2971215073) + 4807526976) & 1023);         v = permutationTable[v]&3;          switch (v)         {             case 0:  return new float[]{  1, 0 };             case 1:  return new float[]{ -1, 0 };             case 2:  return new float[]{  0, 1 };             default: return new float[]{  0,-1 };         }     }      static float QunticCurve(float t)     {         return t * t * t * (t * (t * 6 - 15) + 10);     }      static float Lerp(float a, float b, float t)     {         return a + (b - a) * t;     }      static float Dot(float[] a, float[] b)     {         return a[0] * b[0] + a[1] * b[1];     }      public float Noise(float fx, float fy)     {         int left = (int)System.Math.Floor(fx);         int top  = (int)System.Math.Floor(fy);         float pointInQuadX = fx - left;         float pointInQuadY = fy - top;          float[] topLeftGradient     = GetPseudoRandomGradientVector(left,   top  );         float[] topRightGradient    = GetPseudoRandomGradientVector(left+1, top  );         float[] bottomLeftGradient  = GetPseudoRandomGradientVector(left,   top+1);         float[] bottomRightGradient = GetPseudoRandomGradientVector(left+1, top+1);          float[] distanceToTopLeft     = new float[]{ pointInQuadX,   pointInQuadY   };         float[] distanceToTopRight    = new float[]{ pointInQuadX-1, pointInQuadY   };         float[] distanceToBottomLeft  = new float[]{ pointInQuadX,   pointInQuadY-1 };         float[] distanceToBottomRight = new float[]{ pointInQuadX-1, pointInQuadY-1 };          float tx1 = Dot(distanceToTopLeft,     topLeftGradient);         float tx2 = Dot(distanceToTopRight,    topRightGradient);         float bx1 = Dot(distanceToBottomLeft,  bottomLeftGradient);         float bx2 = Dot(distanceToBottomRight, bottomRightGradient);          pointInQuadX = QunticCurve(pointInQuadX);         pointInQuadY = QunticCurve(pointInQuadY);          float tx = Lerp(tx1, tx2, pointInQuadX);         float bx = Lerp(bx1, bx2, pointInQuadX);         float tb = Lerp(tx, bx, pointInQuadY);          return tb;     }      public float Noise(float fx, float fy, int octaves, float persistence = 0.5f)     {         float amplitude = 1;         float max = 0;         float result = 0;          while (octaves-- &gt; 0)         {             max += amplitude;             result += Noise(fx, fy) * amplitude;             amplitude *= persistence;             fx *= 2;             fy *= 2;         }          return result\/max;     } } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<br \/>  <img decoding=\"async\" src=\"http:\/\/s3.postimg.org\/g8y73dutf\/result.png\" alt=\"image\"\/>             <\/p>\n<div class=\"clear\"><\/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\/post\/265775\/\"> http:\/\/habrahabr.ru\/post\/265775\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>             \u041f\u043e \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u043e\u043c\u0443 \u0437\u0430\u043f\u0440\u043e\u0441\u0443 <i>\u0448\u0443\u043c \u043f\u0435\u0440\u043b\u0438\u043d\u0430<\/i> \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442\u0441\u044f <a href=\"http:\/\/habrahabr.ru\/post\/142592\/\">\u044d\u0442\u043e\u0442 \u043f\u0435\u0440\u0435\u0432\u043e\u0434<\/a> \u043d\u0430 \u0425\u0430\u0431\u0440\u0435. \u041a\u0430\u043a \u0441\u043f\u0440\u0430\u0432\u0435\u0434\u043b\u0438\u0432\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u043b\u0438 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u043a \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438, \u0440\u0435\u0447\u044c \u0438\u0434\u0451\u0442 \u0432\u043e\u0432\u0441\u0435 \u043d\u0435 \u043e \u0448\u0443\u043c\u0435 \u041f\u0435\u0440\u043b\u0438\u043d\u0430. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0430\u0432\u0442\u043e\u0440 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0430 \u0438 \u0441\u0430\u043c \u0431\u044b\u043b \u043d\u0435 \u0432 \u043a\u0443\u0440\u0441\u0435.<\/p>\n<p>  \u0427\u0435\u043c \u0432\u044b\u0433\u043e\u0434\u043d\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u0448\u0443\u043c \u041f\u0435\u0440\u043b\u0438\u043d\u0430, \u043b\u0435\u0433\u043a\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0435\u0441\u043b\u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438.<\/p>\n<p>  \u041e\u0431\u044b\u0447\u043d\u044b\u0439 \u0448\u0443\u043c (\u0438\u0437 \u0442\u043e\u0439 \u0441\u0430\u043c\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438):<br \/>  <img loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"150\" src=\"http:\/\/freespace.virgin.net\/hugo.elias\/models\/perlin_b.jpg\" alt=\"image\"\/><\/p>\n<p>  \u0428\u0443\u043c \u041f\u0435\u0440\u043b\u0438\u043d\u0430:<br \/>  <img loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"150\" src=\"http:\/\/paulbourke.net\/texture_colour\/perlin\/perlin2d_0.gif\" alt=\"image\"\/><\/p>\n<p>  \u0418 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043e\u043a\u0442\u0430\u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u043a\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u043f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0448\u044c. \u042f \u043d\u0435 \u0431\u0443\u0434\u0443 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0434\u043e\u0441\u0442\u043e\u0438\u043d\u0441\u0442\u0432\u0430 \u0448\u0443\u043c\u0430 \u041f\u0435\u0440\u043b\u0438\u043d\u0430 \u0438 \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f, \u0430 \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u0442\u044c \u043a\u0430\u043a \u043e\u043d \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d. \u0414\u0443\u043c\u0430\u044e, \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u043c\u043d\u043e\u0433\u0438\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0430\u043c, \u0432\u0435\u0434\u044c \u0445\u0430\u043a\u0435\u0440\u0441\u043a\u0438\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u041a\u0435\u043d\u0430 \u041f\u0435\u0440\u043b\u0438\u043d\u0430 \u043d\u0435 \u043c\u043d\u043e\u0433\u043e \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u044e\u0442 \u0434\u0430\u0436\u0435 \u043f\u0440\u0438 \u043d\u0430\u043b\u0438\u0447\u0438\u0438 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432.  <\/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-264615","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/264615","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=264615"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/264615\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=264615"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=264615"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=264615"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}