{"id":475083,"date":"2025-09-15T11:44:58","date_gmt":"2025-09-15T11:44:58","guid":{"rendered":"https:\/\/savepearlharbor.com\/?p=475083"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"obyasnenie-zamoscheniya-mozaikoy-penrouza","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=475083","title":{"rendered":"\u041e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u0435 \u0437\u0430\u043c\u043e\u0449\u0435\u043d\u0438\u044f \u043c\u043e\u0437\u0430\u0438\u043a\u043e\u0439 \u041f\u0435\u043d\u0440\u043e\u0443\u0437\u0430"},"content":{"rendered":"<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/21f\/f11\/d99\/21ff11d99b23c2f8eac7e851fa6d0387.png\" width=\"1728\" height=\"1004\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/21f\/f11\/d99\/21ff11d99b23c2f8eac7e851fa6d0387.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/21f\/f11\/d99\/21ff11d99b23c2f8eac7e851fa6d0387.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<blockquote>\n<p>\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442! \u041f\u0440\u0438\u0432\u043e\u0436\u0443 \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/preshing.com\/20110831\/penrose-tiling-explained\/\" rel=\"noopener noreferrer nofollow\">Penrose Tiling Explained<\/a>. \u041c\u043d\u0435 \u0441\u0430\u043c\u043e\u043c\u0443 \u0431\u044b\u043b\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u043a\u0430\u043a \u0443\u0441\u0442\u0440\u043e\u0435\u043d \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u0440\u043e\u0440\u0438\u0441\u043e\u0432\u043a\u0438 \u043c\u043e\u0437\u0430\u0438\u043a\u0438. \u0423\u0434\u0438\u0432\u0438\u043b\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0435 \u0438 \u0445\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f.. \u041f\u043e\u043c\u0438\u043c\u043e \u043f\u043e\u0447\u0442\u0438 \u043d\u0435 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0430 \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u0441\u0432\u043e\u0439 \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0433\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u043d\u0430 \u044f\u0437\u044b\u043a TypeScript. \u041f\u0440\u0438\u0432\u043e\u0436\u0443 \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u043f\u0435\u0441\u043e\u0447\u043d\u0438\u0446\u0443 \u0432 \u043a\u043e\u043d\u0446\u0435 \u0441\u0442\u0430\u0442\u044c\u0438. \u0412\u0435\u0440\u0441\u0438\u044f TypeScript \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0430 \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u0444\u043e\u0440\u043c\u043e\u0439 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430. \u0418\u0433\u0440\u0430\u044f \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438, \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0434\u0430\u0436\u0435 \u0431\u0435\u0437 \u0447\u0442\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0412 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u043f\u043e\u0434\u043f\u0438\u0441\u0438 \u043f\u043e\u0434 \u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0430\u0446\u0438\u044f\u043c\u0438.<\/p>\n<\/blockquote>\n<details class=\"spoiler\">\n<summary>\u0421\u043f\u043e\u0439\u043b\u0435\u0442 \u0441 \u043e\u0433\u043e\u0432\u043e\u0440\u043a\u043e\u0439 \u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0425\u043e\u0447\u0443 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0432\u0432\u043e\u0434\u0438\u0442 \u0432 \u0437\u0430\u0431\u043b\u0443\u0436\u0434\u0435\u043d\u0438\u0435. \u0412 \u041f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0433\u043e \u0430\u0432\u0442\u043e\u0440\u043e\u043c \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442 \u0446\u0435\u043b\u044b\u0439 \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u044b\u0439 \u043f\u043e\u0437\u0430\u0438\u043a\u043e\u0439 \u041f\u0435\u043d\u0440\u043e\u0443\u0437\u0430 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u044f \u043e\u0449\u0443\u0449\u0435\u043d\u0438\u0435 \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0439 \u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u0438. \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0436\u0435 \u0434\u0435\u043b\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043c\u043e\u0437\u0430\u0438\u043a\u043e\u0439 \u043b\u0438\u0448\u044c \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 10-\u0442\u0438 \u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a \u0438 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442 \u043c\u0430\u0441\u0448\u0442\u0430\u0431 \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u043f\u043e\u043c\u0435\u0449\u0430\u043b\u0430\u0441\u044c \u0432\u043d\u0443\u0442\u0440\u0438 \u043d\u0435\u0433\u043e \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e.<\/p>\n<\/div>\n<\/details>\n<p>\u041d\u0430 \u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u043d\u0435\u0434\u0435\u043b\u0435 \u044f \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043b <a href=\"http:\/\/preshing.com\/20110822\/penrose-tiling-in-obfuscated-python\" rel=\"noopener noreferrer nofollow\">\u0437\u0430\u043f\u0443\u0442\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u043d\u0430 Python, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u043c\u043e\u0437\u0430\u0438\u043a\u0443<\/a> \u041f\u0435\u043d\u0440\u043e\u0443\u0437\u0430. \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u044f \u043e\u0431\u044a\u044f\u0441\u043d\u044e \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c, \u043b\u0435\u0436\u0430\u0449\u0438\u0439 \u0432 \u043e\u0441\u043d\u043e\u0432\u0435 \u044d\u0442\u043e\u0433\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u043d\u0430 Python, \u0438 \u043f\u043e\u0434\u0435\u043b\u044e\u0441\u044c \u0435\u0433\u043e \u043d\u0435 \u0437\u0430\u043f\u0443\u0442\u0430\u043d\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0435\u0439.<\/p>\n<p>\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441\u043e \u0441\u043f\u0438\u0441\u043a\u043e\u043c \u043a\u0440\u0430\u0441\u043d\u044b\u0445 \u0438 \u0441\u0438\u043d\u0438\u0445 \u0440\u0430\u0432\u043d\u043e\u0431\u0435\u0434\u0440\u0435\u043d\u043d\u044b\u0445 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u043e\u0432. \u0423 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043a\u0440\u0430\u0441\u043d\u043e\u0433\u043e \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430 \u0443\u0433\u043e\u043b \u043f\u0440\u0438 \u0432\u0435\u0440\u0448\u0438\u043d\u0435 \u0440\u0430\u0432\u0435\u043d 36\u00b0, \u0430 \u0443 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u0438\u043d\u0435\u0433\u043e \u2014 108\u00b0.<\/p>\n<figure class=\"bordered \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/0d4\/98b\/317\/0d498b317c3d33f29dd37485544f2875.png\" alt=\"\u0414\u0432\u0430 \u0442\u0438\u043f\u0430 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u043e\u0432 \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c.\" title=\"\u0414\u0432\u0430 \u0442\u0438\u043f\u0430 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u043e\u0432 \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c.\" width=\"345\" height=\"121\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/0d4\/98b\/317\/0d498b317c3d33f29dd37485544f2875.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/0d4\/98b\/317\/0d498b317c3d33f29dd37485544f2875.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0414\u0432\u0430 \u0442\u0438\u043f\u0430 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u043e\u0432 \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c.<\/figcaption><\/div>\n<\/figure>\n<p>\u0412 Python \u0442\u0430\u043a\u0438\u0435 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432 \u0432\u0438\u0434\u0435 \u043a\u043e\u0440\u0442\u0435\u0436\u0435\u0439 \u0432\u0438\u0434\u0430 <code>(color, A, B, C)<\/code>. \u041f\u0435\u0440\u0432\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442, <code>color<\/code>, \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 0 \u0434\u043b\u044f \u043a\u0440\u0430\u0441\u043d\u043e\u0433\u043e \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430 \u0438 1 \u0434\u043b\u044f \u0441\u0438\u043d\u0435\u0433\u043e. \u041e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043a\u043e\u0440\u0442\u0435\u0436\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0441\u043e\u0431\u043e\u0439 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0432\u0435\u0440\u0448\u0438\u043d <strong>A<\/strong>, <strong>B<\/strong> \u0438 <strong>C<\/strong>, \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u043d\u044b\u0435 \u0432 \u0432\u0438\u0434\u0435 <a href=\"http:\/\/docs.python.org\/library\/stdtypes.html#numeric-types-int-float-long-complex\" rel=\"noopener noreferrer nofollow\">\u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0441\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b<\/a>. \u041a\u043e\u043c\u043f\u043b\u0435\u043a\u0441\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430 \u0445\u043e\u0440\u043e\u0448\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0442 \u0434\u043b\u044f \u044d\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u043b\u044e\u0431\u0443\u044e \u0442\u043e\u0447\u043a\u0443 \u043d\u0430 \u0434\u0432\u0443\u043c\u0435\u0440\u043d\u043e\u0439 \u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u0438: \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0434\u0430\u0451\u0442 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0443 \u043f\u043e \u043e\u0441\u0438 X, \u0430 \u043c\u043d\u0438\u043c\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u2014 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0443 \u043f\u043e \u043e\u0441\u0438 Y.<\/p>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u0438\u0442\u0435, \u043c\u044b \u0440\u0438\u0441\u0443\u0435\u043c \u043a\u043e\u043d\u0442\u0443\u0440 \u043f\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u0430\u043c \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430, \u043d\u043e \u043d\u0435 \u043f\u043e \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u044e. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a \u0441 \u0434\u0440\u0443\u0433\u0438\u043c \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u043e\u043c \u0442\u043e\u0433\u043e \u0436\u0435 \u0446\u0432\u0435\u0442\u0430, \u043e\u0431\u0440\u0430\u0437\u0443\u044f <a href=\"http:\/\/en.wikipedia.org\/wiki\/Rhombus\" rel=\"noopener noreferrer nofollow\">\u0440\u043e\u043c\u0431\u043e\u0432\u0438\u0434\u043d\u044b\u0435<\/a> \u043f\u043b\u0438\u0442\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0438\u0434\u043d\u044b \u043d\u0430 \u0433\u043e\u0442\u043e\u0432\u043e\u0439 \u043c\u043e\u0437\u0430\u0438\u043a\u0435 \u041f\u0435\u043d\u0440\u043e\u0443\u0437\u0430.<\/p>\n<figure class=\"bordered \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/170\/7a6\/599\/1707a65996207707c3561dd335cf3818.png\" alt=\"\u0420\u043e\u043c\u0431\u043e\u0432\u0438\u0434\u043d\u044b\u0435 \u043f\u043b\u0438\u0442\u043a\u0438 \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0438\u0437 \u0434\u0432\u0443\u0445 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0445 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u043e\u0432 \u043f\u043e \u043e\u0431\u0449\u0435\u0439 \u0433\u0438\u043f\u043e\u0442\u0435\u043d\u0443\u0437\u0435.\" title=\"\u0420\u043e\u043c\u0431\u043e\u0432\u0438\u0434\u043d\u044b\u0435 \u043f\u043b\u0438\u0442\u043a\u0438 \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0438\u0437 \u0434\u0432\u0443\u0445 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0445 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u043e\u0432 \u043f\u043e \u043e\u0431\u0449\u0435\u0439 \u0433\u0438\u043f\u043e\u0442\u0435\u043d\u0443\u0437\u0435.\" width=\"130\" height=\"96\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/170\/7a6\/599\/1707a65996207707c3561dd335cf3818.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/170\/7a6\/599\/1707a65996207707c3561dd335cf3818.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0420\u043e\u043c\u0431\u043e\u0432\u0438\u0434\u043d\u044b\u0435 \u043f\u043b\u0438\u0442\u043a\u0438 \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0438\u0437 \u0434\u0432\u0443\u0445 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0445 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u043e\u0432 \u043f\u043e \u043e\u0431\u0449\u0435\u0439 \u0433\u0438\u043f\u043e\u0442\u0435\u043d\u0443\u0437\u0435.<\/figcaption><\/div>\n<\/figure>\n<p>\u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u0430\u043c\u043e\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435. \u0418\u043c\u0435\u044f \u0441\u043f\u0438\u0441\u043e\u043a \u0442\u0430\u043a\u0438\u0445 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u043e\u0432, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 \u043d\u0438\u0445, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u0441\u043f\u0438\u0441\u043e\u043a \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u043e\u0432. \u041a\u0440\u0430\u0441\u043d\u044b\u0439 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a \u0434\u0435\u043b\u0438\u0442\u0441\u044f \u043d\u0430 \u0434\u0432\u0430 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430 \u043c\u0435\u043d\u044c\u0448\u0435\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<figure class=\"bordered \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f7b\/c7a\/cd4\/f7bc7acd4f9dd1ee62b754dad737d382.png\" alt=\"\u0421\u043f\u043e\u0441\u043e\u0431 \u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043a\u0440\u0430\u0441\u043d\u044b\u0445 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u043e\u0432.\" title=\"\u0421\u043f\u043e\u0441\u043e\u0431 \u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043a\u0440\u0430\u0441\u043d\u044b\u0445 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u043e\u0432.\" width=\"234\" height=\"121\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/f7b\/c7a\/cd4\/f7bc7acd4f9dd1ee62b754dad737d382.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f7b\/c7a\/cd4\/f7bc7acd4f9dd1ee62b754dad737d382.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0421\u043f\u043e\u0441\u043e\u0431 \u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043a\u0440\u0430\u0441\u043d\u044b\u0445 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u043e\u0432.<\/figcaption><\/div>\n<\/figure>\n<p>\u0412 \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d\u043d\u043e\u043c \u0432\u044b\u0448\u0435 \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u0438 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u043e\u0432\u0430\u044f \u0432\u0435\u0440\u0448\u0438\u043d\u0430 P, \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043d\u0430\u044f \u0432 \u0442\u043e\u0447\u043a\u0435 \u043d\u0430 \u0440\u0435\u0431\u0440\u0435 AB, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 <a href=\"http:\/\/en.wikipedia.org\/wiki\/Golden_ratio\" rel=\"noopener noreferrer nofollow\">\u0437\u043e\u043b\u043e\u0442\u043e\u043c\u0443 \u0441\u0435\u0447\u0435\u043d\u0438\u044e<\/a> <img decoding=\"async\" class=\"formula inline\" source=\"1+5\u221a2\" alt=\"1+5\u221a2\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f21\/59c\/0b6\/f2159c0b6232931c406b417d8199609a.svg\" width=\"70\" height=\"22\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f21\/59c\/0b6\/f2159c0b6232931c406b417d8199609a.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f21\/59c\/0b6\/f2159c0b6232931c406b417d8199609a.svg 781w\" loading=\"lazy\" decode=\"async\"\/>.<\/p>\n<p>\u0422\u043e\u0447\u043d\u043e \u0442\u0430\u043a \u0436\u0435 \u043a\u0430\u0436\u0434\u044b\u0439 \u0441\u0438\u043d\u0438\u0439 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a \u0434\u0435\u043b\u0438\u0442\u0441\u044f \u043d\u0430 \u0442\u0440\u0438 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430 \u043f\u043e\u043c\u0435\u043d\u044c\u0448\u0435:<\/p>\n<figure class=\"bordered \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/79a\/d90\/059\/79ad90059c344080ac821c11f540119d.png\" alt=\"\u0421\u043f\u043e\u0441\u043e\u0431 \u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0441\u0438\u043d\u0438\u0445 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u043e\u0432.\" title=\"\u0421\u043f\u043e\u0441\u043e\u0431 \u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0441\u0438\u043d\u0438\u0445 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u043e\u0432.\" width=\"405\" height=\"95\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/79a\/d90\/059\/79ad90059c344080ac821c11f540119d.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/79a\/d90\/059\/79ad90059c344080ac821c11f540119d.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0421\u043f\u043e\u0441\u043e\u0431 \u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0441\u0438\u043d\u0438\u0445 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u043e\u0432.<\/figcaption><\/div>\n<\/figure>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u044d\u0442\u043e\u0433\u043e \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u044f \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0434\u0432\u0435 \u043d\u043e\u0432\u044b\u0435 \u0432\u0435\u0440\u0448\u0438\u043d\u044b: <strong>Q<\/strong> \u043d\u0430 \u0440\u0435\u0431\u0440\u0435 <strong>BA<\/strong> \u0438 <strong>R<\/strong> \u043d\u0430 \u0440\u0435\u0431\u0440\u0435 <strong>BC<\/strong> \u0432 \u0442\u043e\u0447\u043a\u0430\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0442\u0430\u043a\u0436\u0435 \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u044f\u044e\u0442 \u0437\u043e\u043b\u043e\u0442\u043e\u043c\u0443 \u0441\u0435\u0447\u0435\u043d\u0438\u044e. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0434\u0432\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0438\u0445\u0441\u044f \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f <em>\u0437\u0435\u0440\u043a\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043e\u0442\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u043c\u0438 \u0434\u0440\u0443\u0433 \u0434\u0440\u0443\u0433\u0430<\/em>. \u042f \u0432\u044b\u0434\u0435\u043b\u0438\u043b \u0443\u0433\u043b\u044b \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430, \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u043b\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u043a\u0430\u043a\u0438\u0435 \u0438\u0437 \u043d\u0438\u0445 \u0437\u0435\u0440\u043a\u0430\u043b\u044c\u043d\u044b\u0435, \u0430 \u043a\u0430\u043a\u0438\u0435 \u043d\u0435\u0442.<\/p>\n<p>\u0412\u0441\u0435 \u0432\u044b\u0448\u0435\u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u0441\u0435\u0433\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0441\u0442\u0440\u043e\u043a \u043a\u043e\u0434\u0430 \u043d\u0430 Python. \u042d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u043e\u0432, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u0432 \u0432\u0438\u0434\u0435 \u043a\u043e\u0440\u0442\u0435\u0436\u0435\u0439, \u0434\u0435\u043b\u0438\u0442 \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 \u043d\u0438\u0445 \u043d\u0430 \u0447\u0430\u0441\u0442\u0438 \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043d\u043e\u0432\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u043e\u0432:<\/p>\n<pre><code class=\"python\">goldenRatio = (1 + math.sqrt(5)) \/ 2def subdivide(triangles):    result = []    for color, A, B, C in triangles:        if color == 0:            # Subdivide red triangle            P = A + (B - A) \/ goldenRatio            result += [(0, C, P, B), (1, P, C, A)]        else:            # Subdivide blue triangle            Q = B + (A - B) \/ goldenRatio            R = B + (C - B) \/ goldenRatio            result += [(1, R, C, A), (1, Q, R, B), (0, R, Q, A)]    return result<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:87px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<details class=\"spoiler\">\n<summary>\u0412\u0430\u0440\u0438\u0430\u043d\u0442 \u043a\u043e\u0434\u0430 \u043d\u0430 TypeScript<\/summary>\n<div class=\"spoiler__content\">\n<p>\u042d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u044b\u0439 \u043a\u043e\u0434 \u043d\u0430 TypeScript \u0434\u043b\u044f \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430 \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:<\/p>\n<pre><code class=\"typescript\">const goldenRatio = (1 + Math.sqrt(5)) \/ 2;\/\/ \u0420\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0441\u043d\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u043f\u043e \u043f\u043e \u0444\u043e\u0440\u043c\u0443\u043b\u0435:\/\/ A + (B - A) \/ goldenRatio\/\/ \u0413\u0434\u0435 \u043f\u0435\u0440\u0432\u044b\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043b\u0430\u0433\u0430\u0435\u043c\u043e\u0435 \u0441 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0435\u0439 \u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0438\u0437-\u0437\u0430\/\/ \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u0430 \u043d\u0430\u0434 \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c. \u0410 \u0442\u0430\u043a \u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432\u044b\u0437\u043e\u0432 clone(),\/\/ \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043a\u0430\u0436\u0434\u0430\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432 this.const subdividePoint = (A: Complex2, B: Complex2): Complex2 =&gt;  B.clone().sub(A).divScalar(goldenRatio).add(A);export function subdivide(triangles: Vertexes): Vertexes {  const result: Vertexes = [];  for (const [color, A, B, C] of triangles) {    if (color === VertexColor.Red) {      \/\/ Subdivide red triangle      const P = subdividePoint(A, B);      result.push([VertexColor.Red, C, P, B], [VertexColor.Blue, P, C, A]);    } else {      \/\/ Subdivide blue triangle      const Q = subdividePoint(B, A);      const R = subdividePoint(B, C);      result.push(        [VertexColor.Blue, R, C, A],        [VertexColor.Blue, Q, R, B],        [VertexColor.Red, R, Q, A]      );    }  }  return result;}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>TypeScript \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0442\u0438\u043f\u044b:<\/p>\n<pre><code class=\"typescript\">\/\/ \u0414\u043b\u044f \u043c\u0430\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0447\u0438\u0441\u0435\u043b 0 \u0438 1 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u044e\u0449\u0438\u0445 \u0442\u0438\u043f \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u043d\u0438\u043a\u0430 \u043f\u0440\u043e\u0441\u0442\u043e\/\/ \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0442\u0438\u043f.enum VertexColor {  Red = 0,  Blue,}\/\/ \u0412 TypeScript \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043a\u043e\u0440\u0442\u0435\u0436\u0438 \u0447\u0435\u0440\u0435\u0437 \u043c\u0430\u0441\u0441\u0438\u0432\u044b.type Vertex = [  Color: VertexColor,  A: Complex2,  B: Complex2,  C: Complex2];type Vertexes = Vertex[];<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>\u041f\u0440\u043e\u0441\u0442\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0441\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u0434\u043b\u044f \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430 \u043d\u0430 TypeScript<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0412 JavaScript\/TypeScript \u043d\u0435\u0442 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0441\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b. \u041f\u0440\u0438\u0432\u043e\u0436\u0443 \u0441\u0432\u043e\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043b\u0435\u0433\u043a\u043e\u0432\u0435\u0441\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0434\u043b\u044f \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0438 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430:<\/p>\n<pre><code class=\"typescript\">export class Complex2 {  constructor(public real: number, public imag: number) {}  clone() {    return new Complex2(this.real, this.imag);  }  \/\/ \u041f\u0440\u044f\u043c\u043e\u0439 \u0430\u043d\u0430\u043b\u043e\u0433 Python \u0444\u0443\u043d\u043a\u0446\u0438\u0438 cmath.rect()  static fromPolar(r: number, phi: number): Complex2 {    return new Complex2(r * Math.cos(phi), r * Math.sin(phi));  }  static zero(): Complex2 {    return new Complex2(0, 0);  }  add(x: Complex2): Complex2 {    this.real += x.real;    this.imag += x.imag;    return this;  }  sub(x: Complex2): Complex2 {    this.real -= x.real;    this.imag -= x.imag;    return this;  }  mulScalar(x: number): Complex2 {    this.real *= x;    this.imag *= x;    return this;  }  divScalar(x: number): Complex2 {    this.real \/= x;    this.imag \/= x;    return this;  }  abs(): number {    return Math.sqrt(this.real ** 2 + this.imag ** 2);  }}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<\/div>\n<\/details>\n<p>\u0410 \u0432\u043e\u0442 \u043a\u043e\u0434 \u0434\u043b\u044f \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0441\u043f\u0438\u0441\u043a\u0430 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u043e\u0432. \u041e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 <a href=\"http:\/\/cairographics.org\/pycairo\/\" rel=\"noopener noreferrer nofollow\">pycairo<\/a> \u2014 \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0443 Python \u0434\u043b\u044f \u043f\u0440\u0435\u0432\u043e\u0441\u0445\u043e\u0434\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0440\u0438\u0441\u043e\u0432\u0430\u043d\u0438\u044f cairo.<\/p>\n<pre><code class=\"python\"># Draw red trianglesfor color, A, B, C in triangles:    if color == 0:        cr.move_to(A.real, A.imag)        cr.line_to(B.real, B.imag)        cr.line_to(C.real, C.imag)        cr.close_path()cr.set_source_rgb(1.0, 0.35, 0.35)cr.fill()    # Draw blue trianglesfor color, A, B, C in triangles:    if color == 1:        cr.move_to(A.real, A.imag)        cr.line_to(B.real, B.imag)        cr.line_to(C.real, C.imag)        cr.close_path()cr.set_source_rgb(0.4, 0.4, 1.0)cr.fill()# Determine line width from size of first trianglecolor, A, B, C = triangles[0]cr.set_line_width(abs(B - A) \/ 10.0)cr.set_line_join(cairo.LINE_JOIN_ROUND)# Draw outlinesfor color, A, B, C in triangles:    cr.move_to(C.real, C.imag)    cr.line_to(A.real, A.imag)    cr.line_to(B.real, B.imag)cr.set_source_rgb(0.2, 0.2, 0.2)cr.stroke()<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<details class=\"spoiler\">\n<summary>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043d\u0430 TypeScript\/JavaScript<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u0434\u043b\u044f \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430 \u0441\u0440\u0435\u0434\u0438 API \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0435\u0441\u0442\u044c <a href=\"https:\/\/developer.mozilla.org\/ru\/docs\/Web\/API\/Canvas_API\" rel=\"noopener noreferrer nofollow\">Canvas API<\/a>. \u041a\u0440\u0430\u0442\u043a\u043e &#8212; Canvas API \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u0442 cairo. \u041c\u0435\u0441\u0442\u0430\u043c\u0438 cairo API \u0438 Canvas API \u043f\u043e\u0447\u0442\u0438 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0435.<\/p>\n<pre><code class=\"typescript\">const ctx = canvas.getContext(\"2d\")!;ctx.clearRect(0, 0, canvas.width, canvas.height);ctx.save();ctx.translate(canvas.width \/ 2.0, canvas.height \/ 2.0);ctx.scale(options.wheelRadius, options.wheelRadius);\/\/ Draw red trianglesctx.fillStyle = \"rgb(255, 89, 89)\";for (const [color, A, B, C] of triangles) {  if (color == VertexColor.Red) {    ctx.beginPath();    ctx.moveTo(A.real, A.imag);    ctx.lineTo(B.real, B.imag);    ctx.lineTo(C.real, C.imag);    ctx.fill();  }}\/\/ Draw blue trianglesctx.fillStyle = \"rgb(102, 102, 255)\";for (const [color, A, B, C] of triangles) {  if (color == VertexColor.Blue) {    ctx.beginPath();    ctx.moveTo(A.real, A.imag);    ctx.lineTo(B.real, B.imag);    ctx.lineTo(C.real, C.imag);    ctx.fill();  }}\/\/ Determine line width from size of first triangleconst [color, A, B, C] = triangles[0];ctx.lineWidth = B.clone().sub(A).abs() \/ 10.0;ctx.lineJoin = \"round\";\/\/ Draw outlinesctx.fillStyle = \"rgb(51, 51, 51)\";for (const [color, A, B, C] of triangles) {  ctx.beginPath();  ctx.moveTo(C.real, C.imag);  ctx.lineTo(A.real, A.imag);  ctx.lineTo(B.real, B.imag);  ctx.stroke();}ctx.restore();<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<\/div>\n<\/details>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0432\u0435\u0441\u044c \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d\u043d\u044b\u0439 \u0432\u044b\u0448\u0435 \u043a\u043e\u0434, \u043c\u044b \u043c\u043e\u0436\u0435\u043c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0430\u0447\u0430\u0442\u044c \u0441 \u043e\u0434\u043d\u043e\u0433\u043e \u043a\u0440\u0430\u0441\u043d\u043e\u0433\u043e \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430, \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u0435\u0433\u043e \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0447\u0430\u0441\u0442\u0435\u0439 \u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u043e\u0441\u043b\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0434\u0435\u043b\u0435\u043d\u0438\u044f. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u043a\u0430\u043a \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0443\u0437\u043e\u0440 \u043c\u043e\u0437\u0430\u0438\u043a\u0438:<\/p>\n<figure class=\"bordered \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ec1\/fe1\/f79\/ec1fe1f79b18892ae7a7d69b9eb24bc8.png\" alt=\"\u0418\u043b\u043b\u044e\u0441\u0442\u0440\u0430\u0446\u0438\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 subdivide().\" title=\"\u0418\u043b\u043b\u044e\u0441\u0442\u0440\u0430\u0446\u0438\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 subdivide().\" width=\"504\" height=\"102\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/ec1\/fe1\/f79\/ec1fe1f79b18892ae7a7d69b9eb24bc8.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ec1\/fe1\/f79\/ec1fe1f79b18892ae7a7d69b9eb24bc8.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u0418\u043b\u043b\u044e\u0441\u0442\u0440\u0430\u0446\u0438\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 subdivide().<\/figcaption><\/div>\n<\/figure>\n<p>\u0412\u044b \u0434\u0430\u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0447\u0430\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0441 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0441\u043f\u0438\u0441\u043a\u0430 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u043e\u0432. \u0412\u043e\u0442 \u043a\u043e\u0434 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u00ab\u043a\u043e\u043b\u0435\u0441\u0430\u00bb, \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0435\u0433\u043e \u0438\u0437 10 \u043a\u0440\u0430\u0441\u043d\u044b\u0445 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u043e\u0432:<\/p>\n<pre><code class=\"python\"># Create wheel of red triangles around the origintriangles = []for i in xrange(10):    B = cmath.rect(1, (2*i - 1) * math.pi \/ 10)    C = cmath.rect(1, (2*i + 1) * math.pi \/ 10)    if i % 2 == 0:        B, C = C, B  # Make sure to mirror every second triangle    triangles.append((0, 0j, B, C))<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<details class=\"spoiler\">\n<summary>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435 \u043e cmath.rect()<\/summary>\n<div class=\"spoiler__content\">\n<p>\u0417\u0434\u0435\u0441\u044c <code>cmath.rect()<\/code> &#8212; \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0444\u043e\u0440\u043c\u0430 \u0437\u0430\u0434\u0430\u043d\u0438\u044f \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0441\u043d\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u0432 \u043f\u043e\u043b\u044f\u0440\u043d\u044b\u0445 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0430\u0445.<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>\u0412\u0430\u0440\u0438\u0430\u043d\u0442 \u043a\u043e\u0434\u0430 \u043d\u0430 TypeScript<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"typescript\">\/\/ Create wheel of red triangles around the originlet triangles: Vertexes = [];for (let i = 0; i &lt; 10; ++i) {  let B = Complex2.fromPolar(1, ((2 * i - 1) * Math.PI) \/ 10);  let C = Complex2.fromPolar(1, ((2 * i + 1) * Math.PI) \/ 10);  if (i % 2 === 0) {    \/\/ Make sure to mirror every second triangle}    const Z = B;    B = C;    C = Z;  }  triangles.push([VertexColor.Red, Complex2.zero(), B, C]);}<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<\/div>\n<\/details>\n<p>\u0415\u0441\u043b\u0438 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043c\u043d\u043e\u0433\u043e\u043a\u0440\u0430\u0442\u043d\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0442\u044c \u044d\u0442\u0443 \u0444\u043e\u0440\u043c\u0443 \u043a\u043e\u043b\u0435\u0441\u0430, \u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043c\u043e\u0437\u0430\u0438\u043a. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u043a\u0430\u0436\u0434\u0430\u044f \u043c\u043e\u0437\u0430\u0438\u043a\u0430 \u043e\u0431\u043b\u0430\u0434\u0430\u0435\u0442 \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u0441\u0442\u0435\u043f\u0435\u043d\u044c\u044e \u0441\u0438\u043c\u043c\u0435\u0442\u0440\u0438\u0438 \u2014 \u043a\u0430\u043a \u0437\u0435\u0440\u043a\u0430\u043b\u044c\u043d\u043e\u0439, \u0442\u0430\u043a \u0438 \u0432\u0440\u0430\u0449\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0432\u043e\u043a\u0440\u0443\u0433 \u043f\u044f\u0442\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043e\u0441\u0435\u0439.<\/p>\n<figure class=\"bordered full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/846\/f10\/226\/846f102267e26037b7afe2617a447201.png\" alt=\"\u041f\u0440\u0438 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0438 \u0447\u0438\u0441\u043b\u0430 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439 \u0447\u0430\u0441\u0442\u044c \u043c\u043e\u0437\u0430\u0438\u043a\u0438 \u043d\u0430 \u0440\u0430\u043d\u043d\u0438\u0445 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u044f\u0445 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u0442\u0441\u044f \u043d\u0430 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0437\u0434\u043d\u0438\u0445.\" title=\"\u041f\u0440\u0438 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0438 \u0447\u0438\u0441\u043b\u0430 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439 \u0447\u0430\u0441\u0442\u044c \u043c\u043e\u0437\u0430\u0438\u043a\u0438 \u043d\u0430 \u0440\u0430\u043d\u043d\u0438\u0445 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u044f\u0445 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u0442\u0441\u044f \u043d\u0430 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0437\u0434\u043d\u0438\u0445.\" width=\"519\" height=\"334\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/846\/f10\/226\/846f102267e26037b7afe2617a447201.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/846\/f10\/226\/846f102267e26037b7afe2617a447201.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u041f\u0440\u0438 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0438 \u0447\u0438\u0441\u043b\u0430 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439 \u0447\u0430\u0441\u0442\u044c \u043c\u043e\u0437\u0430\u0438\u043a\u0438 \u043d\u0430 \u0440\u0430\u043d\u043d\u0438\u0445 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u044f\u0445 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u0442\u0441\u044f \u043d\u0430 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0437\u0434\u043d\u0438\u0445.<\/figcaption><\/div>\n<\/figure>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u0437\u0443\u0447\u0438\u0442\u0435 \u0432\u0435\u0440\u0445\u043d\u0438\u0439 \u0438\u043b\u0438 \u043d\u0438\u0436\u043d\u0438\u0439 \u0440\u044f\u0434 \u044d\u0442\u043e\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u0442\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u0435, \u0447\u0442\u043e \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u043f\u043b\u0438\u0442\u043a\u0438, \u043a\u0440\u043e\u043c\u0435 \u043f\u0435\u0440\u0432\u043e\u0439, \u0432 \u043f\u043b\u0438\u0442\u043a\u0435 \u0441\u043f\u0440\u0430\u0432\u0430 \u0435\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0432\u0451\u0440\u043d\u0443\u0442\u0430\u044f \u043a\u043e\u043f\u0438\u044f. \u042f \u043d\u0430\u0440\u0438\u0441\u043e\u0432\u0430\u043b \u0436\u0451\u043b\u0442\u044b\u0435 \u043a\u043e\u043d\u0442\u0443\u0440\u044b, \u0447\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u0431\u044b\u043b\u043e \u0437\u0430\u043c\u0435\u0442\u043d\u0435\u0435. \u041c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u044d\u0442\u043e \u0438 \u0441 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b: \u0435\u0441\u043b\u0438 \u0432\u0437\u044f\u0442\u044c \u043b\u044e\u0431\u0443\u044e \u0438\u0437 \u044d\u0442\u0438\u0445 \u043c\u043e\u0437\u0430\u0435\u043a, \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u0435\u0435 \u0434\u0432\u0430\u0436\u0434\u044b, \u043f\u0435\u0440\u0435\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043f\u043e \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u0438 \u0438 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c, \u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f, \u0447\u0442\u043e \u0432\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 <em>\u0435\u0449\u0451 \u043e\u0434\u043d\u043e \u043a\u043e\u043b\u044c\u0446\u043e<\/em> \u0432\u043e\u043a\u0440\u0443\u0433 \u043c\u043e\u0437\u0430\u0438\u043a\u0438. \u041f\u043e\u0432\u0442\u043e\u0440\u044f\u044f \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u043a\u0430\u043a \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u043e\u0437\u0430\u0438\u043a\u0438 \u041f\u0435\u043d\u0440\u043e\u0443\u0437\u0430 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0432\u0441\u044e \u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u044c.<\/p>\n<p>\u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u0432\u043e\u0442 \u043d\u0435 \u0437\u0430\u043f\u0443\u0442\u0430\u043d\u043d\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u043d\u0430 Python, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0435\u0442 \u0432\u0441\u0451 \u0432\u043e\u0435\u0434\u0438\u043d\u043e: \u0441\u043a\u0430\u0447\u0430\u0439\u0442\u0435 <a href=\"http:\/\/penrose.py\" rel=\"noopener noreferrer nofollow\">penrose.py<\/a>. \u041e\u043d \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0441 \u0443\u0437\u043e\u0440\u0430 \u0432 \u0432\u0438\u0434\u0435 \u043a\u043e\u043b\u0435\u0441\u0430, \u0434\u0435\u043b\u0438\u0442 \u0435\u0433\u043e \u043d\u0430 10 \u0447\u0430\u0441\u0442\u0435\u0439 \u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u043d\u044b\u0439 \u0438 \u043e\u0431\u0440\u0435\u0437\u0430\u043d\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432 \u0432\u0438\u0434\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c 1000&#215;1000.<\/p>\n<details class=\"spoiler\">\n<summary>\u041f\u043e\u043b\u043d\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f TypeScript<\/summary>\n<div class=\"spoiler__content\">\n<p>\u041f\u043e\u043b\u043d\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c \u0432 \u043f\u0435\u0441\u043e\u0447\u043d\u0438\u0446\u0435 <a href=\"https:\/\/codesandbox.io\/p\/sandbox\/yn8cm5\" rel=\"noopener noreferrer nofollow\">codesandbox<\/a>. \u0418\u043b\u0438 \u043c\u043e\u0436\u043d\u043e \u0441\u0440\u0430\u0437\u0443 \u043e\u0442\u043a\u0440\u044b\u0442\u044c <a href=\"https:\/\/yn8cm5.csb.app\/\" rel=\"noopener noreferrer nofollow\">web \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435<\/a>.<\/p>\n<p>\u0414\u0430\u043d\u043d\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441\u0434\u0435\u043b\u0430\u043d\u0430 \u043d\u0430 TypeScript \u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0430 HTML \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u0432\u0432\u043e\u0434\u0430 \u0434\u043b\u044f \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u043e\u0442\u0437\u044b\u0432\u0447\u0438\u0432\u043e\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0441 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c React. \u0422\u0430\u043a \u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u044b \u0442\u0438\u043f\u044b TypeScript \u0438 \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0441\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b. \u0414\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b \u0447\u0442\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430 \u043c\u043e\u0433\u0443 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0447\u0442\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u0440\u043e\u0440\u0438\u0441\u043e\u0432\u043a\u0438 \u043c\u043e\u0437\u0430\u0438\u043a\u0438 \u0438\u0437 \u0441\u0442\u0430\u0442\u044c\u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0444\u0430\u0439\u043b\u0435 <code>src\/PenroseTiles.ts<\/code> &#8212; \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u043a\u0430\u043a \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435.<\/p>\n<\/div>\n<\/details>\n<\/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=\"https:\/\/habr.com\/ru\/articles\/947046\/\">https:\/\/habr.com\/ru\/articles\/947046\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442! \u041f\u0440\u0438\u0432\u043e\u0436\u0443 \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u0441\u0442\u0430\u0442\u044c\u0438 Penrose Tiling Explained. \u041c\u043d\u0435 \u0441\u0430\u043c\u043e\u043c\u0443 \u0431\u044b\u043b\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u043a\u0430\u043a \u0443\u0441\u0442\u0440\u043e\u0435\u043d \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u0440\u043e\u0440\u0438\u0441\u043e\u0432\u043a\u0438 \u043c\u043e\u0437\u0430\u0438\u043a\u0438. \u0423\u0434\u0438\u0432\u0438\u043b\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0435 \u0438 \u0445\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f.. \u041f\u043e\u043c\u0438\u043c\u043e \u043f\u043e\u0447\u0442\u0438 \u043d\u0435 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0430 \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u0441\u0432\u043e\u0439 \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0433\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u043d\u0430 \u044f\u0437\u044b\u043a TypeScript. \u041f\u0440\u0438\u0432\u043e\u0436\u0443 \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u043f\u0435\u0441\u043e\u0447\u043d\u0438\u0446\u0443 \u0432 \u043a\u043e\u043d\u0446\u0435 \u0441\u0442\u0430\u0442\u044c\u0438. \u0412\u0435\u0440\u0441\u0438\u044f TypeScript \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0430 \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u0444\u043e\u0440\u043c\u043e\u0439 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430. \u0418\u0433\u0440\u0430\u044f \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438, \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0434\u0430\u0436\u0435 \u0431\u0435\u0437 \u0447\u0442\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u044f.\u0412 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u043f\u043e\u0434\u043f\u0438\u0441\u0438 \u043f\u043e\u0434 \u0438\u043b\u043b\u044e\u0441\u0442\u0440\u0430\u0446\u0438\u044f\u043c\u0438.\u0421\u043f\u043e\u0439\u043b\u0435\u0442 \u0441 \u043e\u0433\u043e\u0432\u043e\u0440\u043a\u043e\u0439 \u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438\u0425\u043e\u0447\u0443 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0432\u0432\u043e\u0434\u0438\u0442 \u0432 \u0437\u0430\u0431\u043b\u0443\u0436\u0434\u0435\u043d\u0438\u0435. \u0412 \u041f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0433\u043e \u0430\u0432\u0442\u043e\u0440\u043e\u043c \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442 \u0446\u0435\u043b\u044b\u0439 \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u044b\u0439 \u043f\u043e\u0437\u0430\u0438\u043a\u043e\u0439 \u041f\u0435\u043d\u0440\u043e\u0443\u0437\u0430 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u044f \u043e\u0449\u0443\u0449\u0435\u043d\u0438\u0435 \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0439 \u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u0438. \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0436\u0435 \u0434\u0435\u043b\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043c\u043e\u0437\u0430\u0438\u043a\u043e\u0439 \u043b\u0438\u0448\u044c \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 10-\u0442\u0438 \u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a \u0438 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442 \u043c\u0430\u0441\u0448\u0442\u0430\u0431 \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u043f\u043e\u043c\u0435\u0449\u0430\u043b\u0430\u0441\u044c \u0432\u043d\u0443\u0442\u0440\u0438 \u043d\u0435\u0433\u043e \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e.\u041d\u0430 \u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u043d\u0435\u0434\u0435\u043b\u0435 \u044f \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043b \u0437\u0430\u043f\u0443\u0442\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u043d\u0430 Python, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u043c\u043e\u0437\u0430\u0438\u043a\u0443 \u041f\u0435\u043d\u0440\u043e\u0443\u0437\u0430. \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u044f \u043e\u0431\u044a\u044f\u0441\u043d\u044e \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c, \u043b\u0435\u0436\u0430\u0449\u0438\u0439 \u0432 \u043e\u0441\u043d\u043e\u0432\u0435 \u044d\u0442\u043e\u0433\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u043d\u0430 Python, \u0438 \u043f\u043e\u0434\u0435\u043b\u044e\u0441\u044c \u0435\u0433\u043e \u043d\u0435 \u0437\u0430\u043f\u0443\u0442\u0430\u043d\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0435\u0439.\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441\u043e \u0441\u043f\u0438\u0441\u043a\u043e\u043c \u043a\u0440\u0430\u0441\u043d\u044b\u0445 \u0438 \u0441\u0438\u043d\u0438\u0445 \u0440\u0430\u0432\u043d\u043e\u0431\u0435\u0434\u0440\u0435\u043d\u043d\u044b\u0445 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u043e\u0432. \u0423 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043a\u0440\u0430\u0441\u043d\u043e\u0433\u043e \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430 \u0443\u0433\u043e\u043b \u043f\u0440\u0438 \u0432\u0435\u0440\u0448\u0438\u043d\u0435 \u0440\u0430\u0432\u0435\u043d 36\u00b0, \u0430 \u0443 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u0438\u043d\u0435\u0433\u043e \u2014 108\u00b0.\u0414\u0432\u0430 \u0442\u0438\u043f\u0430 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u043e\u0432 \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c.\u0412 Python \u0442\u0430\u043a\u0438\u0435 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432 \u0432\u0438\u0434\u0435 \u043a\u043e\u0440\u0442\u0435\u0436\u0435\u0439 \u0432\u0438\u0434\u0430 (color, A, B, C). \u041f\u0435\u0440\u0432\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442, color, \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 0 \u0434\u043b\u044f \u043a\u0440\u0430\u0441\u043d\u043e\u0433\u043e \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430 \u0438 1 \u0434\u043b\u044f \u0441\u0438\u043d\u0435\u0433\u043e. \u041e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043a\u043e\u0440\u0442\u0435\u0436\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0441\u043e\u0431\u043e\u0439 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u0432\u0435\u0440\u0448\u0438\u043d A, B \u0438 C, \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u043d\u044b\u0435 \u0432 \u0432\u0438\u0434\u0435 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0441\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b. \u041a\u043e\u043c\u043f\u043b\u0435\u043a\u0441\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430 \u0445\u043e\u0440\u043e\u0448\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0442 \u0434\u043b\u044f \u044d\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u043b\u044e\u0431\u0443\u044e \u0442\u043e\u0447\u043a\u0443 \u043d\u0430 \u0434\u0432\u0443\u043c\u0435\u0440\u043d\u043e\u0439 \u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u0438: \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0434\u0430\u0451\u0442 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0443 \u043f\u043e \u043e\u0441\u0438 X, \u0430 \u043c\u043d\u0438\u043c\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u2014 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0443 \u043f\u043e \u043e\u0441\u0438 Y.\u041a\u0430\u043a \u0432\u0438\u0434\u0438\u0442\u0435, \u043c\u044b \u0440\u0438\u0441\u0443\u0435\u043c \u043a\u043e\u043d\u0442\u0443\u0440 \u043f\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u0430\u043c \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430, \u043d\u043e \u043d\u0435 \u043f\u043e \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u044e. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a \u0441 \u0434\u0440\u0443\u0433\u0438\u043c \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u043e\u043c \u0442\u043e\u0433\u043e \u0436\u0435 \u0446\u0432\u0435\u0442\u0430, \u043e\u0431\u0440\u0430\u0437\u0443\u044f \u0440\u043e\u043c\u0431\u043e\u0432\u0438\u0434\u043d\u044b\u0435 \u043f\u043b\u0438\u0442\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0438\u0434\u043d\u044b \u043d\u0430 \u0433\u043e\u0442\u043e\u0432\u043e\u0439 \u043c\u043e\u0437\u0430\u0438\u043a\u0435 \u041f\u0435\u043d\u0440\u043e\u0443\u0437\u0430.\u0420\u043e\u043c\u0431\u043e\u0432\u0438\u0434\u043d\u044b\u0435 \u043f\u043b\u0438\u0442\u043a\u0438 \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0438\u0437 \u0434\u0432\u0443\u0445 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0445 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u043e\u0432 \u043f\u043e \u043e\u0431\u0449\u0435\u0439 \u0433\u0438\u043f\u043e\u0442\u0435\u043d\u0443\u0437\u0435.\u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u0430\u043c\u043e\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435. \u0418\u043c\u0435\u044f \u0441\u043f\u0438\u0441\u043e\u043a \u0442\u0430\u043a\u0438\u0445 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u043e\u0432, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 \u043d\u0438\u0445, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u0441\u043f\u0438\u0441\u043e\u043a \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u043e\u0432. \u041a\u0440\u0430\u0441\u043d\u044b\u0439 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a \u0434\u0435\u043b\u0438\u0442\u0441\u044f \u043d\u0430 \u0434\u0432\u0430 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430 \u043c\u0435\u043d\u044c\u0448\u0435\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:\u0421\u043f\u043e\u0441\u043e\u0431 \u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043a\u0440\u0430\u0441\u043d\u044b\u0445 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u043e\u0432.\u0412 \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d\u043d\u043e\u043c \u0432\u044b\u0448\u0435 \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u0438 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u043e\u0432\u0430\u044f \u0432\u0435\u0440\u0448\u0438\u043d\u0430 P, \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043d\u0430\u044f \u0432 \u0442\u043e\u0447\u043a\u0435 \u043d\u0430 \u0440\u0435\u0431\u0440\u0435 AB, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0437\u043e\u043b\u043e\u0442\u043e\u043c\u0443 \u0441\u0435\u0447\u0435\u043d\u0438\u044e .\u0422\u043e\u0447\u043d\u043e \u0442\u0430\u043a \u0436\u0435 \u043a\u0430\u0436\u0434\u044b\u0439 \u0441\u0438\u043d\u0438\u0439 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a \u0434\u0435\u043b\u0438\u0442\u0441\u044f \u043d\u0430 \u0442\u0440\u0438 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430 \u043f\u043e\u043c\u0435\u043d\u044c\u0448\u0435:\u0421\u043f\u043e\u0441\u043e\u0431 \u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0441\u0438\u043d\u0438\u0445 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u043e\u0432.\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u044d\u0442\u043e\u0433\u043e \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u044f \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0434\u0432\u0435 \u043d\u043e\u0432\u044b\u0435 \u0432\u0435\u0440\u0448\u0438\u043d\u044b: Q \u043d\u0430 \u0440\u0435\u0431\u0440\u0435 BA \u0438 R \u043d\u0430 \u0440\u0435\u0431\u0440\u0435 BC \u0432 \u0442\u043e\u0447\u043a\u0430\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0442\u0430\u043a\u0436\u0435 \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u044f\u044e\u0442 \u0437\u043e\u043b\u043e\u0442\u043e\u043c\u0443 \u0441\u0435\u0447\u0435\u043d\u0438\u044e. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0434\u0432\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0438\u0445\u0441\u044f \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0437\u0435\u0440\u043a\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043e\u0442\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u043c\u0438 \u0434\u0440\u0443\u0433 \u0434\u0440\u0443\u0433\u0430. \u042f \u0432\u044b\u0434\u0435\u043b\u0438\u043b \u0443\u0433\u043b\u044b \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430, \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u043b\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u043a\u0430\u043a\u0438\u0435 \u0438\u0437 \u043d\u0438\u0445 \u0437\u0435\u0440\u043a\u0430\u043b\u044c\u043d\u044b\u0435, \u0430 \u043a\u0430\u043a\u0438\u0435 \u043d\u0435\u0442.\u0412\u0441\u0435 \u0432\u044b\u0448\u0435\u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u0441\u0435\u0433\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0441\u0442\u0440\u043e\u043a \u043a\u043e\u0434\u0430 \u043d\u0430 Python. \u042d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u043e\u0432, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u0432 \u0432\u0438\u0434\u0435 \u043a\u043e\u0440\u0442\u0435\u0436\u0435\u0439, \u0434\u0435\u043b\u0438\u0442 \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 \u043d\u0438\u0445 \u043d\u0430 \u0447\u0430\u0441\u0442\u0438 \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043d\u043e\u0432\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u043e\u0432:goldenRatio = (1 + math.sqrt(5)) \/ 2def subdivide(triangles):    result = []    for color, A, B, C in triangles:        if color == 0:            # Subdivide red triangle            P = A + (B &#8212; A) \/ goldenRatio            result += [(0, C, P, B), (1, P, C, A)]        else:            # Subdivide blue triangle            Q = B + (A &#8212; B) \/ goldenRatio            R = B + (C &#8212; B) \/ goldenRatio            result += [(1, R, C, A), (1, Q, R, B), (0, R, Q, A)]    return result\u0412\u0430\u0440\u0438\u0430\u043d\u0442 \u043a\u043e\u0434\u0430 \u043d\u0430 TypeScript\u042d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u044b\u0439 \u043a\u043e\u0434 \u043d\u0430 TypeScript \u0434\u043b\u044f \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430 \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:const goldenRatio = (1 + Math.sqrt(5)) \/ 2;\/\/ \u0420\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0441\u043d\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u043f\u043e \u043f\u043e \u0444\u043e\u0440\u043c\u0443\u043b\u0435:\/\/ A + (B &#8212; A) \/ goldenRatio\/\/ \u0413\u0434\u0435 \u043f\u0435\u0440\u0432\u044b\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043b\u0430\u0433\u0430\u0435\u043c\u043e\u0435 \u0441 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0435\u0439 \u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0438\u0437-\u0437\u0430\/\/ \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u0430 \u043d\u0430\u0434 \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c. \u0410 \u0442\u0430\u043a \u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432\u044b\u0437\u043e\u0432 clone(),\/\/ \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043a\u0430\u0436\u0434\u0430\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432 this.const subdividePoint = (A: Complex2, B: Complex2): Complex2 =&gt;  B.clone().sub(A).divScalar(goldenRatio).add(A);export function subdivide(triangles: Vertexes): Vertexes {  const result: Vertexes = [];  for (const [color, A, B, C] of triangles) {    if (color === VertexColor.Red) {      \/\/ Subdivide red triangle      const P = subdividePoint(A, B);      result.push([VertexColor.Red, C, P, B], [VertexColor.Blue, P, C, A]);    } else {      \/\/ Subdivide blue triangle      const Q = subdividePoint(B, A);      const R = subdividePoint(B, C);      result.push(        [VertexColor.Blue, R, C, A],        [VertexColor.Blue, Q, R, B],        [VertexColor.Red, R, Q, A]      );    }  }  return result;}TypeScript \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0442\u0438\u043f\u044b:\/\/ \u0414\u043b\u044f \u043c\u0430\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0447\u0438\u0441\u0435\u043b 0 \u0438 1 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u044e\u0449\u0438\u0445 \u0442\u0438\u043f \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u043d\u0438\u043a\u0430 \u043f\u0440\u043e\u0441\u0442\u043e\/\/ \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0442\u0438\u043f.enum VertexColor {  Red = 0,  Blue,}\/\/ \u0412 TypeScript \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043a\u043e\u0440\u0442\u0435\u0436\u0438 \u0447\u0435\u0440\u0435\u0437 \u043c\u0430\u0441\u0441\u0438\u0432\u044b.type Vertex = [  Color: VertexColor,  A: Complex2,  B: Complex2,  C: Complex2];type Vertexes = Vertex[];\u041f\u0440\u043e\u0441\u0442\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0441\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u0434\u043b\u044f \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430 \u043d\u0430 TypeScript\u0412 JavaScript\/TypeScript \u043d\u0435\u0442 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0441\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b. \u041f\u0440\u0438\u0432\u043e\u0436\u0443 \u0441\u0432\u043e\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043b\u0435\u0433\u043a\u043e\u0432\u0435\u0441\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0434\u043b\u044f \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0438 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430:export class Complex2 {  constructor(public real: number, public imag: number) {}  clone() {    return new Complex2(this.real, this.imag);  }  \/\/ \u041f\u0440\u044f\u043c\u043e\u0439 \u0430\u043d\u0430\u043b\u043e\u0433 Python \u0444\u0443\u043d\u043a\u0446\u0438\u0438 cmath.rect()  static fromPolar(r: number, phi: number): Complex2 {    return new Complex2(r * Math.cos(phi), r * Math.sin(phi));  }  static zero(): Complex2 {    return new Complex2(0, 0);  }  add(x: Complex2): Complex2 {    this.real += x.real;    this.imag += x.imag;    return this;  }  sub(x: Complex2): Complex2 {    this.real -= x.real;    this.imag -= x.imag;    return this;  }  mulScalar(x: number): Complex2 {    this.real *= x;    this.imag *= x;    return this;  }  divScalar(x: number): Complex2 {    this.real \/= x;    this.imag \/= x;    return this;  }  abs(): number {    return Math.sqrt(this.real ** 2 + this.imag ** 2);  }}\u0410 \u0432\u043e\u0442 \u043a\u043e\u0434 \u0434\u043b\u044f \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0441\u043f\u0438\u0441\u043a\u0430 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u043e\u0432. \u041e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 pycairo \u2014 \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0443 Python \u0434\u043b\u044f \u043f\u0440\u0435\u0432\u043e\u0441\u0445\u043e\u0434\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0440\u0438\u0441\u043e\u0432\u0430\u043d\u0438\u044f cairo.# Draw red trianglesfor color, A, B, C in triangles:    if color == 0:        cr.move_to(A.real, A.imag)        cr.line_to(B.real, B.imag)        cr.line_to(C.real, C.imag)        cr.close_path()cr.set_source_rgb(1.0, 0.35, 0.35)cr.fill()    # Draw blue trianglesfor color, A, B, C in triangles:    if color == 1:        cr.move_to(A.real, A.imag)        cr.line_to(B.real, B.imag)        cr.line_to(C.real, C.imag)        cr.close_path()cr.set_source_rgb(0.4, 0.4, 1.0)cr.fill()# Determine line width from size of first trianglecolor, A, B, C = triangles[0]cr.set_line_width(abs(B &#8212; A) \/ 10.0)cr.set_line_join(cairo.LINE_JOIN_ROUND)# Draw outlinesfor color, A, B, C in triangles:    cr.move_to(C.real, C.imag)    cr.line_to(A.real, A.imag)    cr.line_to(B.real, B.imag)cr.set_source_rgb(0.2, 0.2, 0.2)cr.stroke()\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043d\u0430 TypeScript\/JavaScript\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u0434\u043b\u044f \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430 \u0441\u0440\u0435\u0434\u0438 API \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0435\u0441\u0442\u044c Canvas API. \u041a\u0440\u0430\u0442\u043a\u043e &#8212; Canvas API \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u0442 cairo. \u041c\u0435\u0441\u0442\u0430\u043c\u0438 cairo API \u0438 Canvas API \u043f\u043e\u0447\u0442\u0438 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0435.const ctx = canvas.getContext(&#171;2d&#187;)!;ctx.clearRect(0, 0, canvas.width, canvas.height);ctx.save();ctx.translate(canvas.width \/ 2.0, canvas.height \/ 2.0);ctx.scale(options.wheelRadius, options.wheelRadius);\/\/ Draw red trianglesctx.fillStyle = &#171;rgb(255, 89, 89)&#187;;for (const [color, A, B, C] of triangles) {  if (color == VertexColor.Red) {    ctx.beginPath();    ctx.moveTo(A.real, A.imag);    ctx.lineTo(B.real, B.imag);    ctx.lineTo(C.real, C.imag);    ctx.fill();  }}\/\/ Draw blue trianglesctx.fillStyle = &#171;rgb(102, 102, 255)&#187;;for (const [color, A, B, C] of triangles) {  if (color == VertexColor.Blue) {    ctx.beginPath();    ctx.moveTo(A.real, A.imag);    ctx.lineTo(B.real, B.imag);    ctx.lineTo(C.real, C.imag);    ctx.fill();  }}\/\/ Determine line width from size of first triangleconst [color, A, B, C] = triangles[0];ctx.lineWidth = B.clone().sub(A).abs() \/ 10.0;ctx.lineJoin = &#171;round&#187;;\/\/ Draw outlinesctx.fillStyle = &#171;rgb(51, 51, 51)&#187;;for (const [color, A, B, C] of triangles) {  ctx.beginPath();  ctx.moveTo(C.real, C.imag);  ctx.lineTo(A.real, A.imag);  ctx.lineTo(B.real, B.imag);  ctx.stroke();}ctx.restore();\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0432\u0435\u0441\u044c \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d\u043d\u044b\u0439 \u0432\u044b\u0448\u0435 \u043a\u043e\u0434, \u043c\u044b \u043c\u043e\u0436\u0435\u043c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0430\u0447\u0430\u0442\u044c \u0441 \u043e\u0434\u043d\u043e\u0433\u043e \u043a\u0440\u0430\u0441\u043d\u043e\u0433\u043e \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430, \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u0435\u0433\u043e \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0447\u0430\u0441\u0442\u0435\u0439 \u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u043e\u0441\u043b\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0434\u0435\u043b\u0435\u043d\u0438\u044f. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u043a\u0430\u043a \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0443\u0437\u043e\u0440 \u043c\u043e\u0437\u0430\u0438\u043a\u0438:\u0418\u043b\u043b\u044e\u0441\u0442\u0440\u0430\u0446\u0438\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 subdivide().\u0412\u044b \u0434\u0430\u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0447\u0430\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0441 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0441\u043f\u0438\u0441\u043a\u0430 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u043e\u0432. \u0412\u043e\u0442 \u043a\u043e\u0434 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u00ab\u043a\u043e\u043b\u0435\u0441\u0430\u00bb, \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0435\u0433\u043e \u0438\u0437 10 \u043a\u0440\u0430\u0441\u043d\u044b\u0445 \u0442\u0440\u0435\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u043e\u0432:# Create wheel of red triangles around the origintriangles = []for i in xrange(10):    B = cmath.rect(1, (2*i &#8212; 1) * math.pi \/ 10)    C = cmath.rect(1, (2*i + 1) * math.pi \/ 10)    if i % 2 == 0:        B, C = C, B  # Make sure to mirror every second triangle    triangles.append((0, 0j, B, C))\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435 \u043e cmath.rect()\u0417\u0434\u0435\u0441\u044c cmath.rect() &#8212; \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0444\u043e\u0440\u043c\u0430 \u0437\u0430\u0434\u0430\u043d\u0438\u044f \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0441\u043d\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u0432 \u043f\u043e\u043b\u044f\u0440\u043d\u044b\u0445 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0430\u0445.\u0412\u0430\u0440\u0438\u0430\u043d\u0442 \u043a\u043e\u0434\u0430 \u043d\u0430 TypeScript\/\/ Create wheel of red triangles around the originlet triangles: Vertexes = [];for (let i = 0; i &lt; 10; ++i) {  let B = Complex2.fromPolar(1, ((2 * i &#8212; 1) * Math.PI) \/ 10);  let C = Complex2.fromPolar(1, ((2 * i + 1) * Math.PI) \/ 10);  if (i % 2 === 0) {    \/\/ Make sure to mirror every second triangle}    const Z = B;    B = C;    C = Z;  }  triangles.push([VertexColor.Red, Complex2.zero(), B, C]);}\u0415\u0441\u043b\u0438 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043c\u043d\u043e\u0433\u043e\u043a\u0440\u0430\u0442\u043d\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0442\u044c \u044d\u0442\u0443 \u0444\u043e\u0440\u043c\u0443 \u043a\u043e\u043b\u0435\u0441\u0430, \u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043c\u043e\u0437\u0430\u0438\u043a. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u043a\u0430\u0436\u0434\u0430\u044f \u043c\u043e\u0437\u0430\u0438\u043a\u0430 \u043e\u0431\u043b\u0430\u0434\u0430\u0435\u0442 \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u0441\u0442\u0435\u043f\u0435\u043d\u044c\u044e \u0441\u0438\u043c\u043c\u0435\u0442\u0440\u0438\u0438 \u2014 \u043a\u0430\u043a \u0437\u0435\u0440\u043a\u0430\u043b\u044c\u043d\u043e\u0439, \u0442\u0430\u043a \u0438 \u0432\u0440\u0430\u0449\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-475083","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/475083","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=475083"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/475083\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=475083"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=475083"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=475083"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}