Skip to content

Commit

Permalink
V3.2.4
Browse files Browse the repository at this point in the history
Add and multi complex numbers
  • Loading branch information
Yaro2709 committed Feb 13, 2024
1 parent 2d54abe commit fd3d84c
Show file tree
Hide file tree
Showing 10 changed files with 400 additions and 5 deletions.
1 change: 1 addition & 0 deletions additionСomplexNumbers.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!DOCTYPE html><html lang="ru"><head><meta charset="UTF-8"><title>Tutor</title><link rel="manifest" href="./manifest.json"><link rel="shortcut icon" href="./favicon.ico" type="image/x-icon"><meta http-equiv="content-type" content="text/html; charset=UTF-8"><link rel="stylesheet" type="text/css" href="css/prism.css"><link rel="stylesheet" type="text/css" href="css/bootstrap.min_4.6.0.css"><script type="text/javascript" src="scripts/prism.js"></script><script type="text/javascript" src="scripts/jquery.js"></script><script type="text/javascript" src="scripts/jquery.ui.js"></script><script type="text/javascript" src="scripts/popper.min.js"></script><script type="text/javascript" src="scripts/bootstrap.min.js"></script><script src="scripts/mathjax/es5/tex-chtml.js" id="MathJax-script" async></script><!--link(rel="stylesheet", type="text/css", href="scripts/katex/katex.min.css", crossorigin="anonymous")--><!--script(type="text/javascript", src="scripts/katex/katex.min.js", crossorigin="anonymous")--><!--script(type="text/javascript", src="scripts/katex/contrib/auto-render.min.js", crossorigin="anonymous", onload="renderMathInElement(document.body);")--><!--script(type="text/javascript", src="scripts/katex/contrib/copy-tex.min.js", crossorigin="anonymous")--><script type="text/javascript" src="scripts/general.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"></head><body><nav class="navbar navbar-expand-md fixed-top bg-dark navbar-dark"><div class="container-xl"><a class="navbar-brand" href="#"><img class="d-inline-block align-text-top" src="./img/logo.png" alt="" width="30" height="30"><text>Tutor</text></a><button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExample07XL" aria-controls="navbarsExample07XL" aria-expanded="false" aria-label="Toggle navigation"><span class="navbar-toggler-icon"></span></button><div class="collapse navbar-collapse" id="navbarsExample07XL"><ul class="navbar-nav mr-auto"><li class="nav-item"> <a class="nav-link" href="./index.html">Меню</a></li><li class="nav-item"> <a class="nav-link" href="./contacts.html">Контакты</a></li></ul></div></div></nav><main class="container" role="main"><div class="row"><div class="col-md-12"> <div class="card mb-4 shadow-sm"><div class="card-body"><h5 class="card-title">Сложение комплексных чисел</h5><p class="card-text overflow-auto"><module id="task"></module></p><p><button class="btn btn-success" type="button" data-toggle="collapse" data-target="#additionСomplexNumbers" aria-expanded="false" aria-controls="#additionСomplexNumbers">Ответ</button></p><div class="collapse" id="additionСomplexNumbers"><div class="card card-body"><result id="answer"></result></div></div></div></div></div></div></main><script type="text/javascript" src="scripts/BD/additionСomplexNumbers.js"></script></body><footer><div class="container"> <p class="float-right"> <a href="#">Наверх </a></p><p>© 2022 <a href="https://github.com/Yaro2709">github</a></p></div></footer></html>
26 changes: 26 additions & 0 deletions additionСomplexNumbers.pug
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
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 Сложение комплексных чисел
p.card-text.overflow-auto
module(id="task")
p
button.btn.btn-success(type="button", data-toggle="collapse", data-target="#additionСomplexNumbers", aria-expanded="false", aria-controls="#additionСomplexNumbers") Ответ
div.collapse(id="additionСomplexNumbers")
div.card.card-body
result(id="answer")
script(type="text/javascript", src="scripts/BD/additionСomplexNumbers.js")



