From 0408d33694635cdc28db23c9c6388bd916626bde Mon Sep 17 00:00:00 2001 From: Andrew Guschin Date: Mon, 9 Nov 2020 23:28:49 +0300 Subject: =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB=20=D0=BF?= =?UTF-8?q?=D0=B5=D1=80=D0=B2=D1=8B=D0=B5=204=20=D0=B7=D0=B0=D0=B4=D0=B0?= =?UTF-8?q?=D0=BD=D0=B8=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- task03/Guschin.sln | 31 ++++ task03/Guschin/Figure.h | 18 ++ task03/Guschin/Guschin.vcxproj | 143 ++++++++++++++++ task03/Guschin/Guschin.vcxproj.filters | 41 +++++ task03/Guschin/Guschin.vcxproj.user | 4 + task03/Guschin/Matrix.h | 98 +++++++++++ task03/Guschin/MyForm.cpp | 19 +++ task03/Guschin/MyForm.h | 298 +++++++++++++++++++++++++++++++++ task03/Guschin/MyForm.resx | 123 ++++++++++++++ task03/Guschin/Transform.h | 45 +++++ task03/Hare_full.txt | 99 +++++++++++ task03/clown.txt | 251 +++++++++++++++++++++++++++ 12 files changed, 1170 insertions(+) create mode 100644 task03/Guschin.sln create mode 100644 task03/Guschin/Figure.h create mode 100644 task03/Guschin/Guschin.vcxproj create mode 100644 task03/Guschin/Guschin.vcxproj.filters create mode 100644 task03/Guschin/Guschin.vcxproj.user create mode 100644 task03/Guschin/Matrix.h create mode 100644 task03/Guschin/MyForm.cpp create mode 100644 task03/Guschin/MyForm.h create mode 100644 task03/Guschin/MyForm.resx create mode 100644 task03/Guschin/Transform.h create mode 100644 task03/Hare_full.txt create mode 100644 task03/clown.txt (limited to 'task03') diff --git a/task03/Guschin.sln b/task03/Guschin.sln new file mode 100644 index 0000000..0a37280 --- /dev/null +++ b/task03/Guschin.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29806.167 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Guschin", "Guschin\Guschin.vcxproj", "{7FD831C6-82A0-4285-8C15-41D557E54312}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {7FD831C6-82A0-4285-8C15-41D557E54312}.Debug|x64.ActiveCfg = Debug|x64 + {7FD831C6-82A0-4285-8C15-41D557E54312}.Debug|x64.Build.0 = Debug|x64 + {7FD831C6-82A0-4285-8C15-41D557E54312}.Debug|x86.ActiveCfg = Debug|Win32 + {7FD831C6-82A0-4285-8C15-41D557E54312}.Debug|x86.Build.0 = Debug|Win32 + {7FD831C6-82A0-4285-8C15-41D557E54312}.Release|x64.ActiveCfg = Release|x64 + {7FD831C6-82A0-4285-8C15-41D557E54312}.Release|x64.Build.0 = Release|x64 + {7FD831C6-82A0-4285-8C15-41D557E54312}.Release|x86.ActiveCfg = Release|Win32 + {7FD831C6-82A0-4285-8C15-41D557E54312}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {44500E7D-60B5-4F8A-8A21-14C0785E2BF7} + EndGlobalSection +EndGlobal diff --git a/task03/Guschin/Figure.h b/task03/Guschin/Figure.h new file mode 100644 index 0000000..4a4b143 --- /dev/null +++ b/task03/Guschin/Figure.h @@ -0,0 +1,18 @@ +#pragma once +#include "Matrix.h" +#include + +class path +{ +public: + std::vector vertices; + vec3 color; + float thickness; + + path(std::vector verts, vec3 col, float thickn) + { + vertices = verts; + color = col; + thickness = thickn; + } +}; \ No newline at end of file diff --git a/task03/Guschin/Guschin.vcxproj b/task03/Guschin/Guschin.vcxproj new file mode 100644 index 0000000..2065a14 --- /dev/null +++ b/task03/Guschin/Guschin.vcxproj @@ -0,0 +1,143 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 16.0 + {7FD831C6-82A0-4285-8C15-41D557E54312} + v4.7.2 + ManagedCProj + Guschin + 10.0.18362.0 + + + + Application + true + v142 + true + Unicode + + + Application + false + v142 + true + Unicode + + + Application + true + v142 + true + Unicode + + + Application + false + v142 + true + Unicode + + + + + + + + + + + + + + + + + + + + + + + Level3 + WIN32;_DEBUG;%(PreprocessorDefinitions) + + + + Windows + Main + + + + + Level3 + _DEBUG;%(PreprocessorDefinitions) + + + + Windows + Main + + + + + Level3 + WIN32;NDEBUG;%(PreprocessorDefinitions) + + + + + + + + Level3 + NDEBUG;%(PreprocessorDefinitions) + + + + + + + + + + CppForm + + + + + + + + + + + + + + + + MyForm.h + + + + + + \ No newline at end of file diff --git a/task03/Guschin/Guschin.vcxproj.filters b/task03/Guschin/Guschin.vcxproj.filters new file mode 100644 index 0000000..c8d9b00 --- /dev/null +++ b/task03/Guschin/Guschin.vcxproj.filters @@ -0,0 +1,41 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Файлы заголовков + + + Файлы заголовков + + + Файлы заголовков + + + Файлы заголовков + + + + + Исходные файлы + + + + + Файлы ресурсов + + + \ No newline at end of file diff --git a/task03/Guschin/Guschin.vcxproj.user b/task03/Guschin/Guschin.vcxproj.user new file mode 100644 index 0000000..88a5509 --- /dev/null +++ b/task03/Guschin/Guschin.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/task03/Guschin/Matrix.h b/task03/Guschin/Matrix.h new file mode 100644 index 0000000..3aa0bbf --- /dev/null +++ b/task03/Guschin/Matrix.h @@ -0,0 +1,98 @@ +#pragma once + +class vec2 +{ +public: + float x, y; + vec2() {} + vec2(float a, float b) : x(a), y(b) {} +}; + +class vec3 +{ +public: + float x, y, z; + vec3() {} + vec3(float a, float b, float c) : x(a), y(b), z(c) {} + vec3(vec2 v, float c) : vec3(v.x, v.y, c) {} + + vec3& operator*=(const vec3& v) + { + x *= v.x; + y *= v.y; + z *= v.z; + return *this; + } + + const vec3 operator*(const vec3& v) + { + return vec3(*this) *= v; + } + + float& operator[](int i) + { + return ((float*)this)[i]; + } +}; + +float dot(vec3 v1, vec3 v2) +{ + vec3 tmp = v1 * v2; + return tmp.x + tmp.y + tmp.z; +} + +class mat3 +{ +public: + vec3 row1, row2, row3; + mat3() {} + mat3(vec3 r1, vec3 r2, vec3 r3) : row1(r1), row2(r2), row3(r3) {} + mat3(float a) + { + row1 = vec3(a, 0.f, 0.f); + row2 = vec3(0.f, a, 0.f); + row3 = vec3(0.f, 0.f, a); + } + + vec3& operator[](int i) + { + return ((vec3*)this)[i]; + } + + mat3 transpose() + { + mat3 tmp(*this); + for (int i = 0; i < 3; ++i) + for (int j = 0; j < 3; ++j) + (*this)[i][j] = tmp[j][i]; + return *this; + } + + const vec3 operator*(const vec3& v) + { + vec3* res = new(vec3); + for (int i = 0; i < 3; ++i) + (*res)[i] = dot((*this)[i], v); + return *res; + } + + mat3& operator*=(const mat3& m) + { + mat3 A(*this), B(m); + B.transpose(); + for (int i = 0; i < 3; ++i) + (*this)[i] = A * B[i]; + return (*this).transpose(); + } + + const mat3 operator*(const mat3& m) + { + return mat3(*this) *= m; + } +}; + +vec2 normalize(vec3 v) +{ + return vec2(v.x / v.z, v.y / v.z); +} + diff --git a/task03/Guschin/MyForm.cpp b/task03/Guschin/MyForm.cpp new file mode 100644 index 0000000..b33e1e5 --- /dev/null +++ b/task03/Guschin/MyForm.cpp @@ -0,0 +1,19 @@ +#include "Matrix.h" +#include +#include "Transform.h" +#include "Figure.h" +#include +#include +#include +#include "MyForm.h" + +using namespace System; +using namespace System::Windows::Forms; + +[STAThreadAttribute] +void Main(array ^ args) { + Application::EnableVisualStyles(); + Application::SetCompatibleTextRenderingDefault(false); + Guschin::MyForm form; + Application::Run(% form); +} \ No newline at end of file diff --git a/task03/Guschin/MyForm.h b/task03/Guschin/MyForm.h new file mode 100644 index 0000000..bc09fd3 --- /dev/null +++ b/task03/Guschin/MyForm.h @@ -0,0 +1,298 @@ +#pragma once + +namespace Guschin { + + using namespace System; + using namespace System::ComponentModel; + using namespace System::Collections; + using namespace System::Windows::Forms; + using namespace System::Data; + using namespace System::Drawing; + using namespace std; + + float Vx; + float Vy; + float aspectFig; + vector figure; + mat3 T; + mat3 initT; + + /// + /// Ñâîäêà äëÿ MyForm + /// + public ref class MyForm : public System::Windows::Forms::Form + { + public: + MyForm(void) + { + InitializeComponent(); + // + //TODO: äîáàâüòå êîä êîíñòðóêòîðà + // + } + + protected: + /// + /// Îñâîáîäèòü âñå èñïîëüçóåìûå ðåñóðñû. + /// + ~MyForm() + { + if (components) + { + delete components; + } + } + private: System::Windows::Forms::OpenFileDialog^ openFileDialog; + private: System::Windows::Forms::Button^ btnOpen; + protected: + + protected: + + private: + /// + /// Îáÿçàòåëüíàÿ ïåðåìåííàÿ êîíñòðóêòîðà. + /// + System::ComponentModel::Container ^components; + +#pragma region Windows Form Designer generated code + /// + /// Òðåáóåìûé ìåòîä äëÿ ïîääåðæêè êîíñòðóêòîðà — íå èçìåíÿéòå + /// ñîäåðæèìîå ýòîãî ìåòîäà ñ ïîìîùüþ ðåäàêòîðà êîäà. + /// + void InitializeComponent(void) + { + this->openFileDialog = (gcnew System::Windows::Forms::OpenFileDialog()); + this->btnOpen = (gcnew System::Windows::Forms::Button()); + this->SuspendLayout(); + // + // openFileDialog + // + this->openFileDialog->DefaultExt = L"txt"; + this->openFileDialog->Filter = L"Текстовые файлы (*.txt)|*.txt|Все файлы (*.*)|*.*"; + this->openFileDialog->Title = L"Открыть файл"; + // + // btnOpen + // + this->btnOpen->Location = System::Drawing::Point(12, 12); + this->btnOpen->Name = L"btnOpen"; + this->btnOpen->Size = System::Drawing::Size(113, 39); + this->btnOpen->TabIndex = 0; + this->btnOpen->Text = L"Открыть"; + this->btnOpen->UseVisualStyleBackColor = true; + this->btnOpen->Click += gcnew System::EventHandler(this, &MyForm::btnOpen_Click); + // + // MyForm + // + this->AutoScaleDimensions = System::Drawing::SizeF(6, 13); + this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font; + this->ClientSize = System::Drawing::Size(553, 557); + this->Controls->Add(this->btnOpen); + this->KeyPreview = true; + this->Name = L"MyForm"; + this->Text = L"MyForm"; + this->Load += gcnew System::EventHandler(this, &MyForm::MyForm_Load); + this->Paint += gcnew System::Windows::Forms::PaintEventHandler(this, &MyForm::MyForm_Paint); + this->KeyDown += gcnew System::Windows::Forms::KeyEventHandler(this, &MyForm::MyForm_KeyDown); + this->Resize += gcnew System::EventHandler(this, &MyForm::MyForm_Resize); + this->ResumeLayout(false); + + } +#pragma endregion + private: System::Void MyForm_Resize(System::Object^ sender, System::EventArgs^ e) { + Refresh(); + } + private: System::Void MyForm_Paint(System::Object^ sender, System::Windows::Forms::PaintEventArgs^ e) { + Graphics^ g = e->Graphics; + g->Clear(Color::Aquamarine); + + for (int i = 0; i < figure.size(); ++i) + { + path lines = figure[i]; + Pen^ pen = gcnew Pen(Color::FromArgb(lines.color.x, lines.color.y, lines.color.z)); + pen->Width = lines.thickness; + vec2 start = normalize(T * vec3(lines.vertices[0], 1.0)); + for (int j = 1; j < lines.vertices.size(); ++j) + { + vec2 end = normalize(T * vec3(lines.vertices[j], 1.0)); + g->DrawLine(pen, start.x, start.y, end.x, end.y); + start = end; + } + } + } + private: System::Void MyForm_Load(System::Object^ sender, System::EventArgs^ e) { } + private: System::Void MyForm_KeyDown(System::Object^ sender, System::Windows::Forms::KeyEventArgs^ e) { + float Wcx = ClientRectangle.Width / 2.f; + float Wcy = ClientRectangle.Height / 2.f; + + switch (e->KeyCode) { + case Keys::Escape: + T = initT; + break; + case Keys::Q : + T = translate(-Wcx, -Wcy) * T; + T = rotate(0.01f) * T; + T = translate(Wcx, Wcy) * T; + break; + case Keys::E : + T = translate(-Wcx, -Wcy) * T; + T = rotate(-0.01f) * T; + T = translate(Wcx, Wcy) * T; + break; + + case Keys::W : + T = translate(0.f, -1.f) * T; + break; + case Keys::S : + T = translate(0.f, 1.f) * T; + break; + case Keys::A : + T = translate(-1.f, 0.f) * T; + break; + case Keys::D : + T = translate(1.f, 0.f) * T; + break; + + case Keys::R: + T = translate(-Wcx, -Wcy) * T; + T = rotate(0.05f) * T; + T = translate(Wcx, Wcy) * T; + break; + case Keys::Y: + T = translate(-Wcx, -Wcy) * T; + T = rotate(-0.05f) * T; + T = translate(Wcx, Wcy) * T; + break; + + case Keys::T: + T = translate(0.f, -10.f) * T; + break; + case Keys::G: + T = translate(0.f, 10.f) * T; + break; + case Keys::F: + T = translate(-10.f, 0.f) * T; + break; + case Keys::H: + T = translate(10.f, 0.f) * T; + break; + + case Keys::Z: + T = translate(-Wcx, -Wcy) * T; + T = scale(1.1f) * T; + T = translate(Wcx, Wcy) * T; + break; + case Keys::X: + T = translate(-Wcx, -Wcy) * T; + T = scale(1 / 1.1f) * T; + T = translate(Wcx, Wcy) * T; + break; + + case Keys::U: + T = translate(-Wcx, -Wcy) * T; + T = mirrorX() * T; + T = translate(Wcx, Wcy) * T; + break; + case Keys::J: + T = translate(-Wcx, -Wcy) * T; + T = mirrorY() * T; + T = translate(Wcx, Wcy) * T; + break; + + case Keys::I: + T = translate(-Wcx, -Wcy) * T; + T = scale(1.1f, 1.f) * T; + T = translate(Wcx, Wcy) * T; + break; + case Keys::K: + T = translate(-Wcx, -Wcy) * T; + T = scale(1 / 1.1f, 1.f) * T; + T = translate(Wcx, Wcy) * T; + break; + + case Keys::O: + T = translate(-Wcx, -Wcy) * T; + T = scale(1.f, 1.1f) * T; + T = translate(Wcx, Wcy) * T; + break; + case Keys::L: + T = translate(-Wcx, -Wcy) * T; + T = scale(1.f, 1 / 1.1f) * T; + T = translate(Wcx, Wcy) * T; + break; + + default: + break; + } + Refresh(); + } + private: System::Void btnOpen_Click(System::Object^ sender, System::EventArgs^ e) { + if (openFileDialog->ShowDialog() == System::Windows::Forms::DialogResult::OK) + { + wchar_t fileName[1024]; + for (int i = 0; i < openFileDialog->FileName->Length; ++i) + fileName[i] = openFileDialog->FileName[i]; + fileName[openFileDialog->FileName->Length] = '\0'; + + ifstream in; + in.open(fileName); + if (in.is_open()) + { + figure.clear(); + float thickness = 2; + float r, g, b; + r = g = b = 0; + string cmd; + + string str; + getline(in, str); + while (in) + { + if ((str.find_first_not_of(" \t\r\n") != string::npos) && (str[0] != '#')) + { + stringstream s(str); + s >> cmd; + if (cmd == "frame") + { + s >> Vx >> Vy; + aspectFig = Vx / Vy; + float Wx = ClientRectangle.Width; + float Wy = ClientRectangle.Height; + float aspectForm = Wx / Wy; + float S = aspectFig < aspectForm ? Wy / Vy : Wx / Vx; + float Ty = S * Vy; + initT = translate(0.f, Ty) * scale(S, -S); + T = initT; + } + else if (cmd == "color") + s >> r >> g >> b; + else if (cmd == "thickness") + s >> thickness; + else if (cmd == "path") + { + vector vertices; + int N; + s >> N; + string str1; + while (N > 0) + { + getline(in, str1); + if ((str1.find_first_not_of(" \t\r\n") != string::npos) && (str1[0] != '#')) + { + float x, y; + stringstream s1(str1); + s1 >> x >> y; + vertices.push_back(vec2(x, y)); + N--; + } + } + figure.push_back(path(vertices, vec3(r, g, b), thickness)); + } + } + getline(in, str); + } + Refresh(); + } + } + } +}; +} diff --git a/task03/Guschin/MyForm.resx b/task03/Guschin/MyForm.resx new file mode 100644 index 0000000..12048a9 --- /dev/null +++ b/task03/Guschin/MyForm.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + \ No newline at end of file diff --git a/task03/Guschin/Transform.h b/task03/Guschin/Transform.h new file mode 100644 index 0000000..d606647 --- /dev/null +++ b/task03/Guschin/Transform.h @@ -0,0 +1,45 @@ +#pragma once + +mat3 translate(float Tx, float Ty) +{ + mat3* res = new mat3(1.f); + (*res)[0][2] = Tx; + (*res)[1][2] = Ty; + return *res; +} + +mat3 scale(float Sx, float Sy) +{ + mat3* res = new mat3(1.f); + (*res)[0][0] = Sx; + (*res)[1][1] = Sy; + return *res; +} + +mat3 scale(float S) +{ + return scale(S, S); +} + +mat3 rotate(float theta) +{ + mat3* res = new mat3(1.f); + (*res)[0][0] = (*res)[1][1] = (float)cos(theta); + (*res)[0][1] = (float)sin(theta); + (*res)[1][0] = -(*res)[0][1]; + return *res; +} + +mat3 mirrorX() +{ + mat3* res = new mat3(1.f); + (*res)[1][1] = -1; + return *res; +} + +mat3 mirrorY() +{ + mat3* res = new mat3(1.f); + (*res)[0][0] = -1; + return *res; +} \ No newline at end of file diff --git a/task03/Hare_full.txt b/task03/Hare_full.txt new file mode 100644 index 0000000..a214ad0 --- /dev/null +++ b/task03/Hare_full.txt @@ -0,0 +1,99 @@ +frame 8.5 8.5 + +# +color 255 0 0 # +thickness 2 # 2 +path 23 # 23 (22 ) +0.5 3. # +1. 4.5 # +0.5 6. # +0.5 7.5 # +1. 8. # +1.5 8. # +2. 7.5 # +1.5 6. # +1.5 4.5 # +3. 4.5 # +3. 6. # +2.5 7.5 # +3. 8. # +3.5 8. # +4. 7.5 # +4. 6. # +3.5 4.5 # +4. 3. # +3.5 1.5 # +2.5 1. # +2. 1. # +1. 1.5 # +0.5 3. + +# +color 120 120 120 # +thickness 3 # 3 +path 22 # 22 (21 ) +4. 3. # +5.5 3.5 # +7. 3.5 # +7.5 2.5 # +8. 2.5 # +8. 2. # +7.5 2. # +7.5 0.5 # +6.5 0.5 # +6.5 1. # +6. 1. # +6. 0.5 # +5. 0.5 # +5. 1. # +4. 1. # +4. 0.5 # +3. 0.5 # +3. 1. # +2.5 1. # +2.5 0.5 # +1.5 0.5 # +1.5 1.25 + +# +color 0 255 0 # +thickness 4 # 4 + +# +path 5 +1.5 3.5 # +1.5 3. # +2. 3. # +2. 3.5 # +1.5 3.5 + +# +path 5 +2.5 3.5 # +2.5 3. # +3. 3. # +3. 3.5 # +2.5 3.5 + +# +color 0 0 0 # +thickness 2 # 2 + +# +path 2 +1. 5.5 +1. 7. + +# +path 2 +3.5 5.5 +3.5 7. + +# +color 0 0 255 # +thickness 3 # 3 +path 4 +2. 2.5 # +2.5 2.5 # +2.25 2. # +2. 2.5 diff --git a/task03/clown.txt b/task03/clown.txt new file mode 100644 index 0000000..a1a906a --- /dev/null +++ b/task03/clown.txt @@ -0,0 +1,251 @@ +frame 20 30 + +# шляпа +color 255 255 0 +thickness 5 +path 17 +8. 29. +12. 29. +13. 28. +14. 26. +13. 24. +15. 23. +15. 22. +14. 21. +12. 22. +8. 22. +6. 21. +5. 22. +5. 23. +7. 24. +6. 26. +7. 28. +8. 29. + +# лопасти +color 255 0 255 +thickness 3 +path 9 +14. 26. +15. 26. +16. 27. +16. 26. +17. 25. +16. 25. +15. 24. +15. 25. +14. 26. + +# ручка +color 255 0 255 +thickness 3 +path 6 +15. 25. +15. 26. +16. 26. +16. 25. +15. 25. +12. 23. + +# лицо правая часть +color 255 255 255 +thickness 3 +path 3 +15. 17. +16. 15. +16. 10. + +# лицо левая часть +color 255 255 255 +thickness 3 +path 3 +5. 17. +4. 15. +4. 10. + +# голова +color 255 100 0 +thickness 3 +path 22 +15. 22. +19. 17. +19. 15. +18. 16. +19. 14. +18. 13. +17. 15. +18. 12. +16. 10. +15. 8. +11. 6. +9. 6. +5. 8. +4. 10. +2. 12. +3. 15. +2. 13. +1. 14. +2. 16. +1. 15. +1. 17. +5. 22. + +# левый глаз +color 0 0 255 +thickness 3 +path 16 +7. 16. +5. 17. +5. 19. +7. 21. +9. 21. +10. 18.5 +9. 16. +7. 16. +6. 17. +7. 19. +8. 19. +9. 17. +8. 16. +8. 17. +7. 17. +7. 16. + +# правый глаз +color 0 0 255 +thickness 3 +path 16 +13. 16. +15. 17. +15. 19. +13. 21. +11. 21. +10. 18.5 +11. 16. +13. 16. +14. 17. +13. 19. +12. 19. +11. 17. +12. 16. +12. 17. +13. 17. +13. 16. + +# нос +color 255 0 0 +thickness 5 +path 10 +9. 16. +11. 16. +13. 15. +14. 13. +13. 12. +10. 11. +7. 12. +6. 13. +7. 15. +9. 16. + +# губы +color 255 255 255 +thickness 5 +path 11 +6. 13. +5. 13. +4. 12. +4. 11. +7. 9. +10. 8. +13. 9. +16. 11. +16. 12. +15. 13. +14. 13. + +# левая ямочка +color 255 0 0 +thickness 5 +path 2 +6. 12. +5. 11. + +# правая ямочка +color 255 0 0 +thickness 5 +path 2 +14. 12. +15. 11. + +# рот +color 255 0 0 +thickness 5 +path 5 +6. 11. +7. 10. +10. 9. +13. 10. +14. 11. + +### узоры на бантике +color 255 255 0 +thickness 3 +path 5 +12. 5. +13. 5. +13. 4. +12. 4. +12. 5. + +color 100 0 200 +thickness 3 +path 2 +13. 6. +14. 5. + +color 100 0 100 +thickness 3 +path 3 +14. 4. +13. 3. +14. 2. + +color 255 0 255 +thickness 3 +path 5 +8. 3. +7. 3. +7. 4. +8. 4. +8. 3. + +color 255 255 0 +thickness 3 +path 2 +7. 2. +6. 3. + +color 0 0 255 +thickness 3 +path 3 +6. 4. +7. 5. +6. 6. + +# левый контур бантика +color 255 0 0 +thickness 5 +path 4 +10. 3. +6. 7. +6. 1. +10. 5. + +# правый контур бантика +color 255 0 0 +thickness 5 +path 4 +10. 5. +14. 1. +14. 7. +10. 3. -- cgit v1.2.3