From 0289a657c2c95ab8f60a7ed08255ac1d2e201ca7 Mon Sep 17 00:00:00 2001 From: Yaroslav Tsvira <51800453+Yaro2709@users.noreply.github.com> Date: Thu, 15 Feb 2024 23:09:33 +0300 Subject: [PATCH] V3.2.11 Matrix geometry: unit square --- index.html | 2 +- index.pug | 2 + ...sing2x2Matrix\320\241hangingUnitSquare.js" | 45 +++++++++++++++++++ ...ng2x2Matrix\320\241hangingUnitSquare.html" | 1 + ...ing2x2Matrix\320\241hangingUnitSquare.pug" | 29 ++++++++++++ 5 files changed, 78 insertions(+), 1 deletion(-) create mode 100644 "scripts/BD/transforming2DSpaceUsing2x2Matrix\320\241hangingUnitSquare.js" create mode 100644 "transforming2DSpaceUsing2x2Matrix\320\241hangingUnitSquare.html" create mode 100644 "transforming2DSpaceUsing2x2Matrix\320\241hangingUnitSquare.pug" diff --git a/index.html b/index.html index 814ed4b..acc1886 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ -Tutor

Добро пожаловать в Tutor!

Тригонометрия
Линейная алгебра и аналитическая геометрия
Комплексные числа
Дифференциальное исчисление

\ No newline at end of file +Tutor

Добро пожаловать в Tutor!

Тригонометрия
Линейная алгебра и аналитическая геометрия
Комплексные числа
Дифференциальное исчисление

\ No newline at end of file diff --git a/index.pug b/index.pug index 62184b1..02c3453 100644 --- a/index.pug +++ b/index.pug @@ -37,6 +37,8 @@ html(lang="ru") a(href="./transforming2DSpaceUsing2x2Matrix.html") Преобразования двумерного пространства с помощью матрицы 2x2 li a(href="./transforming2DSpaceUsing2x2Matrix.html") Преобразования двумерного вектора с помощью матрицы 2x2 + li + a(href="./transforming2DSpaceUsing2x2MatrixСhangingUnitSquare.html") Преобразования двумерного пространства с помощью матрицы 2x2 и изменение единичного квадрата h5 Комплексные числа ul li diff --git "a/scripts/BD/transforming2DSpaceUsing2x2Matrix\320\241hangingUnitSquare.js" "b/scripts/BD/transforming2DSpaceUsing2x2Matrix\320\241hangingUnitSquare.js" new file mode 100644 index 0000000..6c19c8b --- /dev/null +++ "b/scripts/BD/transforming2DSpaceUsing2x2Matrix\320\241hangingUnitSquare.js" @@ -0,0 +1,45 @@ + //Флаг шаблона +flag = module(1,1); +//Шаблоны + switch (flag) { + //Основные формулы + case 1: + VarA11 = module(-3,3); + VarA12 = module(-3,3); + VarA21 = module(-3,3); + VarA22 = module(-3,3); + task = String.raw`\begin{gather*} + \left[ + \begin{array}{cccc} + ${VarA11} && ${VarA12}\\ + ${VarA21} && ${VarA22} + \end{array} + \right] + \end{gather*}`; + answer = String.raw`\begin{gather*} \end{gather*}`; + img = String.raw`\begin{tikzpicture} + \clip (-7,-7) rectangle (7cm,7cm); % Clips the picture... + \draw [very thin,gray!40,dashed] (-7,-7) grid (7,7); + \pgftransformcm{${VarA11}}{${VarA21}}{${VarA12}}{${VarA22}}{\pgfpoint{0}{0}} + \draw [black!60] (-14,-7) grid (14,7); + %Specify the transformation matrix and the center point + \draw[->, gray!90, line width=1pt] (-7, 0) -- (7, 0) node[right] {$x$}; + \draw[->, gray!90, line width=1pt] (0, -7) -- (0, 7) node[above] {$y$}; + \draw[->, green!70, line width=1pt] (0, 0) -- (1, 0) node[right] {$i$}; + \draw[->, red!70, line width=1pt] (0, 0) -- (0, 1) node[above] {$j$}; + + \draw[yellow!70, line width=1pt] (0, 1) -- (0.5, 1) node[above, green!70]{$1$} -- (1, 1); + \draw[yellow!70, line width=1pt] (1, 1) -- (1, 0.5) node[right, green!70]{$1$} -- (1, 0); + + \fill[yellow,draw=yellow, fill opacity=0.2] plot coordinates { (0,0) (1,0) (1,1) (0,1) } ; + + \end{tikzpicture}`; + break; + //Дополнительные формулы + default: + alert( "400 Bad Request: value is undefined!" ); + } +//Вывод +document.getElementById("task").innerHTML = task; +document.getElementById("answer").innerHTML = answer; +document.getElementById("img").innerHTML = img; \ No newline at end of file diff --git "a/transforming2DSpaceUsing2x2Matrix\320\241hangingUnitSquare.html" "b/transforming2DSpaceUsing2x2Matrix\320\241hangingUnitSquare.html" new file mode 100644 index 0000000..ebd0cb7 --- /dev/null +++ "b/transforming2DSpaceUsing2x2Matrix\320\241hangingUnitSquare.html" @@ -0,0 +1 @@ +Tutor
Преобразования двумерного пространства с помощью матрицы 2x2 и изменение единичного квадрата

\ No newline at end of file diff --git "a/transforming2DSpaceUsing2x2Matrix\320\241hangingUnitSquare.pug" "b/transforming2DSpaceUsing2x2Matrix\320\241hangingUnitSquare.pug" new file mode 100644 index 0000000..8378055 --- /dev/null +++ "b/transforming2DSpaceUsing2x2Matrix\320\241hangingUnitSquare.pug" @@ -0,0 +1,29 @@ +doctype html +html(lang="ru") + include ./templates/layout/head.pug + body + include ./templates/layout/nav.pug + + + + main.container(role="main") + div.row + div.col-md-12 + div.card.mb-4.shadow-sm + div.card-body + h5.card-title Преобразования двумерного пространства с помощью матрицы 2x2 и изменение единичного квадрата + p.card-text.overflow-auto + module(id="task") + p + button.btn.btn-success(type="button", data-toggle="collapse", data-target="#transforming2DSpaceUsing2x2MatrixСhangingUnitSquare", aria-expanded="false", aria-controls="#transforming2DSpaceUsing2x2MatrixСhangingUnitSquare") Ответ + div.collapse(id="transforming2DSpaceUsing2x2MatrixСhangingUnitSquare") + div.card.card-body + div.boxTikZ + script(type="text/tikz", id="img") + result(id="answer") + + script(type="text/javascript", src="scripts/BD/transforming2DSpaceUsing2x2MatrixСhangingUnitSquare.js") + + + + include ./templates/layout/footer.pug \ No newline at end of file