include ./templates/layout/footer.pug
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!DOCTYPE html><html lang="ru"><head><meta charset="UTF-8"><title>Tutor</title><link rel="manifest" href="./manifest.json"><link rel="shortcut icon" href="./favicon.ico" type="image/x-icon"><meta http-equiv="content-type" content="text/html; charset=UTF-8"><link rel="stylesheet" type="text/css" href="css/prism.css"><link rel="stylesheet" type="text/css" href="css/bootstrap.min_4.6.0.css"><script type="text/javascript" src="scripts/prism.js"></script><script type="text/javascript" src="scripts/jquery.js"></script><script type="text/javascript" src="scripts/jquery.ui.js"></script><script type="text/javascript" src="scripts/popper.min.js"></script><script type="text/javascript" src="scripts/bootstrap.min.js"></script><script src="scripts/mathjax/es5/tex-chtml.js" id="MathJax-script" async></script><!--link(rel="stylesheet", type="text/css", href="scripts/katex/katex.min.css", crossorigin="anonymous")--><!--script(type="text/javascript", src="scripts/katex/katex.min.js", crossorigin="anonymous")--><!--script(type="text/javascript", src="scripts/katex/contrib/auto-render.min.js", crossorigin="anonymous", onload="renderMathInElement(document.body);")--><!--script(type="text/javascript", src="scripts/katex/contrib/copy-tex.min.js", crossorigin="anonymous")--><script type="text/javascript" src="scripts/general.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"></head><body><nav class="navbar navbar-expand-md fixed-top bg-dark navbar-dark"><div class="container-xl"><a class="navbar-brand" href="#"><img class="d-inline-block align-text-top" src="./img/logo.png" alt="" width="30" height="30"><text>Tutor</text></a><button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExample07XL" aria-controls="navbarsExample07XL" aria-expanded="false" aria-label="Toggle navigation"><span class="navbar-toggler-icon"></span></button><div class="collapse navbar-collapse" id="navbarsExample07XL"><ul class="navbar-nav mr-auto"><li class="nav-item"> <a class="nav-link" href="./index.html">Меню</a></li><li class="nav-item"> <a class="nav-link" href="./contacts.html">Контакты</a></li></ul></div></div></nav><main class="container" role="main"><div class="row"><div class="col-md-12"> <div class="card mb-4 shadow-sm"><div class="card-body"><h4 class="card-title">Добро пожаловать в Tutor!</h4><p class="card-text overflow-auto"><h5>Тригонометрия</h5><ul><li><a href="./tabularTrigonometry.html">Табличные значения тригонометрических углов</a></li><li><a href="./сastFormulas.html">Формулы приведения</a></li></ul><h5>Дифференциальное исчисление</h5><ul><li><a href="./tabularIntegrals.html">Табличные интегралы</a></li><li><a>Простейшие приёмы интегрирования</a><ul><li><a href="./tabularIntegrals.html">Работа со степенями</a></li></ul><ul></ul></li><li><a href="./integralsTrigonometrySumProduct.html">Интегрирование триг. выражений: произведение в сумму</a></li><li><a href="./integrationTrigonometryExpressionsInPowers.html">Интегрирование триг. выражений в степени</a></li></ul></p></div></div></div></div></main></body><footer><div class="container"> <p class="float-right"> <a href="#">Наверх </a></p><p>© 2022 <a href="https://github.com/Yaro2709">github</a></p></div></footer></html>
<!DOCTYPE html><html lang="ru"><head><meta charset="UTF-8"><title>Tutor</title><link rel="manifest" href="./manifest.json"><link rel="shortcut icon" href="./favicon.ico" type="image/x-icon"><meta http-equiv="content-type" content="text/html; charset=UTF-8"><link rel="stylesheet" type="text/css" href="css/prism.css"><link rel="stylesheet" type="text/css" href="css/bootstrap.min_4.6.0.css"><script type="text/javascript" src="scripts/prism.js"></script><script type="text/javascript" src="scripts/jquery.js"></script><script type="text/javascript" src="scripts/jquery.ui.js"></script><script type="text/javascript" src="scripts/popper.min.js"></script><script type="text/javascript" src="scripts/bootstrap.min.js"></script><script src="scripts/mathjax/es5/tex-chtml.js" id="MathJax-script" async></script><!--link(rel="stylesheet", type="text/css", href="scripts/katex/katex.min.css", crossorigin="anonymous")--><!--script(type="text/javascript", src="scripts/katex/katex.min.js", crossorigin="anonymous")--><!--script(type="text/javascript", src="scripts/katex/contrib/auto-render.min.js", crossorigin="anonymous", onload="renderMathInElement(document.body);")--><!--script(type="text/javascript", src="scripts/katex/contrib/copy-tex.min.js", crossorigin="anonymous")--><script type="text/javascript" src="scripts/general.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"></head><body><nav class="navbar navbar-expand-md fixed-top bg-dark navbar-dark"><div class="container-xl"><a class="navbar-brand" href="#"><img class="d-inline-block align-text-top" src="./img/logo.png" alt="" width="30" height="30"><text>Tutor</text></a><button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExample07XL" aria-controls="navbarsExample07XL" aria-expanded="false" aria-label="Toggle navigation"><span class="navbar-toggler-icon"></span></button><div class="collapse navbar-collapse" id="navbarsExample07XL"><ul class="navbar-nav mr-auto"><li class="nav-item"> <a class="nav-link" href="./index.html">Меню</a></li><li class="nav-item"> <a class="nav-link" href="./contacts.html">Контакты</a></li></ul></div></div></nav><main class="container" role="main"><div class="row"><div class="col-md-12"> <div class="card mb-4 shadow-sm"><div class="card-body"><h4 class="card-title">Добро пожаловать в Tutor!</h4><p class="card-text overflow-auto"><h5>Тригонометрия</h5><ul><li><a href="./tabularTrigonometry.html">Табличные значения тригонометрических углов</a></li><li><a href="./сastFormulas.html">Формулы приведения</a></li></ul><h5>Комплексные числа</h5><ul><li><a href="./additionСomplexNumbers.html">Сложение комплексных чисел в алгебраической форме</a></li><li><a href="./subtractionСomplexNumbers.html">Разность комплексных чисел в алгебраической форме</a></li></ul><h5>Дифференциальное исчисление</h5><ul><li><a href="./tabularIntegrals.html">Табличные интегралы</a></li><li><a>Простейшие приёмы интегрирования</a><ul><li><a href="./tabularIntegrals.html">Работа со степенями</a></li></ul></li><li><a>Основные методы интегрирования</a><ul><li><a href="./integralsTrigonometrySumProduct.html">Интегрирование триг. выражений: произведение в сумму</a></li><li><a href="./integrationTrigonometryExpressionsInPowers.html">Интегрирование триг. выражений в степени</a></li></ul></li></ul></p></div></div></div></div></main></body><footer><div class="container"> <p class="float-right"> <a href="#">Наверх </a></p><p>© 2022 <a href="https://github.com/Yaro2709">github</a></p></div></footer></html>
16 changes: 12 additions & 4 deletions templates/index.pug → index.pug
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ html(lang="ru")
a(href="./tabularTrigonometry.html") Табличные значения тригонометрических углов
li
a(href="./сastFormulas.html") Формулы приведения
h5 Комплексные числа
ul
li
a(href="./additionСomplexNumbers.html") Сложение комплексных чисел в алгебраической форме
li
a(href="./subtractionСomplexNumbers.html") Разность комплексных чисел в алгебраической форме
h5 Дифференциальное исчисление
ul
li
Expand All @@ -28,11 +34,13 @@ html(lang="ru")
ul
li
a(href="./tabularIntegrals.html") Работа со степенями
ul
li
a(href="./integralsTrigonometrySumProduct.html") Интегрирование триг. выражений: произведение в сумму
li
a(href="./integrationTrigonometryExpressionsInPowers.html") Интегрирование триг. выражений в степени
a Основные методы интегрирования
ul
li
a(href="./integralsTrigonometrySumProduct.html") Интегрирование триг. выражений: произведение в сумму
li
a(href="./integrationTrigonometryExpressionsInPowers.html") Интегрирование триг. выражений в степени



