{"id":249027,"date":"2015-01-28T22:24:03","date_gmt":"2015-01-28T18:24:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=249027"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=249027","title":{"rendered":"<span class=\"post_title\">\u041f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u043d\u0430\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0442\u0435\u043a\u0441\u0442\u0443\u0440 \u043f\u043b\u0430\u043d\u0435\u0442 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 Diamond-Square, \u0447\u0430\u0441\u0442\u044c 1<\/span>"},"content":{"rendered":"<div class=\"content html_format\">     \t<img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/b8a\/b3f\/d27\/b8ab3fd276ab744744eca2a1cd8376ba.jpg\" alt=\"image\"\/><\/p>\n<p>  \u0414\u043e\u0431\u0440\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u0443\u0442\u043e\u043a. \u041a\u0430\u043a \u0441\u043e \u043c\u043d\u043e\u0439 \u0431\u044b\u0432\u0430\u0435\u0442, \u043a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u044f \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0441\u044f \u0432 \u043a\u0430\u043a\u043e\u043c-\u0442\u043e \u0441\u043b\u043e\u0436\u043d\u043e\u043c \u0434\u043b\u044f \u0441\u0435\u0431\u044f \u0432\u043e\u043f\u0440\u043e\u0441\u0435, \u044f \u0441\u0440\u0430\u0437\u0443 \u0445\u043e\u0447\u0443 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u0441\u0435\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0435\u0448\u0438\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0435\u0440\u0438\u044e \u0438\u0437 \u0434\u0432\u0443\u0445 \u0441\u0442\u0430\u0442\u0435\u0439 \u043f\u043e \u0442\u0430\u043a\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0439 \u0442\u0435\u043c\u0435, \u043a\u0430\u043a \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u043d\u0430\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f. \u0410 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0435\u0435, \u044f \u0431\u0443\u0434\u0443 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043f\u0440\u043e \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044e \u0442\u0435\u043a\u0441\u0442\u0443\u0440 \u043f\u043b\u0430\u043d\u0435\u0442. \u0412 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437 \u044f \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043b\u0441\u044f \u043e\u0441\u043d\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u0435\u0435 \u0438 \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u0435\u0435, \u0447\u0435\u043c \u0432 \u043c\u043e\u0435\u043c \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u043f\u043e\u0441\u0442\u0435 <a href=\"http:\/\/habrahabr.ru\/post\/245219\/\">\u00ab\u041f\u0440\u043e\u0441\u0442\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0432 Unity\u00bb<\/a> (\u043a\u0441\u0442\u0430\u0442\u0438, \u0441\u043f\u0430\u0441\u0438\u0431\u043e \u0432\u0441\u0435\u043c \u0437\u0430 \u043e\u0442\u0432\u0435\u0442\u043d\u044b\u0435 \u043f\u043e\u0441\u0442\u044b). \u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c, \u0445\u043e\u0447\u0443 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u0430\u0448\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u043e\u043c\u0435\u043d\u0442\u043e\u0432:<\/p>\n<p>  1) \u042d\u0442\u043e\u0442 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u043d\u0435 \u043f\u0440\u0435\u0442\u0435\u043d\u0434\u0443\u0435\u0442 \u043d\u0430 \u0440\u0435\u0430\u043b\u0438\u0441\u0442\u0438\u0447\u043d\u043e\u0441\u0442\u044c, \u0438 \u043f\u0438\u0441\u0430\u043b \u044f \u0435\u0433\u043e \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u044b \u0434\u043b\u044f \u0441\u043e\u0442\u043d\u0438 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0445 \u0448\u0430\u0440\u0438\u043a\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0442 10% \u044d\u043a\u0440\u0430\u043d\u0430 \u0438 \u043a \u0442\u043e\u043c\u0443 \u0436\u0435 \u043f\u0440\u0438\u043a\u0440\u044b\u0442\u044b \u043e\u0431\u043b\u0430\u043a\u0430\u043c\u0438.<br \/>  2) \u041d\u043e \u044d\u0442\u043e \u043d\u0435 \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u044f \u043d\u0435 \u0431\u0443\u0434\u0443 \u0440\u0430\u0434 \u043a\u0440\u0438\u0442\u0438\u043a\u0435. \u041d\u0430\u043f\u0440\u043e\u0442\u0438\u0432, \u043e\u0434\u043d\u0430 \u0438\u0437 \u043f\u0440\u0438\u0447\u0438\u043d \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0441\u0442\u0430 \u2014 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043e\u0432\u0435\u0442\u044b \u043f\u043e \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430, \u044f \u0441 \u0440\u0430\u0434\u043e\u0441\u0442\u044c\u044e \u0443\u043b\u0443\u0447\u0448\u0443 \u0435\u0433\u043e. <br \/>  3) \u0427\u0438\u0441\u0442\u043e \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442: \u044f \u043f\u0438\u0448\u0443 \u043d\u0430 C# \u043f\u043e\u0434 Unity3d, \u0442\u0430\u043a \u0447\u0442\u043e \u0434\u0443\u043c\u0430\u0442\u044c \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u0432 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0441 \u043f\u0440\u0438\u0435\u043c\u043b\u0438\u043c\u043e\u0439 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u044e \u0432\u0430\u043c \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0441\u0430\u043c\u0438\u043c, \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u0438 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u0441\u0432\u043e\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u044b.<br \/>  \u0418\u0442\u0430\u043a, \u043f\u043b\u0430\u043d \u0442\u0430\u043a\u043e\u0432: \u0432 \u043f\u0435\u0440\u0432\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u044e \u043e \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u043d\u043e\u0439 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u043b\u0430\u043d\u0435\u0442 \u0442\u0438\u043f\u0430 \u00ab\u0442\u0435\u0440\u0440\u0430\u00bb, \u043f\u043e\u0442\u043e\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u044e \u0448\u043a\u0432\u0430\u043b \u043a\u0440\u0438\u0442\u0438\u043a\u0438, \u0440\u0430\u0434\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432\u0441\u0435 \u0438 \u0434\u0435\u043b\u0430\u043b\u043e\u0441\u044c, \u0443\u043b\u0443\u0447\u0448\u0430\u044e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c, \u0434\u043e\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e \u0434\u043b\u044f \u0434\u0440\u0443\u0433\u0438\u0445 \u0442\u0438\u043f\u043e\u0432 \u043f\u043b\u0430\u043d\u0435\u0442 \u0438 \u043f\u0438\u0448\u0443 \u0432\u0442\u043e\u0440\u0443\u044e \u0447\u0430\u0441\u0442\u044c.<\/p>\n<p>  \u0413\u043e\u0442\u043e\u0432\u044b? \u041f\u043e\u0435\u0445\u0430\u043b\u0438.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h4>\u041f\u0440\u043e\u043b\u043e\u0433<\/h4>\n<p>  <i>*\u042d\u0442\u0430 \u0447\u0430\u0441\u0442\u044c \u043d\u0435 \u043d\u0435\u0441\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0441\u043c\u044b\u0441\u043b\u043e\u0432\u043e\u0439 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438*<\/i><\/p>\n<p>  \u041a\u0430\u043a \u044f \u043f\u0438\u0441\u0430\u043b \u0432\u044b\u0448\u0435, \u043c\u043d\u0435 \u043f\u043e\u0437\u0430\u0440\u0435\u0437 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u0438\u0441\u044c \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u044b \u043f\u043b\u0430\u043d\u0435\u0442. \u0412 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435 \u0445\u0432\u0430\u0442\u0438\u043b\u043e \u0431\u044b \u043f\u043e 2 \u2014 3 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0432\u0438\u0434\u0430, \u043d\u043e \u0434\u0430\u0436\u0435 \u0442\u0430\u043a\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u043b\u044f \u043c\u0435\u043d\u044f, \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0432\u0448\u0435\u0433\u043e\u0441\u044f \u043d\u0438\u0447\u0435\u043c \u0441\u043b\u043e\u0436\u043d\u0435\u0435 paint.net, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435\u043f\u043e\u0434\u044a\u0435\u043c\u043d\u044b\u043c. \u0414\u0430 \u0438 \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0431\u044b \u043d\u0430\u0440\u0438\u0441\u043e\u0432\u0430\u043b, \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u043b\u043e \u0431\u044b \u0436\u0435\u043b\u0430\u0442\u044c \u043b\u0443\u0447\u0448\u0435\u0433\u043e. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0440\u0435\u0448\u0438\u043b, \u0447\u0442\u043e \u043b\u0443\u0447\u0448\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440. \u0420\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u0441\u0440\u0430\u0437\u0443 \u043a\u0438\u043d\u0443\u043b\u0441\u044f \u043f\u0438\u0441\u0430\u0442\u044c \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434. \u042f \u0440\u0435\u0448\u0438\u043b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u00ab\u043a\u043b\u0435\u0442\u043e\u0447\u043d\u0443\u044e \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044e\u00bb. \u041c\u043e\u044f \u0438\u0434\u0435\u044f \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u043b\u0430\u0441\u044c \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0434\u0432\u0443\u043c\u0435\u0440\u043d\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432, \u043a\u043b\u0435\u0442\u043a\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 (\u0438\u043b\u0438 enum&#8217;\u043e\u0432, \u0431\u0435\u0437 \u0440\u0430\u0437\u043d\u0438\u0446\u044b), \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0449\u0438\u0435 \u0437\u0430 \u0442\u043e, \u043a\u0430\u043a\u043e\u0439 \u00ab\u044d\u043b\u0435\u043c\u0435\u043d\u0442\u00bb (\u0442\u0440\u0430\u0432\u0430, \u043f\u0443\u0441\u0442\u044b\u043d\u044f, \u043c\u043e\u0440\u0435, <s>\u043a\u043e\u0440\u0435\u043d\u043d\u0430\u044f \u043f\u043e\u0440\u043e\u0434\u0430<\/s>&#8230;) \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u0430\u043d \u0432 \u044d\u0442\u043e\u0442 \u043f\u0438\u043a\u0441\u0435\u043b\u044c \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435. \u0427\u0435\u0440\u0435\u0437 \u0434\u0435\u043d\u044c \u0431\u0435\u0441\u043f\u043b\u043e\u0434\u043d\u044b\u0445 \u043f\u043e\u043f\u044b\u0442\u043e\u043a \u0438\u0434\u0435\u044f \u0431\u044b\u043b\u0430 \u0431\u0440\u0430\u043a\u043e\u0432\u0430\u043d\u0430 \u043a\u0430\u043a \u00ab\u0431\u0435\u0441\u043f\u0435\u0440\u0441\u043f\u0435\u043a\u0442\u0438\u0432\u043d\u044f\u043a\u00bb. \u041c\u043e\u0436\u0435\u0442 \u0443 \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u0438 \u0435\u0441\u0442\u044c \u043f\u0440\u0430\u0432\u043e \u043d\u0430 \u0436\u0438\u0437\u043d\u044c, \u043d\u043e \u0443 \u043d\u0435\u0433\u043e \u043a\u0443\u0447\u0430 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u043e\u0432: <\/p>\n<p>  1) \u0421\u043b\u043e\u0436\u043d\u0430\u044f \u043b\u043e\u0433\u0438\u043a\u0430, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0435\u0441\u043b\u0438 \u043a\u043b\u0435\u0442\u043e\u043a \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e.<br \/>  2) \u0418\u0437 \u0432\u0441\u0435\u0445 16 \u043c\u043b\u043d \u0446\u0432\u0435\u0442\u043e\u0432 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0441\u0430\u043c\u043e\u0435 \u0431\u043e\u043b\u044c\u0448\u0435\u0435 10 \u2014 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043b\u0435\u0442\u043e\u043a. <\/p>\n<p>  \u0412 \u043e\u0431\u0449\u0435\u043c, \u044f \u043d\u0430\u0447\u0430\u043b \u0438\u0441\u043a\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u0438 \u043d\u0430 \u0441\u0446\u0435\u043d\u0443 \u0432\u044b\u0445\u043e\u0434\u0438\u0442\u2026<\/p>\n<h4>Diamond-Square<\/h4>\n<p>  \u0414\u0430\u0432\u043d\u044b\u043c \u0434\u0430\u0432\u043d\u043e \u043e\u0434\u0438\u043d \u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u0447\u0435\u043b\u043e\u0432\u0435\u043a, Gavin S. P. Miller, \u043e\u043f\u0438\u0441\u0430\u043b \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 2D \u0448\u0443\u043c\u0430. \u0410 4 \u0433\u043e\u0434\u0430 \u043d\u0430\u0437\u0430\u0434 \u0434\u0440\u0443\u0433\u043e\u0439 \u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u0447\u0435\u043b\u043e\u0432\u0435\u043a, <a href=\"http:\/\/habrahabr.ru\/users\/denull\/\" class=\"user_link\">deNULL<\/a>, \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0443\u044e <a href=\"http:\/\/habrahabr.ru\/post\/111538\/\">\u0441\u0442\u0430\u0442\u044c\u044e<\/a> \u043f\u0440\u043e \u044d\u0442\u043e\u0442 \u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438. \u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u0438\u0434\u0442\u0438 \u0434\u0430\u043b\u044c\u0448\u0435, \u043d\u0430\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c, \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043e\u043f\u0438\u0441\u0430\u043d \u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0440\u043e\u0448\u043e. \u041d\u043e, \u043a\u043e\u0433\u0434\u0430 \u044f \u0441\u0442\u0430\u043b \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434, \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c. \u041a\u0430\u043a\u0438\u0435 \u0431\u044b\u043b\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0438 \u043a\u0430\u043a \u0438\u0445 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0440\u0435\u0448\u0438\u0442\u044c \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043f\u043e \u0445\u043e\u0434\u0443 \u0441\u0442\u0430\u0442\u044c\u0438. \u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u043e\u0431\u0449\u0435\u0439 \u0441\u0445\u0435\u043c\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439:<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/387\/10b\/12e\/38710b12e3ff4d2ab48226ca18d8f545.jpg\" alt=\"image\"\/><\/p>\n<p>  \u0421\u043d\u0430\u0447\u0430\u043b\u0430, \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043d\u0430\u0448\u0435\u0433\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430, \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u00ab\u043a\u0430\u0440\u0442\u0443 \u0432\u044b\u0441\u043e\u0442\u00bb \u2014 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u0447\u0442\u043e \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u043d\u0430 \u0432\u0442\u043e\u0440\u043e\u0439 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435. \u0422\u0430\u043a \u043a\u0430\u043a \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0446\u0432\u0435\u0442\u0430 \u0432 Unity \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u0440\u043e\u0431\u043d\u044b\u043c \u0447\u0438\u0441\u043b\u043e\u043c \u043e\u0442 0 \u0434\u043e 1, \u0442\u043e \u043c\u043e\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043f\u043e\u043b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u0432 \u044d\u0442\u043e\u043c \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435, \u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0435\u043b\u0430\u0442\u044c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u043e\u0434 \u0434\u0440\u0443\u0433\u043e\u0439 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u043d\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u0442 \u0442\u0440\u0443\u0434\u0430. \u0417\u0430\u0442\u0435\u043c \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u0441\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f\u0445 \u0437\u0430\u043d\u043e\u0441\u0438\u043c \u0432 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f r,g,b \u0446\u0432\u0435\u0442\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u043f\u0438\u043a\u0441\u0435\u043b\u044f. \u041f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c \u043a \u043f\u0435\u0440\u0432\u043e\u043c\u0443 \u043f\u0443\u043d\u043a\u0442\u0443.<\/p>\n<h4>\u0413\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u043a\u0430\u0440\u0442\u0443 \u0432\u044b\u0441\u043e\u0442<\/h4>\n<p>  \u041d\u0430 \u044d\u0442\u043e\u043c \u043c\u0435\u0441\u0442\u0435 \u0432\u044b, \u043d\u0430\u0434\u0435\u044e\u0441\u044c, \u0443\u0436\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0435 \u0441\u0435\u0431\u0435 \u043e\u0431\u0449\u0438\u0439 \u043f\u0440\u0438\u043d\u0446\u0438\u043f \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441\u0430\u043c\u043e\u0433\u043e diamond-square, \u0435\u0441\u043b\u0438 \u043d\u0435\u0442, \u0432\u0441\u0435-\u0442\u0430\u043a\u0438 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0439\u0442\u0435 \u0441\u0442\u0430\u0442\u044c\u044e, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u044f \u0443\u043a\u0430\u0437\u0430\u043b \u0432\u044b\u0448\u0435. \u042f \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u043f\u0438\u0448\u0443 \u0441\u0432\u043e\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u0434\u0432\u0443\u043c\u0435\u0440\u043d\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432, \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0440\u0430\u0432\u043d\u044b 2^n + 1, \u0434\u043b\u044f \u0434\u0440\u0443\u0433\u0438\u0445 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u0432 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0435\u0442). \u042f \u0432\u0437\u044f\u043b 2049\u04451025 (\u0441\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435 2:1 \u043b\u0443\u0447\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u0441\u0444\u0435\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u043b\u0430\u043d\u0435\u0442 \u0432 \u0432\u0430\u043a\u0443\u0443\u043c\u0435). \u041d\u0430\u043f\u0438\u0448\u0435\u043c \u043c\u0435\u0442\u043e\u0434\u044b Square \u0438 Diamond. \u041f\u0435\u0440\u0432\u0430\u044f \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u043b\u0435\u0432\u043e\u0433\u043e \u043d\u0438\u0436\u043d\u0435\u0433\u043e \u0438 \u043f\u0440\u0430\u0432\u043e\u0433\u043e \u0432\u0435\u0440\u0445\u043d\u0435\u0433\u043e \u0443\u0433\u043b\u043e\u0432 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0430 \u0438 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 \u0435\u0433\u043e \u0446\u0435\u043d\u0442\u0440. \u0412\u0442\u043e\u0440\u0430\u044f \u2014 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0442\u043e\u0447\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043d\u0430\u0434\u043e \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c (\u0442.\u0435. \u0441\u0435\u0440\u0435\u0434\u0438\u043d\u044b \u0441\u0442\u043e\u0440\u043e\u043d \u044d\u0442\u043e\u0433\u043e \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0430) \u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442 \u0435\u0435 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0441\u043c\u0435\u0436\u043d\u044b\u0445 \u0443\u0433\u043b\u043e\u0432 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0430, \u0435\u0433\u043e \u0446\u0435\u043d\u0442\u0440\u0430 \u0438 \u0446\u0435\u043d\u0442\u0440\u0430 \u0441\u043e\u0441\u0435\u0434\u043d\u0435\u0433\u043e \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0430. \u0412\u043e\u0442 \u043d\u0430 \u044d\u0442\u043e\u043c \u043c\u0435\u0441\u0442\u0435 \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430\u044f \u0437\u0430\u0433\u0432\u043e\u0437\u0434\u043a\u0430, \u043d\u043e \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u0430\u043c\u0438 \u043c\u0435\u0442\u043e\u0434\u044b:<\/p>\n<pre><code class=\"cs\">public static int ysize = 1025, xsize = ysize * 2 - 1; public static float[,] heighmap = new float[xsize, ysize]; public static float roughness = 2f;      \/\/\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0440\u0430\u0437\u043d\u0438\u0446\u0443 \u0432\u044b\u0441\u043e\u0442, \u0447\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435, \u0442\u0435\u043c \u0431\u043e\u043b\u0435\u0435 \u043d\u0435\u0440\u0430\u0432\u043d\u043e\u043c\u0435\u0440\u043d\u0430\u044f \u043a\u0430\u0440\u0442\u0430 \u0432\u044b\u0441\u043e\u0442  public static void Square(int lx, int ly, int rx, int ry)     {         int l = (rx - lx) \/ 2;          float a = heighmap[lx, ly];              \/\/  B--------C         float b = heighmap[lx, ry];              \/\/  |        |         float c = heighmap[rx, ry];              \/\/  |   ce   |         float d = heighmap[rx, ly];              \/\/  |        |                 int cex = lx + l;                        \/\/  A--------D         int cey = ly + l;          heighmap[cex, cey] = (a + b + c + d) \/ 4 + Random.Range(-l * 2 * roughness \/ ysize, l * 2 * roughness \/ ysize);     } <\/code><\/pre>\n<p>  \u0412\u0430\u0436\u043d\u043e\u0435 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u0435: Random.Range(float min, float max) \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043f\u0441\u0435\u0432\u0434\u043e\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0432 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u043c \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435. \u041e\u043d \u0431\u044b\u0441\u0442\u0440, \u043d\u043e \u0435\u0441\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0432 Unity. \u042f \u043f\u044b\u0442\u0430\u043b\u0441\u044f \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0430 System.Random \u0438 \u043e\u043d \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u041d\u0410\u041c\u041d\u041e\u0413\u041e \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435. \u041c\u043e\u0436\u0435\u0442, \u043d\u0435 \u0441\u0442\u043e\u0438\u043b\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u0432 \u0446\u0438\u043a\u043b\u0435, \u044f \u0438\u043c \u043f\u043e\u0447\u0442\u0438 \u043d\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f. \u042f \u043a \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0432\u0430\u043c \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0441\u0430\u043c\u0438\u043c \u043f\u0438\u0441\u0430\u0442\u044c \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u043f\u0441\u0435\u0432\u0434\u043e\u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b. <\/p>\n<p>  \u0415\u0434\u0435\u043c \u0434\u0430\u043b\u044c\u0448\u0435:<\/p>\n<pre><code class=\"cs\">bool lrflag = false; public static void Diamond(int tgx, int tgy, int l)     {         float a, b, c, d;          if (tgy - l &gt;= 0)             a = heighmap[tgx, tgy - l];                        \/\/      C--------         else                                                   \/\/      |        |             a = heighmap[tgx, ysize - l];                      \/\/ B---t g----D  |                                                                \/\/      |        |                                                                \/\/      A--------         if (tgx - l &gt;= 0)             b = heighmap[tgx - l, tgy];         else             if (lrflag)                 b = heighmap[xsize - l, tgy];             else                 b = heighmap[ysize - l, tgy];           if (tgy + l &lt; ysize)             c = heighmap[tgx, tgy + l];         else             c = heighmap[tgx, l];          if (lrflag)             if (tgx + l &lt; xsize)                 d = heighmap[tgx + l, tgy];             else&lt;source lang=&quot;cs&quot;&gt;                  d = heighmap[l, tgy];         else             if (tgx + l &lt; ysize)                 d = heighmap[tgx + l, tgy];             else                 d = heighmap[l, tgy];          heighmap[tgx, tgy] = (a + b + c + d) \/ 4 + Random.Range(-l * 2 * roughness \/ ysize, l * 2 * roughness \/ ysize);     } <\/code><\/pre>\n<p>  \u0412\u043e\u0442 \u0437\u0434\u0435\u0441\u044c \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c\u0441\u044f \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435. \u041a\u0430\u043a \u0432\u0438\u0434\u0438\u0442\u0435, \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 \u044f \u043f\u0440\u043e\u0432\u043e\u0436\u0443 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443: \u043d\u0435 \u0432\u044b\u0445\u043e\u0434\u0438\u0442 \u043b\u0438 \u043e\u043d\u0430 \u0437\u0430 \u0433\u0440\u0430\u043d\u0438\u0446\u044b \u043c\u0430\u0441\u0441\u0438\u0432\u0430. \u0415\u0441\u043b\u0438 \u0432\u044b\u0445\u043e\u0434\u0438\u0442, \u0442\u043e \u044f \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u044e \u0435\u0439 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u043f\u043e\u043b\u043e\u0436\u043d\u043e\u0439. \u0422.\u0435. \u0435\u0441\u043b\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u044b \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c \u0440\u043e\u043c\u0431 \u0432 \u043b\u0435\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438, \u0442\u043e \u0430\u0431\u0441\u0446\u0438\u0441\u0441\u0430 \u0435\u0433\u043e \u043b\u0435\u0432\u043e\u0439 \u0432\u0435\u0440\u0448\u0438\u043d\u044b \u043c\u0435\u043d\u044c\u0448\u0435 \u043d\u0443\u043b\u044f, \u0432\u043c\u0435\u0441\u0442\u043e \u043d\u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0442\u043e\u0447\u043a\u0438 \u0435\u0439 \u0441\u0438\u043c\u043c\u0435\u0442\u0440\u0438\u0447\u043d\u043e\u0439, \u0442.\u0435. xsize \u2014 l (l \u2014 \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0430). \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043f\u0440\u0438 \u043d\u0430\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u043d\u0430 \u0441\u0444\u0435\u0440\u0443 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u0443 \u0431\u0435\u0437 \u0448\u0432\u0430. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0434\u043b\u044f \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0439\u0442\u0438 \u0437\u0430 \u043f\u0440\u0430\u0432\u0443\u044e \u0433\u0440\u0430\u043d\u0438\u0446\u0443, \u043f\u0440\u043e\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430. \u0414\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e diamond-square \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043e\u0432. \u042f \u0434\u0435\u043b\u0430\u044e \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u0430\u043c\u0438 2:1 \u0438 \u0441\u0447\u0438\u0442\u0430\u044e \u0435\u0433\u043e \u043a\u0430\u043a \u0434\u0432\u0430 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0430. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0432\u0432\u0435\u043b \u0444\u043b\u0430\u0433, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0449\u0438\u0439, \u0432 \u043a\u0430\u043a\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043c\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u043c \u0438 \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u043d\u0438\u043c \u0441\u0447\u0438\u0442\u0430\u043b \u043f\u0440\u0430\u0432\u043e\u0439 \u0433\u0440\u0430\u043d\u0438\u0446\u0435\u0439 \u043b\u0438\u0431\u043e 1025 \u043b\u0438\u0431\u043e 2049 (ysize \u0438\u043b\u0438 xsize). \u041d\u0435 \u043e\u0447\u0435\u043d\u044c \u0438\u0437\u044f\u0449\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u0437\u0430\u0442\u043e \u0434\u0435\u0448\u0435\u0432\u043e, \u043d\u0430\u0434\u0435\u0436\u043d\u043e \u0438 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u043d\u043e, \u043c\u043d\u0435 \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u044e\u0442\u0441\u044f \u0434\u0440\u0443\u0433\u0438\u0435 \u0441\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f, \u0442\u0430\u043a \u0447\u0442\u043e \u044f \u043e\u0441\u0442\u0430\u0432\u0438\u043b \u043a\u0430\u043a \u0435\u0441\u0442\u044c. <\/p>\n<p>  <u>\u041f\u0435\u0440\u0435\u043f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u0432\u0441\u0435 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b!<\/u> \u042f \u0438\u0437-\u0437\u0430 \u043e\u0434\u043d\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u0438 \u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0435 diamond&#8217;a \u0446\u0435\u043b\u044b\u0439 \u0434\u0435\u043d\u044c \u043b\u043e\u043c\u0430\u043b \u0433\u043e\u043b\u043e\u0432\u0443 \u043f\u0435\u0440\u0435\u0434 \u044d\u0442\u043e\u0439, \u0431\u0435\u0437\u0443\u0441\u043b\u043e\u0432\u043d\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0439 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u043d\u043e \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435 \u0432 \u0442\u0435\u043c\u0443 \u043a\u0430\u0440\u0442\u0438\u043d\u044b:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0421\u043f\u043e\u0439\u043b\u0435\u0440<\/b><\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"http:\/\/i.imgur.com\/olEW5aT.jpg\" alt=\"image\"\/>  <\/div>\n<\/div>\n<p>  \u041d\u0430\u0448\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u043f\u043e\u0447\u0442\u0438 \u0433\u043e\u0442\u043e\u0432\u044b, \u043e\u0441\u0442\u0430\u043b\u0441\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043c\u0435\u0442\u043e\u0434, \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u044e\u0449\u0438\u0439 \u0438\u0445 \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0430.<\/p>\n<pre><code class=\"cs\">public static void DiamondSquare(int lx, int ly, int rx, int ry)     {         int l = (rx - lx) \/ 2;          Square(lx, ly, rx, ry);          Diamond(lx, ly + l, l);         Diamond(rx, ry - l, l);         Diamond(rx - l, ry, l);         Diamond(lx + l, ly, l);     } <\/code><\/pre>\n<p>  \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u043c\u044b \u041d\u0415 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u044d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u043e, \u043e\u0431\u044a\u044f\u0441\u043d\u044e \u043f\u043e\u0447\u0435\u043c\u0443. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043d\u0430 \u044d\u0442\u0443 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443:<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/i.imgur.com\/nHdsnwrl.jpg\" alt=\"image\"\/><\/p>\n<p>  \u042f \u043f\u043e\u0448\u0430\u0433\u043e\u0432\u043e \u043d\u0430\u0440\u0438\u0441\u043e\u0432\u0430\u043b, \u0447\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0435\u0441\u043b\u0438 \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c Diamond-Square \u0434\u043b\u044f \u043f\u043e\u0434-\u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043e\u0432. \u041f\u0435\u0440\u0432\u044b\u0439 \u043a\u0432\u0430\u0434\u0440\u0430\u0442 \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e, \u0442.\u043a. \u0432\u0435\u0440\u0448\u0438\u043d\u044b diamond&#8217;a \u0432\u044b\u0445\u043e\u0434\u044f\u0442 \u0437\u0430 \u043f\u0440\u0435\u0434\u0435\u043b\u044b \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0438 \u0432\u043c\u0435\u0441\u0442\u043e \u043d\u0438\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0446\u0435\u043d\u0442\u0440 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0430. \u041d\u043e \u0432\u043e\u0442 \u043a\u0432\u0430\u0434\u0440\u0430\u0442 \u0432\u043d\u0443\u0442\u0440\u0438 \u043d\u0435\u0433\u043e \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u0443\u0436\u0435 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e, \u0442.\u043a. \u0441\u0435\u0440\u0435\u0434\u0438\u043d\u044b \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043e\u0432 \u2014 \u0441\u043e\u0441\u0435\u0434\u0435\u0439 \u0435\u0449\u0435 \u043d\u0435 \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u043d\u044b. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u0445\u043e\u0440\u043e\u0448\u0435\u0433\u043e \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043a\u0430\u043a \u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0432 \u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435, \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043d\u0430\u0434\u043e \u0441\u043b\u043e\u044f\u043c\u0438 \u0438 \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u044f \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435 \u043d\u0443\u0436\u043d\u0430. \u0427\u0435\u0440\u0435\u0437 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043f\u043e\u0441\u043b\u0435 \u043e\u0441\u043e\u0437\u043d\u0430\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u0444\u0430\u043a\u0442\u0430 \u043c\u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u043e\u0431\u0441\u0447\u0435\u0442 \u043f\u043e \u0441\u043b\u043e\u044f\u043c:<\/p>\n<pre><code class=\"cs\">public static void Generate()     {         heighmap[0, 0] = Random.Range(0.3f, 0.6f);         heighmap[0, ysize - 1] = Random.Range(0.3f, 0.6f);         heighmap[xsize - 1, ysize - 1] = Random.Range(0.3f, 0.6f);         heighmap[xsize - 1, 0] = Random.Range(0.3f, 0.6f);          heighmap[ysize - 1, ysize - 1] = Random.Range(0.3f, 0.6f);         heighmap[ysize - 1, 0] = Random.Range(0.3f, 0.6f);          for (int l = (ysize - 1) \/ 2; l &gt; 0; l \/= 2)             for (int x = 0; x &lt; xsize - 1; x += l)             {                 if (x &gt;= ysize - l)                     lrflag = true;                 else                     lrflag = false;                  for (int y = 0; y &lt; ysize - 1; y += l)                     DiamondSquare(x, y, x + l, y + l);             }     } <\/code><\/pre>\n<p>  \u041c\u044b \u043f\u0435\u0440\u0435\u0431\u0438\u0440\u0430\u0435\u043c \u0432\u0441\u0435 \u0434\u043b\u0438\u043d\u044b \u0441\u0442\u043e\u0440\u043e\u043d \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043e\u0432 (\u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043b\u044e\u0434\u0438 \u043c\u043e\u0433\u043b\u0438 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u0431\u043e\u0440 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441\u0440\u0430\u0437\u0443 \u0441 \u0443\u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0435\u043d\u043d\u043e\u0439 \u0434\u043b\u0438\u043d\u044b; \u0435\u0441\u043b\u0438 \u0447\u0435\u0441\u0442\u043d\u043e, \u043f\u043e\u043d\u044f\u0442\u0438\u044f \u043d\u0435 \u0438\u043c\u0435\u044e \u043f\u043e\u0447\u0435\u043c\u0443, \u043d\u043e \u0435\u0441\u043b\u0438 \u0431\u0440\u0430\u0442\u044c \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u043b\u043d\u0443\u044e \u0441\u0442\u043e\u0440\u043e\u043d\u0443, \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442\u0441\u044f \u043c\u0430\u0442\u0435\u0440\u0438\u043a\u0438 \u2014 \u043f\u0435\u0440\u0435\u0440\u043e\u0441\u0442\u043a\u0438 \u043d\u0430 \u0432\u0441\u044e \u043a\u0430\u0440\u0442\u0443) \u0438 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0437 \u043d\u0438\u0445 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0435\u0440\u0435\u0431\u0438\u0440\u0430\u0435\u043c \u0432\u0441\u0435 \u043b\u0435\u0432\u044b\u0435 \u043d\u0438\u0436\u043d\u0438\u0435 \u0443\u0433\u043b\u044b \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043e\u0432 \u0432 \u044d\u0442\u043e\u043c \u00ab\u0441\u043b\u043e\u0435\u00bb \u0434\u043b\u0438\u043d. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0432\u0441\u0435 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u044b \u0432\u0441\u0435\u0433\u0434\u0430 \u00ab\u0437\u043d\u0430\u044e\u0442\u00bb \u0446\u0435\u043d\u0442\u0440\u044b \u0441\u043e\u0441\u0435\u0434\u0435\u0439 \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u0430\u044f \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430. \u041a\u0441\u0442\u0430\u0442\u0438, \u043a\u0430\u043a \u0432\u0438\u0434\u043d\u043e \u0438\u0437 \u043a\u043e\u0434\u0430, \u0447\u0435\u0442\u044b\u0440\u0435 \u0443\u0433\u043b\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 (\u0432 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 4 \u0443\u0433\u043b\u0430 \u0438 \u0441\u0435\u0440\u0435\u0434\u0438\u043d\u044b \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0441\u0442\u043e\u0440\u043e\u043d) \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0437\u0430\u0434\u0430\u043d\u044b, \u044d\u0442\u043e \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430. <\/p>\n<p>  \u0412\u0443\u0430\u043b\u044f!<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/i.imgur.com\/GKLLIUX.jpg\" alt=\"image\"\/><\/p>\n<p>  <b>\u041d\u0443 \u0430 \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u0430\u043c\u043e\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435 \u2014 \u0446\u0432\u0435\u0442<\/b>.<\/p>\n<p>  <u>Disclaimer<\/u>: \u0412\u0441\u0435, \u0447\u0442\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043e \u0434\u0430\u043b\u0435\u0435 \u2014 \u043c\u043e\u0439 \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434. \u0418, \u0447\u0435\u0441\u0442\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u043d\u0435 \u0441\u0430\u043c\u044b\u0439 \u043b\u0443\u0447\u0448\u0438\u0439. \u041e\u043d \u0432\u044b\u0434\u0430\u0435\u0442 \u0434\u0430\u043b\u0435\u043a\u043e \u043d\u0435 \u0441\u0430\u043c\u0443\u044e \u0440\u0435\u0430\u043b\u0438\u0441\u0442\u0438\u0447\u043d\u0443\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443, \u0435\u0433\u043e \u043a\u043e\u0434 \u0433\u0440\u043e\u043c\u043e\u0437\u0434\u043e\u043a \u0438 \u044f \u0441 \u0443\u0434\u043e\u0432\u043e\u043b\u044c\u0441\u0442\u0432\u0438\u0435\u043c \u0432\u044b\u0441\u043b\u0443\u0448\u0430\u044e \u0438\u0434\u0435\u0438 \u043f\u043e \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044e. \u0412\u0441\u0435, \u0432\u044b \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u044b, \u0433\u043e\u0442\u043e\u0432\u044c\u0442\u0435 \u0441\u0432\u043e\u0438 \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b \u043a \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u0441\u043e\u0447\u0438\u043d\u0435\u043d\u0438\u0439 \u043f\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043b\u0430\u043d\u0435\u0442, \u044f \u0432 \u0448\u043a\u043e\u043b\u0435 \u043f\u043b\u043e\u0445\u043e \u0441\u043b\u0443\u0448\u0430\u043b \u0438 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0437\u0430\u043f\u043e\u043c\u043d\u0438\u043b.<\/p>\n<p>  \u042f \u0440\u0435\u0448\u0438\u043b \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u0432\u0441\u044e \u043f\u043b\u0430\u043d\u0435\u0442\u0443 \u043d\u0430 \u0442\u0440\u0438 \u043f\u043e\u044f\u0441\u0430: \u0441\u043d\u0435\u0433, \u0437\u0435\u043b\u0435\u043d\u0430\u044f \u0437\u043e\u043d\u0430, \u043f\u0443\u0441\u0442\u044b\u043d\u043d\u0430\u044f \u0437\u043e\u043d\u0430. \u041f\u043e\u043c\u043d\u0438\u0442\u0435 \u0432 \u0443\u0447\u0435\u0431\u043d\u0438\u043a\u0430\u0445 \u0433\u0435\u043e\u0433\u0440\u0430\u0444\u0438\u0438 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0441 \u043d\u0438\u043c\u0438? \u0412\u043e\u0442 \u0441\u0435\u0439\u0447\u0430\u0441 \u0438\u0445 \u0438 \u0431\u0443\u0434\u0435\u043c \u0434\u0435\u043b\u0430\u0442\u044c. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u044f \u0441\u043e\u0437\u0434\u0430\u043b \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441. \u041e\u043d \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439, \u0432\u044b\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u044e \u0441\u0440\u0430\u0437\u0443 \u0432\u0435\u0441\u044c:<\/p>\n<pre><code class=\"cs\">public static class TemperatureCurves_class {     static int xsize = Heighmap_class.xsize;     public static int snowEdge = Heighmap_class.ysize \/ 10;     public static int greenEdge = Heighmap_class.ysize \/ 3;      public static int[] northGreen = new int[xsize];     public static int[] southGreen = new int[xsize];      public static int[] northSnow = new int[xsize];     public static int[] southSnow = new int[xsize];      static float snowRoughness = 0.03f;     static float greenRoughness = 0.15f;      static void MidPointDisplacement1D(ref int[] curve, int l, int r, float roughness)     {         if (r - l &gt; 1)         {             curve[(l + r) \/ 2] = (curve[l] + curve[r]) \/ 2 + (int)Random.Range(-(r - l) * roughness, (r - l) * roughness);             MidPointDisplacement1D(ref curve, l, (l + r) \/ 2, roughness);             MidPointDisplacement1D(ref curve, (l + r) \/ 2, r, roughness);         }     }      public static void Generate()     {         northSnow[0] = northSnow[xsize - 1] = Heighmap_class.ysize - snowEdge;         southSnow[0] = southSnow[xsize - 1] = snowEdge;          northGreen[0] = northGreen[xsize - 1] = Heighmap_class.ysize - greenEdge;         southGreen[0] = southGreen[xsize - 1] = greenEdge                  MidPointDisplacement1D(ref northGreen, 0, xsize - 1, greenRoughness);         MidPointDisplacement1D(ref southGreen, 0, xsize - 1, greenRoughness);         MidPointDisplacement1D(ref northSnow, 0, xsize - 1, snowRoughness);         MidPointDisplacement1D(ref southSnow, 0, xsize - 1, snowRoughness);     } } <\/code><\/pre>\n<p>  \u0418\u0442\u0430\u043a, \u043a\u0430\u043a \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0438\u0437 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f, \u0432 \u044d\u0442\u043e\u043c \u043a\u043b\u0430\u0441\u0441\u0435 \u043b\u0435\u0436\u0430\u0442 \u0433\u0440\u0430\u043d\u0438\u0446\u044b \u043a\u043b\u0438\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u043e\u044f\u0441\u043e\u0432. \u041e\u043d\u0438 \u0432 \u0432\u0438\u0434\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u0432 \u2014 \u0434\u0432\u0435 \u044e\u0436\u043d\u044b\u0435, \u0434\u0432\u0435 \u0441\u0435\u0432\u0435\u0440\u043d\u044b\u0435. \u0410 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u043c\u044b \u0438\u0445 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0440\u0435\u0434\u043a\u0430 diamond-square: midpoint displacement. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u044b \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043d\u0430 \u043f\u0440\u044f\u043c\u043e\u0439. \u0414\u0443\u043c\u0430\u044e, \u043f\u0440\u0438\u043d\u0446\u0438\u043f \u0435\u0433\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043f\u043e\u0441\u043b\u0435 diamond-square \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0442\u044c \u043d\u0435 \u043d\u0430\u0434\u043e, \u0442\u0435\u043c \u0431\u043e\u043b\u0435\u0435 <a href=\"http:\/\/habrahabr.ru\/users\/denull\/\" class=\"user_link\">deNULL<\/a> \u0434\u0430\u0432\u043d\u043e \u0443\u0436\u0435 \u0437\u0430 \u043c\u0435\u043d\u044f \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043b. \u0424\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u0442\u0430\u043c \u043b\u0435\u0436\u0438\u0442 \u043d\u0430\u0431\u043e\u0440 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442 y, \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0435 \u0445, \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u044e\u0449\u0438\u0445 \u0433\u0440\u0430\u043d\u0438\u0446\u0443 \u0440\u0430\u0437\u0434\u0435\u043b\u0430 \u043f\u043e\u044f\u0441\u043e\u0432. \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u044f\u0441 \u0431\u044b\u043b \u0437\u0430\u043c\u043a\u043d\u0443\u0442\u044b\u043c (\u043c\u044b \u0432\u0435\u0434\u044c \u0432\u0441\u0435 \u044d\u0442\u043e \u043f\u043e\u0442\u043e\u043c \u043d\u0430 \u0441\u0444\u0435\u0440\u0443 \u043d\u0430\u0442\u044f\u0433\u0438\u0432\u0430\u0442\u044c \u0431\u0443\u0434\u0435\u043c), \u0435\u0433\u043e \u043a\u0440\u0430\u044f \u043c\u044b \u0434\u0435\u043b\u0430\u0435\u043c \u0440\u0430\u0432\u043d\u044b\u043c\u0438. \u0410 \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u043c\u0430 \u0443 \u0441\u043d\u0435\u0433\u0430 \u0438 \u0434\u043b\u044f \u0437\u0435\u043b\u0435\u043d\u043e\u0439 \u043f\u043e\u043b\u043e\u0441\u044b \u0434\u0435\u043b\u0430\u0435\u043c \u0440\u0430\u0437\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f roughness \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u044f\u0440\u043d\u044b\u0439 \u043a\u0440\u0443\u0433 \u0431\u044b\u043b \u043a\u0440\u0443\u0433\u043e\u043c (\u043f\u0440\u044f\u043c\u043e\u0439 \u043d\u0430 \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u0435), \u0430 \u043f\u043e\u044f\u0441\u0430 \u043c\u043e\u0433\u043b\u0438 \u0438\u0437\u0432\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u043e \u0441\u0430\u043c\u044b\u043c \u043d\u0435\u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u044b\u043c \u0442\u0440\u0430\u0435\u043a\u0442\u043e\u0440\u0438\u044f\u043c (\u043d\u043e \u0432\u0430\u0436\u043d\u043e \u043d\u0435 \u043f\u0435\u0440\u0435\u0431\u043e\u0440\u0449\u0438\u0442\u044c, \u043f\u0443\u0441\u0442\u044b\u043d\u044f \u043d\u0430 \u0433\u0440\u0430\u043d\u0438\u0446\u0435 \u0441\u043d\u0435\u0433\u0430 \u0431\u0443\u0434\u0435\u0442 \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c\u0441\u044f \u0441\u0442\u0440\u0430\u043d\u043d\u043e). \u0412\u043f\u0440\u043e\u0447\u0435\u043c, \u043f\u0443\u0441\u0442\u044b\u043d\u0438 \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u0431\u0443\u0434\u0443\u0442 \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c\u0441\u044f \u0441\u0442\u0440\u0430\u043d\u043d\u043e, \u0442.\u043a. \u043e\u043d\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442\u0441\u044f \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0431\u043b\u0438\u0437\u043e\u0441\u0442\u044c\u044e \u043a \u044d\u043a\u0432\u0430\u0442\u043e\u0440\u0443, \u043d\u043e \u0438 \u0433\u043e\u0440\u0430\u043c\u0438, \u0432\u0435\u0442\u0440\u0430\u043c\u0438 \u0438 \u043f\u0440\u043e\u0447\u0438\u043c\u0438 \u0444\u0430\u043a\u0442\u043e\u0440\u0430\u043c\u0438. <\/p>\n<p>  <b>\u0420\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0441 \u0446\u0432\u0435\u0442\u043e\u043c<\/b><br \/>  \u0421\u0430\u043c\u0430\u044f \u0433\u0440\u043e\u043c\u043e\u0437\u0434\u043a\u0430\u044f \u0438 \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043a\u043e\u0434\u0430, \u043f\u0440\u0438\u0433\u043e\u0442\u043e\u0432\u044c\u0442\u0435\u0441\u044c.<br \/>  \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043c\u0430\u0441\u0441\u0438\u0432 \u0446\u0432\u0435\u0442\u043e\u0432 (\u0432 \u044e\u043d\u0438\u0442\u0438 \u0435\u0441\u0442\u044c \u043c\u0435\u0442\u043e\u0434, \u0431\u044b\u0441\u0442\u0440\u043e \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u0442\u0430\u043a\u043e\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \u0438 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u0435\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0432 \u043f\u0438\u043a\u0441\u0435\u043b\u0438 \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u044b, \u044d\u0442\u043e \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u0431\u044b\u0441\u0442\u0440\u0435\u0435, \u0447\u0435\u043c \u0432\u0441\u044f\u043a\u0438\u0435 SetPixel() \u0438 \u043f\u0440\u043e\u0447\u0438\u0435):<\/p>\n<pre><code class=\"cs\">public Texture2D tex; \/\/\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u0443, \u0432 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 public static Color[] colors = new Color[Heighmap_class.xsize * Heighmap_class.ysize];  float waterLevel = 0.2f; <\/code><\/pre>\n<p>  \u041a\u0441\u0442\u0430\u0442\u0438 \u0433\u043e\u0432\u043e\u0440\u044f, \u043a\u0430\u043a \u043f\u0438\u0441\u0430\u043b <a href=\"http:\/\/habrahabr.ru\/users\/denull\/\" class=\"user_link\">deNULL<\/a>, \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0432\u043e\u0437\u0432\u0435\u0441\u0442\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043a\u0430\u0440\u0442\u044b \u0432\u044b\u0441\u043e\u0442 \u0432 \u043a\u0432\u0430\u0434\u0440\u0430\u0442, \u044d\u0442\u043e \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0441\u0433\u043b\u0430\u0434\u0438\u0442 \u0435\u0435 \u0438 \u0441\u0434\u0435\u043b\u0430\u0435\u0442 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0445\u043e\u0436\u0435\u0439 \u043d\u0430 \u0440\u0435\u0430\u043b\u044c\u043d\u0443\u044e.<\/p>\n<pre><code class=\"cs\">void SqrHeighmap() {      for (int x = 0; x &lt; Heighmap_class.xsize; x++)          for (int y = 0; y &lt; Heighmap_class.ysize; y++)              Heighmap_class.heighmap[x, y] *= Heighmap_class.heighmap[x, y]; } <\/code><\/pre>\n<p>  \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043d\u0430 \u0433\u043e\u0442\u043e\u0432\u0443\u044e \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u0443 \u043d\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u044e \u0442\u0430\u043a\u043e\u0439 \u044d\u0444\u0444\u0435\u043a\u0442:<\/p>\n<pre><code class=\"cs\">void SmoothImg()     {         for (int i = 0; i &lt; Heighmap_class.xsize * Heighmap_class.ysize - 2; i++)         {             Color clr1 = colors[i];             Color clr2 = colors[i + 1];             colors[i] = (2 * clr1 + clr2) \/ 3;             colors[i + 1] = (clr1 + 2 * clr2) \/ 3;         }     } <\/code><\/pre>\n<p>  \u042d\u0444\u0444\u0435\u043a\u0442 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439, \u043d\u043e \u0438 \u043d\u0430 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0432\u0440\u043e\u0434\u0435 \u043d\u0435 \u043e\u0441\u043e\u0431\u043e \u0432\u043b\u0438\u044f\u0435\u0442.<br \/>  \u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u0438\u0448\u0435\u043c \u043c\u0435\u0442\u043e\u0434\u044b \u0434\u043b\u044f \u0437\u0430\u0434\u0430\u043d\u0438\u044f \u0446\u0432\u0435\u0442\u043e\u0432 \u0440\u0430\u0437\u043d\u044b\u043c \u0442\u0438\u043f\u0430\u043c \u043c\u0435\u0441\u0442\u043d\u043e\u0441\u0442\u0438:<\/p>\n<pre><code class=\"cs\">void SetSnow(int counter, float heigh)     {         if (heigh &lt; waterLevel + Random.Range(-0.04f, 0.04f))             colors[counter] = new Color(Random.Range(0.8f, 0.85f), Random.Range(0.8f, 0.85f), Random.Range(0.85f, 0.9f));         else         {             colors[counter].r = 0.005f \/ heigh + Random.Range(0.8f, 0.85f);             colors[counter].g = 0.005f \/ heigh + Random.Range(0.8f, 0.85f);             colors[counter].b = 0.01f \/ heigh + Random.Range(0.8f, 0.85f);         }     } <\/code><\/pre>\n<p>  \u0417\u0438\u043c\u0430 \u0431\u043b\u0438\u0437\u043a\u043e. \u0415\u0441\u043b\u0438 \u043f\u043e\u0434 \u0440\u0430\u0437\u0434\u0430\u0447\u0443 \u043f\u043e\u043f\u0430\u043b\u0430 \u0432\u043e\u0434\u0430, \u043f\u043e\u043a\u0440\u044b\u0442\u044c \u043e\u0434\u043d\u043e\u0440\u043e\u0434\u043d\u043e\u0439 \u043a\u043e\u0440\u043a\u043e\u0439 \u0441\u043d\u0435\u0433\u0430, \u0438\u043d\u0430\u0447\u0435 \u043f\u043e\u043a\u0440\u044b\u0442\u044c \u043a\u043e\u0440\u043a\u043e\u0439 \u0441\u043d\u0435\u0433\u0430 \u0441\u043e \u0441\u043b\u0430\u0431\u044b\u043c\u0438 \u043e\u0447\u0435\u0440\u0442\u0430\u043d\u0438\u044f\u043c\u0438 \u043c\u0430\u0442\u0435\u0440\u0438\u043a\u043e\u0432 \u0441 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u0437\u0430\u0442\u0435\u043c\u043d\u0435\u043d\u0438\u044f\u043c\u0438 \u0432 \u0440\u0430\u0439\u043e\u043d\u0435 \u0432\u043e\u0437\u0432\u044b\u0448\u0435\u043d\u043d\u043e\u0441\u0442\u0435\u0439.<\/p>\n<pre><code class=\"cs\">void SetOcean(int counter, float heigh)     {         colors[counter].r = heigh \/ 5;         colors[counter].g = heigh \/ 5;         colors[counter].b = 0.2f + heigh \/ 2 + Random.Range(-0.02f, 0.02f);     } <\/code><\/pre>\n<p>  \u041d\u0443 \u0442\u0443\u0442 \u0432\u0441\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u043e\u043a\u0435\u0430\u043d \u043e\u043d \u0438 \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u043b\u0430\u043d\u0435\u0442\u0430\u0445 \u043e\u043a\u0435\u0430\u043d.<\/p>\n<pre><code class=\"cs\">void SetGreen(int counter, float heigh)     {         colors[counter].g = 0.1f \/ heigh + 0.05f + Random.Range(-0.04f, 0.04f);         if (heigh &lt; waterLevel + 0.1f)             colors[counter].g -= (waterLevel + 0.1f - heigh);          if (colors[counter].g &gt; 0.5f)             colors[counter].g = 0.5f \/ heigh + 0.05f + Random.Range(-0.04f, 0.04f);          colors[counter].r = 0;         colors[counter].b = 0;     } <\/code><\/pre>\n<p>  \u041c\u0435\u043d\u044f\u0435\u043c \u0446\u0432\u0435\u0442 \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u043f\u0440\u043e\u043f\u043e\u0440\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e \u0432\u044b\u0441\u043e\u0442\u0435 \u2014 \u0447\u0435\u043c \u0432\u044b\u0448\u0435, \u0442\u0435\u043c \u0442\u0435\u043c\u043d\u0435\u0435. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043a\u0440\u0430\u044f \u043c\u0430\u0442\u0435\u0440\u0438\u043a\u043e\u0432 \u043d\u0435 \u0431\u044b\u043b\u0438 \u0437\u0430\u0441\u0432\u0435\u0447\u0435\u043d\u043d\u044b\u043c\u0438, \u0443 \u043a\u0440\u043e\u043c\u043a\u0438 \u0432\u043e\u0434\u044b \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0435\u043c \u0435\u0433\u043e \u043d\u0435\u043c\u043d\u043e\u0433\u043e.<\/p>\n<pre><code class=\"cs\">void SetDesert(int counter, float heigh)     {         colors[counter].r = Random.Range(0.6f, 0.75f) + heigh \/ 2 - 0.35f;         colors[counter].g = Random.Range(0.6f, 0.75f) + heigh \/ 2 - 0.35f;         colors[counter].b = Random.Range(0.2f, 0.3f) + heigh \/ 2 - 0.35f;     } <\/code><\/pre>\n<p>  \u0422\u0443\u0442 \u0432\u0441\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0438 \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u0442\u0438\u043f \u043c\u0435\u0441\u0442\u043d\u043e\u0441\u0442\u0438:<\/p>\n<pre><code class=\"cs\">void SetMountains(int counter, float heigh)     {         float rnd = Random.Range(-0.03f, 0.03f);         if (heigh &gt; 1.1f)             heigh = 1.1f + Random.Range(-0.05f, 0.05f);          colors[counter].r = heigh * heigh \/ 2 + rnd - 0.1f;         colors[counter].g = heigh * heigh \/ 2 + rnd - 0.1f;         colors[counter].b = heigh * heigh \/ 2 + rnd - 0.05f;     } <\/code><\/pre>\n<p>  \u0413\u043e\u0440\u044b, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0438\u0437\u0431\u0435\u0433\u0430\u0435\u043c \u0437\u0430\u0441\u0432\u0435\u0442\u0430 (\u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441, \u043f\u043e\u0447\u0435\u043c\u0443 \u0432\u043e\u043e\u0431\u0449\u0435 \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0431\u043e\u043b\u044c\u0448\u0435 1.0f, \u043d\u043e \u044e\u043d\u0438\u0442\u0438 \u0432\u0440\u043e\u0434\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u043f\u0440\u043e\u0442\u0438\u0432 \u043d\u0435 \u0438\u043c\u0435\u0435\u0442).<\/p>\n<p>  \u0418 \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u043c\u0438\u043d\u0438\u043c\u0443\u043c\u043e\u043c \u0438 \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c, \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u043d\u043e\u0441\u0442\u0438 \u0442\u043e\u0447\u043a\u0438 \u043f\u043e\u044f\u0441\u0443:<\/p>\n<pre><code class=\"cs\">bool ChechInRange(int value, int min, int max, int rand)     {         return ((value &gt; min + rand) && (value &lt; max + rand));     } <\/code><\/pre>\n<p>  \u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u0430\u043c\u043e\u0435 \u043c\u044f\u0441\u043e:<\/p>\n<pre><code class=\"cs\">void Awake()     {         Heighmap_class.Generate();         TemperatureCurves_class.Generate();         tex.Resize(Heighmap_class.xsize, Heighmap_class.ysize);         tex.Apply();          SqrHeighmap();          int counter = 0;         for (int y = 0; y &lt; Heighmap_class.ysize; y++)             for (int x = 0; x &lt; Heighmap_class.xsize; x++)             {                 float heigh = Heighmap_class.heighmap[x, y];                 if (heigh &lt; waterLevel)                     SetOcean(counter, heigh);                 else                 {                     if (ChechInRange(y, TemperatureCurves_class.southSnow[x], TemperatureCurves_class.northSnow[x], Random.Range(-10, 10)))                         if (ChechInRange(y, TemperatureCurves_class.southGreen[x], TemperatureCurves_class.northGreen[x], Random.Range(-10, 10)))                         {                             SetDesert(counter, heigh);                             if (heigh &lt; waterLevel + 0.1f + Random.Range(-0.05f, 0.05f))                                 SetGreen(counter, heigh);                         }                         else                             SetGreen(counter, heigh);                      if (heigh &gt; 0.82f + Random.Range(-0.05f, 0.05f))                         SetMountains(counter, heigh);                 }                 if ((y &lt; TemperatureCurves_class.southSnow[x] + Random.Range(-10, 10)) || (y &gt; TemperatureCurves_class.northSnow[x] + Random.Range(-10, 10)))                     SetSnow(counter, heigh);                  counter++;             }          SmoothImg();         tex.SetPixels(colors);         tex.Apply();     } <\/code><\/pre>\n<p>  \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0441\u043b\u043e\u0432\u0430\u043c\u0438:<br \/>  \u0413\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u043a\u0430\u0440\u0442\u0443 \u0432\u044b\u0441\u043e\u0442, \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u0433\u0440\u0430\u043d\u0438\u0446\u044b \u043f\u043e\u044f\u0441\u043e\u0432, \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u0443, \u0432\u043e\u0437\u0432\u043e\u0434\u0438\u043c \u0432 \u043a\u0432\u0430\u0434\u0440\u0430\u0442.<br \/>  \u0412 \u0446\u0438\u043a\u043b\u0435:<br \/>  \u0415\u0441\u043b\u0438 \u0432\u044b\u0441\u043e\u0442\u0430 \u043c\u0435\u043d\u044c\u0448\u0435 \u0443\u0440\u043e\u0432\u043d\u044f \u043e\u043a\u0435\u0430\u043d\u0430, \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043f\u0438\u043a\u0441\u0435\u043b\u044c \u043e\u043a\u0435\u0430\u043d\u043e\u043c.<br \/>  \u0412 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u043d\u0430 \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u043d\u043e\u0441\u0442\u044c \u0437\u0435\u043b\u0435\u043d\u043e\u0439 \u043f\u043e\u043b\u043e\u0441\u0435, \u0432\u043d\u0443\u0442\u0440\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0443\u0441\u0442\u044b\u043d\u0438, \u0435\u0441\u043b\u0438 \u0434\u0430, \u0442\u043e \u0434\u0435\u043b\u0430\u0435\u043c \u043f\u0443\u0441\u0442\u044b\u043d\u044e, \u0435\u0441\u043b\u0438 \u043d\u0435\u0442 \u2014 \u0442\u043e \u0437\u0435\u043b\u0435\u043d\u044c. <br \/>  \u041f\u043e\u0432\u0435\u0440\u0445 \u044d\u0442\u043e\u0433\u043e \u0432\u0441\u0435\u0433\u043e \u0441\u0442\u0430\u0432\u0438\u043c \u0433\u043e\u0440\u044b, \u0435\u0441\u043b\u0438 \u0432\u0434\u0440\u0443\u0433 \u0432\u044b\u0441\u043e\u0442\u0430 \u0441\u0442\u0430\u043b\u0430 \u0432\u044b\u0441\u043e\u043a\u043e\u0439.<br \/>  \u0418 \u0435\u0449\u0435 \u0432\u044b\u0448\u0435, \u0435\u0441\u043b\u0438 \u043f\u043e\u043f\u0430\u043b\u0438 \u0437\u0430 \u043f\u043e\u043b\u044f\u0440\u043d\u044b\u0439 \u043a\u0440\u0443\u0433, \u0442\u043e \u0437\u043e\u0432\u0435\u043c <s>\u0431\u0435\u043b\u044b\u0445 \u0445\u043e\u0434\u043e\u043a\u043e\u0432<\/s> \u0441\u043d\u0435\u0433.<br \/>  \u041d\u0443 \u0438 \u043f\u043e\u0441\u043b\u0435 \u0446\u0438\u043a\u043b\u0430 \u0441\u0433\u043b\u0430\u0436\u0438\u0432\u0430\u0435\u043c \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u0438 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0432 \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u0443. <\/p>\n<p>  \u0412\u043e\u0442 \u0442\u0430\u043a\u043e\u0439 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u0443 \u043c\u0435\u043d\u044f. \u0410 \u043a\u0430\u043a\u043e\u0439 \u0443 \u0432\u0430\u0441?<br \/>  <img decoding=\"async\" src=\"http:\/\/i.imgur.com\/Euky3cr.jpg\" alt=\"image\"\/><\/p>\n<p>  P.S. \u0418\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438:<br \/>  <a href=\"https:\/\/drive.google.com\/file\/d\/0By_SLVoA8ddOYnB6R0o2Z0dQeGs\/view?usp=sharing\">\u0414\u0435\u043c\u043a\u0430<\/a><br \/>  <a href=\"https:\/\/drive.google.com\/file\/d\/0By_SLVoA8ddOM2MxcTc3WUNQNnc\/view?usp=sharing\">\u041f\u0440\u043e\u0435\u043a\u0442 unity<\/a>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0422\u0435\u043a\u0441\u0442\u043e\u043c<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cs\">using UnityEngine; using System.Collections;  public class Heighmap_class {     public static int ysize = 1025, xsize = ysize * 2 - 1;     public static float[,] heighmap = new float[xsize, ysize];     public static float roughness = 2f;      \/\/\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0440\u0430\u0437\u043d\u0438\u0446\u0443 \u0432\u044b\u0441\u043e\u0442, \u0447\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435, \u0442\u0435\u043c \u0431\u043e\u043b\u0435\u0435 \u043d\u0435\u0440\u0430\u0432\u043d\u043e\u043c\u0435\u0440\u043d\u0430\u044f \u043a\u0430\u0440\u0442\u0430 \u0432\u044b\u0441\u043e\u0442      public static void Square(int lx, int ly, int rx, int ry)     {         int l = (rx - lx) \/ 2;          float a = heighmap[lx, ly];              \/\/  B--------C         float b = heighmap[lx, ry];              \/\/  |        |         float c = heighmap[rx, ry];              \/\/  |   ce   |         float d = heighmap[rx, ly];              \/\/  |        |                 int cex = lx + l;                        \/\/  A--------D         int cey = ly + l;          heighmap[cex, cey] = (a + b + c + d) \/ 4 + Random.Range(-l * 2 * roughness \/ ysize, l * 2 * roughness \/ ysize);     }      static bool lrflag = false;     public static void Diamond(int tgx, int tgy, int l)     {         float a, b, c, d;          if (tgy - l &gt;= 0)             a = heighmap[tgx, tgy - l];                        \/\/      C--------         else                                                   \/\/      |        |             a = heighmap[tgx, ysize - l];                      \/\/ B---t g----D  |                                                                \/\/      |        |                                                                \/\/      A--------         if (tgx - l &gt;= 0)             b = heighmap[tgx - l, tgy];         else             if (lrflag)                 b = heighmap[xsize - l, tgy];             else                 b = heighmap[ysize - l, tgy];           if (tgy + l &lt; ysize)             c = heighmap[tgx, tgy + l];         else             c = heighmap[tgx, l];          if (lrflag)             if (tgx + l &lt; xsize)                 d = heighmap[tgx + l, tgy];             else                 d = heighmap[l, tgy];         else             if (tgx + l &lt; ysize)                 d = heighmap[tgx + l, tgy];             else                 d = heighmap[l, tgy];          heighmap[tgx, tgy] = (a + b + c + d) \/ 4 + Random.Range(-l * 2 * roughness \/ ysize, l * 2 * roughness \/ ysize);     }      public static void DiamondSquare(int lx, int ly, int rx, int ry)     {         int l = (rx - lx) \/ 2;          Square(lx, ly, rx, ry);          Diamond(lx, ly + l, l);         Diamond(rx, ry - l, l);         Diamond(rx - l, ry, l);         Diamond(lx + l, ly, l);     }       public static void MidPointDisplacement(int lx, int ly, int rx, int ry)     {         int l = (rx - lx) \/ 2;         if (l &gt; 0)         {             float a = heighmap[lx, ly];              \/\/  B--------C             float b = heighmap[lx, ry];              \/\/  |        |             float c = heighmap[rx, ry];              \/\/  |   ce   |             float d = heighmap[rx, ly];              \/\/  |        |             \/\/  A--------D             int cex = lx + l;             int cey = ly + l;              heighmap[cex, cey] = (a + b + c + d) \/ 4 + Random.Range(-l * 2 * roughness \/ xsize, l * 2 * roughness \/ xsize);              heighmap[lx, cey] = (a + b) \/ 2 + Random.Range(-l * 2 * roughness \/ xsize, l * 2 * roughness \/ xsize);             heighmap[rx, cey] = (c + d) \/ 2 + Random.Range(-l * 2 * roughness \/ xsize, l * 2 * roughness \/ xsize);             heighmap[cex, ly] = (a + d) \/ 2 + Random.Range(-l * 2 * roughness \/ xsize, l * 2 * roughness \/ xsize);             heighmap[cex, ry] = (b + c) \/ 2 + Random.Range(-l * 2 * roughness \/ xsize, l * 2 * roughness \/ xsize);              MidPointDisplacement(lx, ly, cex, cey);             MidPointDisplacement(lx, ly + l, lx + l, ry);             MidPointDisplacement(cex, cey, rx, ry);             MidPointDisplacement(lx + l, ly, rx, cey);         }     }       public static void Generate()     {         heighmap[0, 0] = Random.Range(0.3f, 0.6f);         heighmap[0, ysize - 1] = Random.Range(0.3f, 0.6f);         heighmap[xsize - 1, ysize - 1] = Random.Range(0.3f, 0.6f);         heighmap[xsize - 1, 0] = Random.Range(0.3f, 0.6f);          heighmap[ysize - 1, ysize - 1] = Random.Range(0.3f, 0.6f);         heighmap[ysize - 1, 0] = Random.Range(0.3f, 0.6f);          for (int l = (ysize - 1) \/ 2; l &gt; 0; l \/= 2)             for (int x = 0; x &lt; xsize - 1; x += l)             {                 if (x &gt;= ysize - l)                     lrflag = true;                 else                     lrflag = false;                  for (int y = 0; y &lt; ysize - 1; y += l)                     DiamondSquare(x, y, x + l, y + l);             }     } } <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"cs\">using UnityEngine; using System.Collections;  public static class TemperatureCurves_class {     static int xsize = Heighmap_class.xsize;     public static int snowEdge = Heighmap_class.ysize \/ 10;     public static int greenEdge = Heighmap_class.ysize \/ 3;      public static int[] northGreen = new int[xsize];     public static int[] southGreen = new int[xsize];      public static int[] northSnow = new int[xsize];     public static int[] southSnow = new int[xsize];      static float snowRoughness = 0.03f;     static float greenRoughness = 0.15f;      static void MidPointDisplacement1D(ref int[] curve, int l, int r, float roughness)     {         if (r - l &gt; 1)         {             curve[(l + r) \/ 2] = (curve[l] + curve[r]) \/ 2 + (int)Random.Range(-(r - l) * roughness, (r - l) * roughness);             MidPointDisplacement1D(ref curve, l, (l + r) \/ 2, roughness);             MidPointDisplacement1D(ref curve, (l + r) \/ 2, r, roughness);         }     }      public static void Generate()     {         northSnow[0] = northSnow[xsize - 1] = Heighmap_class.ysize - snowEdge;         southSnow[0] = southSnow[xsize - 1] = snowEdge;          northGreen[0] = northGreen[xsize - 1] = Heighmap_class.ysize - greenEdge;         southGreen[0] = southGreen[xsize - 1] = greenEdge + Random.Range(-100, 100);                  MidPointDisplacement1D(ref northGreen, 0, xsize - 1, greenRoughness);         MidPointDisplacement1D(ref southGreen, 0, xsize - 1, greenRoughness);         MidPointDisplacement1D(ref northSnow, 0, xsize - 1, snowRoughness);         MidPointDisplacement1D(ref southSnow, 0, xsize - 1, snowRoughness);     }  } <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"cs\">using UnityEngine; using System.Collections;  public class Renderer_script : MonoBehaviour {     public Texture2D tex;     public static Color[] colors = new Color[Heighmap_class.xsize * Heighmap_class.ysize];      float waterLevel = 0.2f;      void SqrHeighmap()     {         for (int x = 0; x &lt; Heighmap_class.xsize; x++)             for (int y = 0; y &lt; Heighmap_class.ysize; y++)                 Heighmap_class.heighmap[x, y] *= Heighmap_class.heighmap[x, y];     }     void SetSnow(int counter, float heigh)     {         if (heigh &lt; waterLevel + Random.Range(-0.04f, 0.04f))             colors[counter] = new Color(Random.Range(0.8f, 0.85f), Random.Range(0.8f, 0.85f), Random.Range(0.85f, 0.9f));         else         {             colors[counter].r = 0.005f \/ heigh + Random.Range(0.8f, 0.85f);             colors[counter].g = 0.005f \/ heigh + Random.Range(0.8f, 0.85f);             colors[counter].b = 0.01f \/ heigh + Random.Range(0.8f, 0.85f);         }     }     void SetOcean(int counter, float heigh)     {         colors[counter].r = heigh \/ 5;         colors[counter].g = heigh \/ 5;         colors[counter].b = 0.2f + heigh \/ 2 + Random.Range(-0.02f, 0.02f);     }     void SetGreen(int counter, float heigh)     {         colors[counter].g = 0.1f \/ heigh + 0.05f + Random.Range(-0.04f, 0.04f);         if (heigh &lt; waterLevel + 0.1f)             colors[counter].g -= (waterLevel + 0.1f - heigh);          if (colors[counter].g &gt; 0.5f)             colors[counter].g = 0.5f \/ heigh + 0.05f + Random.Range(-0.04f, 0.04f);          colors[counter].r = 0;         colors[counter].b = 0;     }     void SetDesert(int counter, float heigh)     {         colors[counter].r = Random.Range(0.6f, 0.75f) + heigh \/ 2 - 0.35f;         colors[counter].g = Random.Range(0.6f, 0.75f) + heigh \/ 2 - 0.35f;         colors[counter].b = Random.Range(0.2f, 0.3f) + heigh \/ 2 - 0.35f;     }     void SetMountains(int counter, float heigh)     {         float rnd = Random.Range(-0.03f, 0.03f);         if (heigh &gt; 1.1f)             heigh = 1.1f + Random.Range(-0.05f, 0.05f);          colors[counter].r = heigh * heigh \/ 2 + rnd - 0.1f;         colors[counter].g = heigh * heigh \/ 2 + rnd - 0.1f;         colors[counter].b = heigh * heigh \/ 2 + rnd - 0.05f;     }      void SmoothImg()     {         for (int i = 0; i &lt; Heighmap_class.xsize * Heighmap_class.ysize - 2; i++)         {             Color clr1 = colors[i];             Color clr2 = colors[i + 1];             colors[i] = (2 * clr1 + clr2) \/ 3;             colors[i + 1] = (clr1 + 2 * clr2) \/ 3;         }     }      bool ChechInRange(int value, int min, int max, int rand)     {         return ((value &gt; min + rand) && (value &lt; max + rand));     }      void Awake()     {         Heighmap_class.Generate();         TemperatureCurves_class.Generate();         tex.Resize(Heighmap_class.xsize, Heighmap_class.ysize);         tex.Apply();          SqrHeighmap();          int counter = 0;         for (int y = 0; y &lt; Heighmap_class.ysize; y++)             for (int x = 0; x &lt; Heighmap_class.xsize; x++)             {                 float heigh = Heighmap_class.heighmap[x, y];                 if (heigh &lt; waterLevel)                     SetOcean(counter, heigh);                 else                 {                     if (ChechInRange(y, TemperatureCurves_class.southSnow[x], TemperatureCurves_class.northSnow[x], Random.Range(-10, 10)))                         if (ChechInRange(y, TemperatureCurves_class.southGreen[x], TemperatureCurves_class.northGreen[x], Random.Range(-10, 10)))                         {                             SetDesert(counter, heigh);                             if (heigh &lt; waterLevel + 0.1f + Random.Range(-0.05f, 0.05f))                                 SetGreen(counter, heigh);                         }                         else                             SetGreen(counter, heigh);                      if (heigh &gt; 0.82f + Random.Range(-0.05f, 0.05f))                         SetMountains(counter, heigh);                 }                 if ((y &lt; TemperatureCurves_class.southSnow[x] + Random.Range(-10, 10)) || (y &gt; TemperatureCurves_class.northSnow[x] + Random.Range(-10, 10)))                     SetSnow(counter, heigh);                  counter++;             }          SmoothImg();         tex.SetPixels(colors);         tex.Apply();     } }  <\/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\/post\/249027\/\"> http:\/\/habrahabr.ru\/post\/249027\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">     \t<img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/b8a\/b3f\/d27\/b8ab3fd276ab744744eca2a1cd8376ba.jpg\" alt=\"image\"\/><\/p>\n<p>  \u0414\u043e\u0431\u0440\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u0443\u0442\u043e\u043a. \u041a\u0430\u043a \u0441\u043e \u043c\u043d\u043e\u0439 \u0431\u044b\u0432\u0430\u0435\u0442, \u043a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u044f \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0441\u044f \u0432 \u043a\u0430\u043a\u043e\u043c-\u0442\u043e \u0441\u043b\u043e\u0436\u043d\u043e\u043c \u0434\u043b\u044f \u0441\u0435\u0431\u044f \u0432\u043e\u043f\u0440\u043e\u0441\u0435, \u044f \u0441\u0440\u0430\u0437\u0443 \u0445\u043e\u0447\u0443 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u0441\u0435\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0435\u0448\u0438\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0435\u0440\u0438\u044e \u0438\u0437 \u0434\u0432\u0443\u0445 \u0441\u0442\u0430\u0442\u0435\u0439 \u043f\u043e \u0442\u0430\u043a\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0439 \u0442\u0435\u043c\u0435, \u043a\u0430\u043a \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u043d\u0430\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f. \u0410 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0435\u0435, \u044f \u0431\u0443\u0434\u0443 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043f\u0440\u043e \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044e \u0442\u0435\u043a\u0441\u0442\u0443\u0440 \u043f\u043b\u0430\u043d\u0435\u0442. \u0412 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437 \u044f \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u043b\u0441\u044f \u043e\u0441\u043d\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u0435\u0435 \u0438 \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u0435\u0435, \u0447\u0435\u043c \u0432 \u043c\u043e\u0435\u043c \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u043f\u043e\u0441\u0442\u0435 <a href=\"http:\/\/habrahabr.ru\/post\/245219\/\">\u00ab\u041f\u0440\u043e\u0441\u0442\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0432 Unity\u00bb<\/a> (\u043a\u0441\u0442\u0430\u0442\u0438, \u0441\u043f\u0430\u0441\u0438\u0431\u043e \u0432\u0441\u0435\u043c \u0437\u0430 \u043e\u0442\u0432\u0435\u0442\u043d\u044b\u0435 \u043f\u043e\u0441\u0442\u044b). \u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c, \u0445\u043e\u0447\u0443 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u0430\u0448\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u043e\u043c\u0435\u043d\u0442\u043e\u0432:<\/p>\n<p>  1) \u042d\u0442\u043e\u0442 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u043d\u0435 \u043f\u0440\u0435\u0442\u0435\u043d\u0434\u0443\u0435\u0442 \u043d\u0430 \u0440\u0435\u0430\u043b\u0438\u0441\u0442\u0438\u0447\u043d\u043e\u0441\u0442\u044c, \u0438 \u043f\u0438\u0441\u0430\u043b \u044f \u0435\u0433\u043e \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u0442\u0435\u043a\u0441\u0442\u0443\u0440\u044b \u0434\u043b\u044f \u0441\u043e\u0442\u043d\u0438 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0445 \u0448\u0430\u0440\u0438\u043a\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0442 10% \u044d\u043a\u0440\u0430\u043d\u0430 \u0438 \u043a \u0442\u043e\u043c\u0443 \u0436\u0435 \u043f\u0440\u0438\u043a\u0440\u044b\u0442\u044b \u043e\u0431\u043b\u0430\u043a\u0430\u043c\u0438.<br \/>  2) \u041d\u043e \u044d\u0442\u043e \u043d\u0435 \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u044f \u043d\u0435 \u0431\u0443\u0434\u0443 \u0440\u0430\u0434 \u043a\u0440\u0438\u0442\u0438\u043a\u0435. \u041d\u0430\u043f\u0440\u043e\u0442\u0438\u0432, \u043e\u0434\u043d\u0430 \u0438\u0437 \u043f\u0440\u0438\u0447\u0438\u043d \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0441\u0442\u0430 \u2014 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043e\u0432\u0435\u0442\u044b \u043f\u043e \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430, \u044f \u0441 \u0440\u0430\u0434\u043e\u0441\u0442\u044c\u044e \u0443\u043b\u0443\u0447\u0448\u0443 \u0435\u0433\u043e. <br \/>  3) \u0427\u0438\u0441\u0442\u043e \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442: \u044f \u043f\u0438\u0448\u0443 \u043d\u0430 C# \u043f\u043e\u0434 Unity3d, \u0442\u0430\u043a \u0447\u0442\u043e \u0434\u0443\u043c\u0430\u0442\u044c \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u0432 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0441 \u043f\u0440\u0438\u0435\u043c\u043b\u0438\u043c\u043e\u0439 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u044e \u0432\u0430\u043c \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0441\u0430\u043c\u0438\u043c, \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u0438 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u0441\u0432\u043e\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u044b.<br \/>  \u0418\u0442\u0430\u043a, \u043f\u043b\u0430\u043d \u0442\u0430\u043a\u043e\u0432: \u0432 \u043f\u0435\u0440\u0432\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u044e \u043e \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u043d\u043e\u0439 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u043b\u0430\u043d\u0435\u0442 \u0442\u0438\u043f\u0430 \u00ab\u0442\u0435\u0440\u0440\u0430\u00bb, \u043f\u043e\u0442\u043e\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u044e \u0448\u043a\u0432\u0430\u043b \u043a\u0440\u0438\u0442\u0438\u043a\u0438, \u0440\u0430\u0434\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432\u0441\u0435 \u0438 \u0434\u0435\u043b\u0430\u043b\u043e\u0441\u044c, \u0443\u043b\u0443\u0447\u0448\u0430\u044e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c, \u0434\u043e\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e \u0434\u043b\u044f \u0434\u0440\u0443\u0433\u0438\u0445 \u0442\u0438\u043f\u043e\u0432 \u043f\u043b\u0430\u043d\u0435\u0442 \u0438 \u043f\u0438\u0448\u0443 \u0432\u0442\u043e\u0440\u0443\u044e \u0447\u0430\u0441\u0442\u044c.<\/p>\n<p>  \u0413\u043e\u0442\u043e\u0432\u044b? \u041f\u043e\u0435\u0445\u0430\u043b\u0438.  <\/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-249027","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/249027","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=249027"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/249027\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=249027"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=249027"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=249027"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}