Skip to content

Commit

Permalink
Add 2 interactive examples for "Vector cot"
Browse files Browse the repository at this point in the history
Deploy
  • Loading branch information
VinhPhmCng committed Dec 15, 2023
1 parent f58557c commit b8812ce
Show file tree
Hide file tree
Showing 58 changed files with 1,278 additions and 283 deletions.
2 changes: 1 addition & 1 deletion .mapping.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"source/main.ptx": ["linear-algebra-for-dummies"], "source/frontmatter.ptx": ["frontmatter"], "source/chapter01/ch-so-thuc-va-vector-cot.ptx": ["ch-so-thuc-va-vector-cot"], "source/chapter01/sec-so-thuc-va-cac-tinh-chat.ptx": ["sec-so-thuc-va-cac-tinh-chat"], "source/chapter01/sec-vector-cot.ptx": ["sec-vector-cot"], "source/chapter01/sec-khong-gian-vector.ptx": ["sec-khong-gian-vector", "kinematics"], "source/chapter02/ch-ma-tran.ptx": ["ch-ma-tran"], "source/chapter02/sec-ma-tran.ptx": ["sec-ma-tran"], "source/chapter02/sec-cac-ma-tran-co-so.ptx": ["sec-cac-ma-tran-co-so"], "source/chapter02/sec-cac-phep-bien-doi-hang.ptx": ["sec-cac-phep-bien-doi-hang"], "source/chapter02/sec-ma-tran-hoan-vi.ptx": ["sec-ma-tran-hoan-vi"], "source/chapter02/sec-ma-tran-bac-thang.ptx": ["sec-ma-tran-bac-thang"], "source/chapter02/sec-tru-cua-hang-va-hang-cua-ma-tran.ptx": ["sec-tru-cua-hang-va-hang-cua-ma-tran"], "source/chapter03/ch-cac-phep-toan-doi-voi-ma-tran.ptx": ["ch-cac-phep-toan-doi-voi-ma-tran"], "source/chapter03/sec-tong-cua-hai-ma-tran.ptx": ["sec-tong-cua-hai-ma-tran"], "source/chapter03/sec-nhan-ma-tran-voi-mot-so.ptx": ["sec-nhan-ma-tran-voi-mot-so"], "source/chapter03/sec-nhan-hai-ma-tran.ptx": ["sec-nhan-hai-ma-tran"], "source/chapter03/sec-ma-tran-khoi.ptx": ["sec-ma-tran-khoi"], "source/chapter03/sec-nhan-ma-tran-theo-khoi.ptx": ["sec-nhan-ma-tran-theo-khoi"], "source/chapter04/ch-dinh-thuc.ptx": ["ch-dinh-thuc"], "source/chapter04/sec-dinh-thuc.ptx": ["sec-dinh-thuc"], "source/chapter04/sec-ma-tran-con-va-phan-phu-dai-so.ptx": ["sec-ma-tran-con-va-phan-phu-dai-so"], "source/chapter04/sec-tinh-dinh-thuc.ptx": ["sec-tinh-dinh-thuc"], "source/chapter05/ch-giai-he-phuong-trinh-tuyen-tinh.ptx": ["ch-giai-he-phuong-trinh-tuyen-tinh"], "source/chapter05/sec-phuong-phap-khu-gauss.ptx": ["sec-phuong-phap-khu-gauss"], "source/chapter05/sec-phuong-phap-cramer-doi-voi-he-phuong-trinh-co-so-phuong-trinh-bang-so-an.ptx": ["sec-phuong-phap-cramer-doi-voi-he-phuong-trinh-co-so-phuong-trinh-bang-so-an"], "source/chapter05/sec-mot-so-ung-dung.ptx": ["sec-mot-so-ung-dung"], "source/chapter06/ch-phan-tich-ma-tran.ptx": ["ch-phan-tich-ma-tran"], "source/chapter06/sec-phan-tich-a-lu.ptx": ["sec-phan-tich-a-lu"], "source/chapter06/sec-phan-tich-a-cr.ptx": ["sec-phan-tich-a-cr"], "source/chapter06/sec-ma-tran-nghich-dao.ptx": ["sec-ma-tran-nghich-dao"], "source/chapter06/sec-ung-dung-de-giai-he-phuong-trinh-tuyen-tinh.ptx": ["sec-ung-dung-de-giai-he-phuong-trinh-tuyen-tinh"], "source/backmatter.ptx": ["backmatter"]}
{"source/main.ptx": ["linear-algebra-for-dummies"], "source/frontmatter.ptx": ["frontmatter"], "source/chapter01/ch-so-thuc-va-vector-cot.ptx": ["ch-so-thuc-va-vector-cot"], "source/chapter01/sec-so-thuc-va-cac-tinh-chat.ptx": ["sec-so-thuc-va-cac-tinh-chat"], "source/chapter01/sec-vector-cot.ptx": ["sec-vector-cot", "interactive-vector2d", "interactive-vector3d"], "source/chapter01/sec-khong-gian-vector.ptx": ["sec-khong-gian-vector", "kinematics", "learn-jsxgraph", "test-online-geogebra", "test-geogebra", "interactive-vector3d-geogebra", "interactive-my-vector3d-geogebra"], "source/chapter02/ch-ma-tran.ptx": ["ch-ma-tran"], "source/chapter02/sec-ma-tran.ptx": ["sec-ma-tran"], "source/chapter02/sec-cac-ma-tran-co-so.ptx": ["sec-cac-ma-tran-co-so"], "source/chapter02/sec-cac-phep-bien-doi-hang.ptx": ["sec-cac-phep-bien-doi-hang"], "source/chapter02/sec-ma-tran-hoan-vi.ptx": ["sec-ma-tran-hoan-vi"], "source/chapter02/sec-ma-tran-bac-thang.ptx": ["sec-ma-tran-bac-thang"], "source/chapter02/sec-tru-cua-hang-va-hang-cua-ma-tran.ptx": ["sec-tru-cua-hang-va-hang-cua-ma-tran"], "source/chapter03/ch-cac-phep-toan-doi-voi-ma-tran.ptx": ["ch-cac-phep-toan-doi-voi-ma-tran"], "source/chapter03/sec-tong-cua-hai-ma-tran.ptx": ["sec-tong-cua-hai-ma-tran"], "source/chapter03/sec-nhan-ma-tran-voi-mot-so.ptx": ["sec-nhan-ma-tran-voi-mot-so"], "source/chapter03/sec-nhan-hai-ma-tran.ptx": ["sec-nhan-hai-ma-tran"], "source/chapter03/sec-ma-tran-khoi.ptx": ["sec-ma-tran-khoi"], "source/chapter03/sec-nhan-ma-tran-theo-khoi.ptx": ["sec-nhan-ma-tran-theo-khoi"], "source/chapter04/ch-dinh-thuc.ptx": ["ch-dinh-thuc"], "source/chapter04/sec-dinh-thuc.ptx": ["sec-dinh-thuc"], "source/chapter04/sec-ma-tran-con-va-phan-phu-dai-so.ptx": ["sec-ma-tran-con-va-phan-phu-dai-so"], "source/chapter04/sec-tinh-dinh-thuc.ptx": ["sec-tinh-dinh-thuc"], "source/chapter05/ch-giai-he-phuong-trinh-tuyen-tinh.ptx": ["ch-giai-he-phuong-trinh-tuyen-tinh"], "source/chapter05/sec-phuong-phap-khu-gauss.ptx": ["sec-phuong-phap-khu-gauss"], "source/chapter05/sec-phuong-phap-cramer-doi-voi-he-phuong-trinh-co-so-phuong-trinh-bang-so-an.ptx": ["sec-phuong-phap-cramer-doi-voi-he-phuong-trinh-co-so-phuong-trinh-bang-so-an"], "source/chapter05/sec-mot-so-ung-dung.ptx": ["sec-mot-so-ung-dung"], "source/chapter06/ch-phan-tich-ma-tran.ptx": ["ch-phan-tich-ma-tran"], "source/chapter06/sec-phan-tich-a-lu.ptx": ["sec-phan-tich-a-lu"], "source/chapter06/sec-phan-tich-a-cr.ptx": ["sec-phan-tich-a-cr"], "source/chapter06/sec-ma-tran-nghich-dao.ptx": ["sec-ma-tran-nghich-dao"], "source/chapter06/sec-ung-dung-de-giai-he-phuong-trinh-tuyen-tinh.ptx": ["sec-ung-dung-de-giai-he-phuong-trinh-tuyen-tinh"], "source/backmatter.ptx": ["backmatter"]}
2 changes: 1 addition & 1 deletion backmatter-2.html
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ <h2 class="search-results-heading">Search Results: </h2>
\newcommand{\bmat}[1]{\begin{bmatrix}#1\end{bmatrix}}
\newcommand{\pmat}[1]{\begin{pmatrix}#1\end{pmatrix}}
\newcommand{\amat}[1]{\left\langle\begin{matrix}#1\end{matrix}\right\rangle}
\newcommand{\hvec}[1]{\bs{[}\begin{matrix}#1\end{matrix}\bs{]}}
\newcommand{\hvec}[1]{\bs{[}\begin{matrix}#1\end{matrix}\bs{]}}

\newcommand{\smat}[1]{\begin{smallmatrix}#1\end{smallmatrix}}
\newcommand{\sbmat}[1]{\begin{bsmallmatrix}#1\end{bsmallmatrix}}
Expand Down
2 changes: 1 addition & 1 deletion backmatter.html
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ <h2 class="search-results-heading">Search Results: </h2>
\newcommand{\bmat}[1]{\begin{bmatrix}#1\end{bmatrix}}
\newcommand{\pmat}[1]{\begin{pmatrix}#1\end{pmatrix}}
\newcommand{\amat}[1]{\left\langle\begin{matrix}#1\end{matrix}\right\rangle}
\newcommand{\hvec}[1]{\bs{[}\begin{matrix}#1\end{matrix}\bs{]}}
\newcommand{\hvec}[1]{\bs{[}\begin{matrix}#1\end{matrix}\bs{]}}

\newcommand{\smat}[1]{\begin{smallmatrix}#1\end{smallmatrix}}
\newcommand{\sbmat}[1]{\begin{bsmallmatrix}#1\end{bsmallmatrix}}
Expand Down
2 changes: 1 addition & 1 deletion ch-cac-phep-toan-doi-voi-ma-tran.html
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ <h2 class="search-results-heading">Search Results: </h2>
\newcommand{\bmat}[1]{\begin{bmatrix}#1\end{bmatrix}}
\newcommand{\pmat}[1]{\begin{pmatrix}#1\end{pmatrix}}
\newcommand{\amat}[1]{\left\langle\begin{matrix}#1\end{matrix}\right\rangle}
\newcommand{\hvec}[1]{\bs{[}\begin{matrix}#1\end{matrix}\bs{]}}
\newcommand{\hvec}[1]{\bs{[}\begin{matrix}#1\end{matrix}\bs{]}}

\newcommand{\smat}[1]{\begin{smallmatrix}#1\end{smallmatrix}}
\newcommand{\sbmat}[1]{\begin{bsmallmatrix}#1\end{bsmallmatrix}}
Expand Down
2 changes: 1 addition & 1 deletion ch-dinh-thuc.html
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ <h2 class="search-results-heading">Search Results: </h2>
\newcommand{\bmat}[1]{\begin{bmatrix}#1\end{bmatrix}}
\newcommand{\pmat}[1]{\begin{pmatrix}#1\end{pmatrix}}
\newcommand{\amat}[1]{\left\langle\begin{matrix}#1\end{matrix}\right\rangle}
\newcommand{\hvec}[1]{\bs{[}\begin{matrix}#1\end{matrix}\bs{]}}
\newcommand{\hvec}[1]{\bs{[}\begin{matrix}#1\end{matrix}\bs{]}}

\newcommand{\smat}[1]{\begin{smallmatrix}#1\end{smallmatrix}}
\newcommand{\sbmat}[1]{\begin{bsmallmatrix}#1\end{bsmallmatrix}}
Expand Down
2 changes: 1 addition & 1 deletion ch-giai-he-phuong-trinh-tuyen-tinh.html
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ <h2 class="search-results-heading">Search Results: </h2>
\newcommand{\bmat}[1]{\begin{bmatrix}#1\end{bmatrix}}
\newcommand{\pmat}[1]{\begin{pmatrix}#1\end{pmatrix}}
\newcommand{\amat}[1]{\left\langle\begin{matrix}#1\end{matrix}\right\rangle}
\newcommand{\hvec}[1]{\bs{[}\begin{matrix}#1\end{matrix}\bs{]}}
\newcommand{\hvec}[1]{\bs{[}\begin{matrix}#1\end{matrix}\bs{]}}

\newcommand{\smat}[1]{\begin{smallmatrix}#1\end{smallmatrix}}
\newcommand{\sbmat}[1]{\begin{bsmallmatrix}#1\end{bsmallmatrix}}
Expand Down
2 changes: 1 addition & 1 deletion ch-ma-tran.html
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ <h2 class="search-results-heading">Search Results: </h2>
\newcommand{\bmat}[1]{\begin{bmatrix}#1\end{bmatrix}}
\newcommand{\pmat}[1]{\begin{pmatrix}#1\end{pmatrix}}
\newcommand{\amat}[1]{\left\langle\begin{matrix}#1\end{matrix}\right\rangle}
\newcommand{\hvec}[1]{\bs{[}\begin{matrix}#1\end{matrix}\bs{]}}
\newcommand{\hvec}[1]{\bs{[}\begin{matrix}#1\end{matrix}\bs{]}}

\newcommand{\smat}[1]{\begin{smallmatrix}#1\end{smallmatrix}}
\newcommand{\sbmat}[1]{\begin{bsmallmatrix}#1\end{bsmallmatrix}}
Expand Down
2 changes: 1 addition & 1 deletion ch-phan-tich-ma-tran.html
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ <h2 class="search-results-heading">Search Results: </h2>
\newcommand{\bmat}[1]{\begin{bmatrix}#1\end{bmatrix}}
\newcommand{\pmat}[1]{\begin{pmatrix}#1\end{pmatrix}}
\newcommand{\amat}[1]{\left\langle\begin{matrix}#1\end{matrix}\right\rangle}
\newcommand{\hvec}[1]{\bs{[}\begin{matrix}#1\end{matrix}\bs{]}}
\newcommand{\hvec}[1]{\bs{[}\begin{matrix}#1\end{matrix}\bs{]}}

\newcommand{\smat}[1]{\begin{smallmatrix}#1\end{smallmatrix}}
\newcommand{\sbmat}[1]{\begin{bsmallmatrix}#1\end{bsmallmatrix}}
Expand Down
2 changes: 1 addition & 1 deletion ch-so-thuc-va-vector-cot.html
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ <h2 class="search-results-heading">Search Results: </h2>
\newcommand{\bmat}[1]{\begin{bmatrix}#1\end{bmatrix}}
\newcommand{\pmat}[1]{\begin{pmatrix}#1\end{pmatrix}}
\newcommand{\amat}[1]{\left\langle\begin{matrix}#1\end{matrix}\right\rangle}
\newcommand{\hvec}[1]{\bs{[}\begin{matrix}#1\end{matrix}\bs{]}}
\newcommand{\hvec}[1]{\bs{[}\begin{matrix}#1\end{matrix}\bs{]}}

\newcommand{\smat}[1]{\begin{smallmatrix}#1\end{smallmatrix}}
\newcommand{\sbmat}[1]{\begin{bsmallmatrix}#1\end{bsmallmatrix}}
Expand Down
73 changes: 0 additions & 73 deletions external/code/collision.js

This file was deleted.

Binary file added external/code/geogebra/vector3d.ggb
Binary file not shown.
46 changes: 0 additions & 46 deletions external/code/jsxmatrix1.js

This file was deleted.

91 changes: 0 additions & 91 deletions external/code/jsxtest.js

This file was deleted.

104 changes: 104 additions & 0 deletions external/code/vector2d.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
var boxDimensions = [-8, 6, 6, -6];

const board = JXG.JSXGraph.initBoard(
'vector2d',
{
boundingbox: boxDimensions,
axis: true,
showNavigation: false,
showCopyright: true,
},
);


var sliderX = board.create(
'slider',
[
[-6.5, -3.5],
[-4.5, -3.5],
[-4, 1, 4],
],
{
name: 'x',
},
);

var sliderY = board.create(
'slider',
[
[-6.5, -4.5],
[-4.5, -4.5],
[-4, 1, 4],
],
{
name: 'y',
},
);

var checkboxShowArrow = board.create(
'checkbox',
[-7, 5, 'Arrow / Point'],
);


var pointOrigin = board.create(
'point',
[0.0, 0.0],
{
name: 'O',
fixed: true,
size: 1,
},
);

var pointVector = board.create(
'point',
[
function() {return sliderX.Value();},
function() {return sliderY.Value();},
],
{
name: '',
visible: true,
},
);

var arrowVector = board.create(
'arrow',
[pointOrigin, pointVector],
{
visible: false,
},
);


JXG.addEvent(
checkboxShowArrow.rendNodeCheckbox,
'change',
function() {
if (this.Value()) {
arrowVector.setAttribute({
visible: true,
});
pointVector.setAttribute({
visible: false,
});
// checkboxShowArrow.setLabelText("Display: Arrow");
} else {
arrowVector.setAttribute({
visible: false,
});
pointVector.setAttribute({
visible: true,
});
// checkboxShowArrow.setLabelText("Display: Point");
}
},
checkboxShowArrow,
);


// Doesn't work - I don't know why lol
/* checkboxShowArrow.setAttribute({
checked: true,
}); */
Loading

0 comments on commit b8812ce

Please sign in to comment.