Expand Down
26 changes: 26 additions & 0 deletions multiplicationСomplexNumbers.pug
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
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 Формулы приведения
p.card-text.overflow-auto
module(id="task")
p
button.btn.btn-success(type="button", data-toggle="collapse", data-target="#tabularTrigonometryAnswer", aria-expanded="false", aria-controls="#tabularTrigonometryAnswer") Ответ
div.collapse(id="tabularTrigonometryAnswer")
div.card.card-body
result(id="answer")
script(type="text/javascript", src="scripts/BD/сastFormulas.js")



include ./templates/layout/footer.pug
139 changes: 139 additions & 0 deletions scripts/BD/additionСomplexNumbers.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
//Флаг шаблона
flag = module(1,1);
//Шаблоны
switch (flag) {
//Основные формулы
case 1:
VarA1 = module(-50,50);
VarB1 = module(-50,50);
VarA2 = module(-50,50);
VarB2 = module(-50,50);

VarA = VarA1 + VarA2;
VarB = VarB1 + VarB2;

textA1 = "";
if(VarA1 == 0){
textA1 = String.raw``;
}else if(VarA1 == 1){
textA1 = String.raw`1`;
}else{
textA1 = String.raw`${VarA1}`;
}

sign1 = "";
if(VarA1 == 0){
sign1 = String.raw``;
} else if((VarB1 > 0) && (VarA1 != 0)){
sign1 = String.raw`+`;
}else if(VarB1 == 0){
sign1 = String.raw``;
}else {
sign1 = String.raw``;
}

//если все значения нули, то итогове значение ноль
if((VarA1 == 0) && (VarB1 == 0)){
sign1 = String.raw`0`;
}

textB1 = "";
if(VarB1 == 0){
textB1 = String.raw``;
}else if(VarB1 == 1){
textB1 = String.raw`i`;
}else if(VarB1 == -1){
textB1 = String.raw`-i`;
}else{
textB1 = String.raw`${VarB1} i`;
}

textA2 = "";
if(VarA2 == 0){
textA2 = String.raw``;
}else if(VarA2 == 1){
textA2 = String.raw`1`;
}else{
textA2 = String.raw`${VarA2}`;
}

sign2 = "";
if(VarA2 == 0){
sign2 = String.raw``;
} else if((VarB2 > 0) && (VarA2 != 0)){
sign2 = String.raw`+`;
}else if(VarB2 == 0){
sign2 = String.raw``;
}else {
sign2 = String.raw``;
}

//если все значения нули, то итогове значение ноль
if((VarA2 == 0) && (VarB2 == 0)){
sign2 = String.raw`0`;
}

textB2 = "";
if(VarB2 == 0){
textB2 = String.raw``;
}else if(VarB2 == 1){
textB2 = String.raw`i`;
}else if(VarB2 == -1){
textB2 = String.raw`-i`;
}else{
textB2 = String.raw`${VarB2} i`;
}

textA = "";
if(VarA == 0){
textA = String.raw``;
}else if(VarA == 1){
textA = String.raw`1`;
}else{
textA = String.raw`${VarA}`;
}

sign= "";
if(VarA == 0){
sign = String.raw``;
} else if((VarB > 0) && (VarA != 0)){
sign = String.raw`+`;
}else if(VarB == 0){
sign = String.raw``;
}else {
sign = String.raw``;
}

//если все значения нули, то итогове значение ноль
if((VarA == 0) && (VarB == 0)){
sign = String.raw`0`;
}

textB = "";
if(VarB == 0){
textB = String.raw``;
}else if(VarB == 1){
textB = String.raw`i`;
}else if(VarB == -1){
textB = String.raw`-i`;
}else{
textB = String.raw`${VarB} i`;
}


task = String.raw`\begin{gather*}
z = z_1 + z_2 \\
z_1 = ${textA1} ${sign1} ${textB1} \\
z_2 = ${textA2} ${sign2} ${textB2}
\end{gather*}`;
answer = String.raw`\begin{gather*}
z = ${textA} ${sign} ${textB}
\end{gather*}`;
break;
//Дополнительные формулы
default:
alert( "400 Bad Request: value is undefined!" );
}
//Вывод
document.getElementById("task").innerHTML = task;
document.getElementById("answer").innerHTML = answer;
29 changes: 29 additions & 0 deletions scripts/BD/multiplicationСomplexNumbers.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
//Флаг шаблона
flag = module(1,1);
//Шаблоны
switch (flag) {
//Основные формулы
case 1:
VarA1 = module(-10,10);
VarB1 = module(-10,10);
VarA2 = module(-10,10);
VarB2 = module(-10,10);

VarA = VarA1 + VarA2;
VarB = VarB1 + VarB2;

task = String.raw`\begin{gather*}
z = z_1 + z_2 \\
z_1 = ${VarA1} + ${VarB1} i \\
z_2 = ${VarA2} + ${VarB2} i \end{gather*}`;
answer = String.raw`\begin{gather*}
z = ${VarA} + i ${VarB}
\end{gather*}`;
break;
//Дополнительные формулы
default:
alert( "400 Bad Request: value is undefined!" );
}
//Вывод
document.getElementById("task").innerHTML = task;
document.getElementById("answer").innerHTML = answer;
Loading

0 comments on commit fd3d84c

Please sign in to comment.