@zushah/chalkboard 1.6.0 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,7 +1,37 @@
1
1
  # Chalkboard changelog
2
2
  All notable changes of every update of the Chalkboard library are recorded in this file.
3
3
 
4
- ## [v1.6.0](https://www.github.com/Zushah/Chalkboard/releases/tag/v1.6.0) - 12/25/2023
4
+ ## [v1.7.0 Descartes](https://www.github.com/Zushah/Chalkboard/releases/tag/v1.7.0) - 01/01/2024
5
+ The ninth release of the Chalkboard library.
6
+ Commits: [`v1.6.0...v1.7.0`](https://www.github.com/Zushah/Chalkboard/compare/v1.6.0...v1.7.0)
7
+ - Added tensors (multidimensional multidimensional matrices, or n-dimensional arrays) with 29 commands in the new `tens` category
8
+ - Added 12 more matrix commands: copying, resizing, five new primitive matrices (exchange, shift, binomial, Hilbert, Lehmer), concatenating, multiplying with vectors, Kronecker sum, Kronecker product, and converting to a tensor
9
+ - Added `.copy` commands for complex numbers, quaternions, and vectors
10
+ - Added `stat.toTensor` to convert an array to a tensor
11
+ - Added quaternion division with `quat.div`
12
+ - Added `PARSEPREFIX` as a Chalkboard global which makes it easier to add custom functions to Chalkboard functions than the `init` parameter in `real.parse` and `comp.parse`
13
+ - Added `CONTEXT` as a Chalkboard global to replace the removed `plot.CONTEXT`
14
+ - Removed `plot.CONTEXT`
15
+ - Changed all of the `plot` commands, `LOGO`, and `geom.line3D` to use the new `CONTEXT` constant instead of `plot.CONTEXT`
16
+ - Changed all of the `plot` commands to use `config.x` and `config.y` to determine their position on the canvas instead of `config.origin`
17
+ - Changed all of the `plot` commands' initialization of the `config` parameter to be two less lines long
18
+ - Changed `matr.plot` to have a `config.domain` option
19
+ - Changed `real.parse` and `comp.parse` to no longer have an `init` parameter
20
+ - Changed many of the `comp` and `quat` commands to accept regular numbers (not just complex numbers and quaternions) as inputs
21
+ - Changed `comp.new` and `quat.new` to be able to accept only one argument as the real part and fill the imaginary part(s) with zeroes
22
+ - Changed `stat.eq`, `stat.ineq`, `stat.lt`, and `stat.gt` to use `Array.isArray` instead of `.constructor === Array`
23
+ - Changed `stat.toVector` to have an `index` parameter to change the index of the array to start at when defining a vector
24
+ - Changed all of the integration commands (`calc.fxdx`, `calc.fxydxdy`, `calc.fds`, `calc.frds`, `calc.fnds`, and `calc.fzdz`) to use `inf` and `sup` for the bounds in their parameters instead of `a`, `b`, `c`, and `d`
25
+ - Changed `matr.new` to accept one array of arrays (already-constructed matrix) as an input instead of only multiple arrays (to use as rows to construct a matrix)
26
+ - Changed the order of `matr.random`'s parameters
27
+ - Changed `matr.fill`, `matr.empty`, and `matr.random` to make square matrices with the size inputted into the `rows` parameter if nothing is inputted into the `cols` parameter
28
+ - Changed `matr.LUdecomp` and `matr.QRdecomp` to use `matr.fill` instead of `matr.zero` composed with `matr.empty`
29
+ - Fixed `plot.matr` which hadn't been working for who knows how long because of a critical misspelling (`vec2.plot` instead of `plot.vec2`)
30
+ - Fixed (rewrote) `numb.binomial` which kept giving "callstack size exceeded" errors for some reason
31
+ - Fixed (rewrote) `matr.QRdecomp` thanks to [@JentGent](https://www.github.com/JentGent)'s [implementation](https://www.github.com/JentGent/linalg/blob/main/linalg.js#L519)
32
+
33
+
34
+ ## [v1.6.0 Fermat](https://www.github.com/Zushah/Chalkboard/releases/tag/v1.6.0) - 12/25/2023
5
35
  The eighth release of the Chalkboard library.
6
36
  Commits: [`v1.5.0...v1.6.0`](https://www.github.com/Zushah/Chalkboard/compare/v1.5.0...v1.6.0)
7
37
  - Added a new type of function: the inverse function (`type` of `"inve"`)
@@ -27,7 +57,7 @@ Commits: [`v1.5.0...v1.6.0`](https://www.github.com/Zushah/Chalkboard/compare/v1
27
57
  - Fixed the default domain for `plot.function` which was incorrectly using the domain for domain colorings instead of normal graphs
28
58
 
29
59
 
30
- ## [v1.5.0](https://www.github.com/Zushah/Chalkboard/releases/tag/v1.5.0) - 12/18/2023
60
+ ## [v1.5.0 Cauchy](https://www.github.com/Zushah/Chalkboard/releases/tag/v1.5.0) - 12/18/2023
31
61
  The seventh release of the Chalkboard library.
32
62
  Commits: [`v1.4.0...v1.5.0`](https://www.github.com/Zushah/Chalkboard/compare/v1.4.0...v1.5.0)
33
63
  - Added Chalkboard as an npm package, so now it can be used on the server-side just like the client side
@@ -49,7 +79,7 @@ Commits: [`v1.4.0...v1.5.0`](https://www.github.com/Zushah/Chalkboard/compare/v1
49
79
  - Fixed the error messages in `calc.dfdrt` which were misspelled
50
80
  - Fixed `plot.field` to include the upper bounds in its domain
51
81
 
52
- ## [v1.4.0](https://www.github.com/Zushah/Chalkboard/releases/tag/v1.4.0) - 12/11/2023
82
+ ## [v1.4.0 Herschel](https://www.github.com/Zushah/Chalkboard/releases/tag/v1.4.0) - 12/11/2023
53
83
  The sixth release of the Chalkboard library.
54
84
  Commits: [`v1.3.1...v1.4.0`](https://www.github.com/Zushah/Chalkboard/compare/v1.3.1...v1.4.0)
55
85
  - Added many new commands for arrays: creating an array of random numbers, calculating different types of the norm (and the squared norm) of an array, calculating the normalized array, calculating the array that has the numbers that are equal to, greater than (or equal to), less than (or equal to), or some compound inequality of another number or array, calculating the skewness and kurtosis of an array, calculating the different quartiles of an array, and converting an array to a vector, matrix, object, string, or printing it in the console
@@ -69,14 +99,14 @@ Commits: [`v1.3.1...v1.4.0`](https://www.github.com/Zushah/Chalkboard/compare/v1
69
99
  - Changed `calc.frdt` to also work for three-dimensional (instead of only two-dimensional) vector fields and parametric curves
70
100
  - Fixed `calc.dfrdt` which didn't work due to a slight misspelling in an `if()` statement
71
101
 
72
- ## [v1.3.1](https://www.github.com/Zushah/Chalkboard/releases/tag/v1.3.1) - 12/04/2023
102
+ ## [v1.3.1 Heaviside Patch](https://www.github.com/Zushah/Chalkboard/releases/tag/v1.3.1) - 12/04/2023
73
103
  The fifth release of the Chalkboard library.
74
104
  Commits: [`v1.3.0...v1.3.1`](https://www.github.com/Zushah/Chalkboard/compare/v1.3.0...v1.3.1)
75
105
  - Fixed `matr.translator` which was misspelled
76
106
  - Fixed `matr.rotator` which didn't work for two-dimensional rotations and was also misspelled
77
107
  - Fixed `calc.grad` which didn't work for vector fields because of another misspelling
78
108
 
79
- ## [v1.3.0](https://www.github.com/Zushah/Chalkboard/releases/tag/v1.3.0) - 12/04/2023
109
+ ## [v1.3.0 Heaviside](https://www.github.com/Zushah/Chalkboard/releases/tag/v1.3.0) - 12/04/2023
80
110
  The fourth release of the Chalkboard library.
81
111
  Commits: [`v1.2.0...v1.3.0`](https://www.github.com/Zushah/Chalkboard/compare/v1.2.0...v1.3.0)
82
112
  - Added multivariable calculus, with commands for directional differentiation, multivariable chain rule, gradient (partial differentiation), double gradient (second-order partial differentiation), divergence, curl, double integration, line/surface integration, arc length, surface area, and curvature
@@ -99,7 +129,7 @@ Commits: [`v1.2.0...v1.3.0`](https://www.github.com/Zushah/Chalkboard/compare/v1
99
129
  - Changed the name of `calc.average` to `calc.mean`
100
130
  - Fixed `matr.invert` returning `NaN` values when `0` is on the diagonal of a matrix, thanks to [@bhavjitChauhan](https://www.github.com/bhavjitChauhan).
101
131
 
102
- ## [v1.2.0](https://www.github.com/Zushah/Chalkboard/releases/tag/v1.2.0) - 11/27/2023
132
+ ## [v1.2.0 Cayley](https://www.github.com/Zushah/Chalkboard/releases/tag/v1.2.0) - 11/27/2023
103
133
  The third release of the Chalkboard library.
104
134
  Commits: [`v1.1.0...v1.2.0`](https://www.github.com/Zushah/Chalkboard/compare/v1.1.0...v1.2.0)
105
135
  - Added new matrix commands for the trace of a matrix, the row space of a matrix, the column space, and null space, the exponentation, the row Echelon form (Gaussian elimination), solving systems of linear equations, and conversion of a matrix to an object
@@ -113,7 +143,7 @@ Commits: [`v1.1.0...v1.2.0`](https://www.github.com/Zushah/Chalkboard/compare/v1
113
143
  - Changed `numb.Gaussian` to use `while(typeof x === "undefined")` instead of `while(true)`
114
144
  - Fixed the `vec2.magset` and `vec3.magset` commands which would return vectors in the wrong dimensions
115
145
 
116
- ## [v1.1.0](https://www.github.com/Zushah/Chalkboard/releases/tag/v1.1.0) - 11/13/2023
146
+ ## [v1.1.0 Riemann](https://www.github.com/Zushah/Chalkboard/releases/tag/v1.1.0) - 11/13/2023
117
147
  The second release of the Chalkboard library.
118
148
  Commits: [`v1.0.0...v1.1.0`](https://www.github.com/Zushah/Chalkboard/compare/v1.0.0...v1.1.0)
119
149
  - Added `numb.prime` to calculate the nth prime number, `numb.nextPrime` to calculate the next prime number, and `numb.primeGap` to calculate the prime gap with an interval
@@ -132,6 +162,6 @@ Commits: [`v1.0.0...v1.1.0`](https://www.github.com/Zushah/Chalkboard/compare/v1
132
162
  - Changed the name of the `position` parameter in `stat.Gaussian` to `mean`
133
163
  - Changed the name of `numb.prime` (the command that checks if a number is prime) to `numb.isPrime`, so parts of `numb.primeArr` and `prime.compositeArr` had to be changed, too
134
164
 
135
- ## [v1.0.0](https://www.github.com/Zushah/Chalkboard/releases/tag/v1.0.0) - 11/06/2023
165
+ ## [v1.0.0 Euclid](https://www.github.com/Zushah/Chalkboard/releases/tag/v1.0.0) - 11/06/2023
136
166
  The first release of the Chalkboard library.
137
167
  Commits: [`v1.0.0...main`](https://www.github.com/Zushah/Chalkboard/compare/v1.0.0...main)
package/LICENSE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2023 Zushah
3
+ Copyright (c) 2023-2024 Zushah
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1,10 +1,12 @@
1
1
  <p align="center"><a href="https://www.github.com/Zushah/Chalkboard"><img src="./assets/Chalkboard-logo.png" width="50%"></a></p>
2
2
  <p align="center">
3
- <a href="https://www.github.com/Zushah/Chalkboard/releases/tag/v1.6.0"><img src="https://img.shields.io/github/v/release/Zushah/Chalkboard" alt="Latest release"></a>
4
- <a href="https://www.codefactor.io/repository/github/zushah/chalkboard"><img src="https://www.codefactor.io/repository/github/zushah/chalkboard/badge" alt="CodeFactor grade"></a>
5
- <a href="https://www.npmjs.com/package/@zushah/chalkboard"><img src="https://img.shields.io/npm/dt/@zushah/chalkboard" alt="npm downloads"></a>
6
- <a href="https://www.github.com/Zushah/Chalkboard/blob/main/LICENSE.md"><img src="https://img.shields.io/badge/license-MIT-yellow" alt="MIT License"></a>
7
- <a href="https://www.jsdelivr.com/package/gh/Zushah/Chalkboard"><img src="https://data.jsdelivr.com/v1/package/gh/Zushah/Chalkboard/badge" alt="jsDelivr requests"></a>
3
+ <a href="https://www.github.com/Zushah/Chalkboard/releases/tag/v1.7.0"><img src="https://img.shields.io/badge/release-v1.7.0_Descartes-blueviolet?logo=github&logoColor=white" alt="Latest release"></a>
4
+ <a href="https://www.codefactor.io/repository/github/zushah/chalkboard"><img src="https://img.shields.io/codefactor/grade/github/Zushah/Chalkboard?color=blue&logo=codefactor&logoColor=white" alt="CodeFactor grade"></a>
5
+ <a href="https://bundlephobia.com/package/@zushah/chalkboard@1.7.0"><img src="https://img.shields.io/bundlephobia/min/%40zushah/chalkboard?color=darkgreen&logo=files&logoColor=white" alt="Minified size"></a>
6
+ <a href="https://www.npmjs.com/package/@zushah/chalkboard"><img src="https://img.shields.io/npm/dm/%40zushah/chalkboard?logo=npm&logoColor=white" alt="npm downloads"></a>
7
+ <a href="https://www.github.com/Zushah/Chalkboard/blob/main/LICENSE.md"><img src="https://img.shields.io/github/license/Zushah/Chalkboard?color=yellow&logo=opensourceinitiative&logoColor=white" alt="MIT License"></a>
8
+ <a href="https://en.wikipedia.org/wiki/JavaScript"><img src="https://img.shields.io/github/languages/top/Zushah/Chalkboard?color=orange&logo=javascript&logoColor=white" alt="Written in JavaScript"></a>
9
+ <a href="https://www.jsdelivr.com/package/gh/Zushah/Chalkboard"><img src="https://img.shields.io/jsdelivr/gh/hm/Zushah/Chalkboard?color=crimson&logo=jsdelivr&logoColor=white" alt="jsDelivr requests"></a>
8
10
  <br>
9
11
  <a href="https://zushah.github.io/Chalkboard/home.html">https://zushah.github.io/Chalkboard/home.html</a>
10
12
  </p>
@@ -21,28 +23,28 @@
21
23
  </ol>
22
24
 
23
25
  # About
24
- The Chalkboard library is a JavaScript namespace that provides a plethora of both practical and abstract mathematical functionalities for its user. It was developed by [Zushah](https://www.github.com/Zushah) during 2022 and 2023 and then [released](https://www.github.com/Zushah/Chalkboard/releases/tag/v1.0.0) on November 6, 2023. As per the latest release of [v1.6.0](https://www.github.com/Zushah/Chalkboard/releases/tag/v1.6.0), Chalkboard has 444 different commands. The library is available for regular JavaScript on both the client-side and the server-side as well as [Proccesing.js](https://www.processing.org/) (fully compatible with [Khan Academy](https://www.khanacademy.org/cs/chalkboard/6708642430369792)). Chalkboard's website can be visited [here](https://zushah.github.io/Chalkboard/home.html).
26
+ The Chalkboard library is a JavaScript namespace that provides a plethora of both practical and abstract mathematical functionalities for its user. It was developed by [Zushah](https://www.github.com/Zushah) during 2022 and 2023 and then [released](https://www.github.com/Zushah/Chalkboard/releases/tag/v1.0.0) on November 6, 2023. As per the latest release of [v1.7.0 Descartes](https://www.github.com/Zushah/Chalkboard/releases/tag/v1.7.0), Chalkboard has 492 different commands. The library is available for regular JavaScript on both the client-side and the server-side as well as [Proccesing.js](https://www.processing.org/) (fully compatible with [Khan Academy](https://www.khanacademy.org/cs/chalkboard/6708642430369792)). Chalkboard's website can be visited [here](https://zushah.github.io/Chalkboard/home.html).
25
27
 
26
28
  # Installation
27
29
  If your JavaScript project is being run on the client-side within a webpage, you can install Chalkboard with this HTML tag:
28
30
  ```html
29
- <script src="https://cdn.jsdelivr.net/gh/Zushah/Chalkboard@1.6.0/src/Chalkboard.min.js"></script>
31
+ <script src="https://cdn.jsdelivr.net/gh/Zushah/Chalkboard@1.7.0/src/Chalkboard.min.js"></script>
30
32
  ```
31
33
  If your JavaScript project is being run on the server-side within the [Node.js](https://nodejs.org/en) environment, you can install Chalkboard with this console command:
32
34
  ```bash
33
- npm install @zushah/chalkboard@1.6.0
35
+ npm install @zushah/chalkboard@1.7.0
34
36
  ```
35
- Alternatively, you can simply download the [latest release](https://www.github.com/Zushah/Chalkboard/releases/tag/v1.6.0) and put the relevant files in your project's directory.
37
+ Alternatively, you can simply download the [latest release](https://www.github.com/Zushah/Chalkboard/releases/tag/v1.7.0) and put the relevant files in your project's directory.
36
38
 
37
39
  More methods and details about installing Chalkboard can be read [here](https://zushah.github.io/Chalkboard/installation.html).
38
40
 
39
41
  # Documentation
40
- These are all thirteen Chalkboard categories with a brief description of what they're mostly about, and listed in the order they appear in the source code:
42
+ These are all fourteen Chalkboard categories with a brief description of what they're mostly about, and listed in the order they appear in the source code:
41
43
  - `numb` - Number-theory-related operations
42
44
  - `real` - Real number and real function operations
43
45
  - `comp` - Complex number and complex function operations
44
46
  - `quat` - Quaternion operations
45
- - `plot` - Plotting functions, complex numbers, vectors, matrices, and statistical graphs
47
+ - `plot` - Plotting real and complex functions, complex numbers, vectors, matrices, and statistical graphs
46
48
  - `geom` - Geometric formulae operations
47
49
  - `trig` - Trigonometric function operations
48
50
  - `stat` - Statistical array operations
@@ -50,13 +52,16 @@ These are all thirteen Chalkboard categories with a brief description of what th
50
52
  - `vec3` - Three-dimensional vector operations
51
53
  - `vec4` - Four-dimensional vector operations
52
54
  - `matr` - Multidimensional matrix operations
53
- - `calc` - Several-variable calculus operations
55
+ - `tens` - Tensor (multidimensional multidimensional matrix) operations
56
+ - `calc` - Single/multi-variable real/complex-valued calculus operations
54
57
 
55
- There are also four "global" commands in Chalkboard, which are:
58
+ There are also six "global" commands and constants in Chalkboard, which are:
56
59
  - `README()` - Prints basic information about Chalkboard in the console
57
60
  - `LOGO()` - Draws the Chalkboard logo
58
- - `PI()` - Computes the number pi
61
+ - `PI()` - Computes the number π
59
62
  - `E()` - Computes the number e
63
+ - `CONTEXT` - The JavaScript canvas rendering context to use for plotting
64
+ - `PARSEPREFIX` - Used for adding custom functions to the Chalkboard parser
60
65
 
61
66
  The comprehensive Chalkboard documentation can be visited [here](https://zushah.github.io/Chalkboard/documentation.html).
62
67
 
@@ -67,14 +72,11 @@ Chalkboard.category.command(parameters);
67
72
  ```
68
73
  Here is some code that shows off only a few features of Chalkboard:
69
74
  ```js
70
- const cb = Chalkboard; // Chalkboard is a nice name but it's also long
71
- /*
72
- Note that this code is written on the client-side
73
- You can write all the same code on the server-side, too, but you would have to replace the line above with:
74
- import cb from "@zushah/chalkboard";
75
- OR
76
- const cb = require("@zushah/chalkboard");
77
- */
75
+ const cb = Chalkboard; // Initialize in a browser
76
+ // or
77
+ const cb = require("@zushah/chalkboard"); // Initialize in Node with CommonJS
78
+ // or
79
+ import cb from "@zushah/chalkboard"; // Initiialize in Node with ES Modules
78
80
 
79
81
  let f = cb.real.function("Math.cos(2 * x)"); // f(x) = cos(2x)
80
82
  let dfdx = cb.calc.dfdx(f, 2); // Derivative of f at x = 0
@@ -112,6 +114,12 @@ let m = cb.matr.new([0, 1, 1, 1, 1], // m is a 5x5 matrix
112
114
  let mi = cb.matr.invert(m); // mi is the inverse of m
113
115
  let mmi = cb.matr.mul(m, mi); // mmi is the product of m and mi
114
116
  cb.matr.print(mmi); // Prints mmi in the console
117
+
118
+ let t = cb.tens.new([[1, 2], [3, 4]], // t is a 2x2x2 (rank-3) tensor
119
+ [[5, 6], [7, 8]]);
120
+ let tt = cb.tens.mul(t, t); // tt is a 2x2x2x2x2x2 (rank-6) tensor
121
+ let ttm = cb.tens.resize(tt, 8, 8); // ttm is an 8x8 matrix (or rank-2 tensor)
122
+ cb.tens.print(tt); // Prints tt in the console just to see what it looks like for fun
115
123
  ```
116
124
  More examples that are more interesting can be seen [here](https://zushah.github.io/Chalkboard/examples.html) with their source code [here](https://www.github.com/Zushah/Chalkboard/tree/main/examples).
117
125
 
@@ -127,9 +135,10 @@ The changelog can be read [here](https://www.github.com/Zushah/Chalkboard/blob/m
127
135
 
128
136
  The Chalkboard library is available under the [MIT License](https://www.github.com/Zushah/Chalkboard/blob/main/LICENSE.md).
129
137
 
130
- # Acknowledgements
131
- Thanks to [Bhavjit Chauhan](https://www.github.com/bhavjitChauhan) for his [contribution](https://www.github.com/Zushah/Chalkboard/pull/1) to [v1.3.0](https://www.github.com/Zushah/Chalkboard/releases/tag/v1.3.0).\
132
- Thanks to [G. Yang](https://www.github.com/gyang0) for his [contribution](https://www.github.com/Zushah/zushah.github.io/pull/1) to the [documentation](https://www.github.com/Zushah/zushah.github.io/tree/main/Chalkboard).
138
+ # Acknowledgments
139
+ Thanks to [Bhavjit Chauhan](https://www.github.com/bhavjitChauhan) for his [contribution](https://www.github.com/Zushah/Chalkboard/pull/1) to [v1.3.0 Heaviside](https://www.github.com/Zushah/Chalkboard/releases/tag/v1.3.0).\
140
+ Thanks to [G. Yang](https://www.github.com/gyang0) for his [contribution](https://www.github.com/Zushah/zushah.github.io/pull/1) to the [documentation](https://www.github.com/Zushah/zushah.github.io/tree/main/Chalkboard).\
141
+ Thanks to [JentGent](https://www.github.com/JentGent) for his [implementation](https://www.github.com/JentGent/linalg/blob/main/linalg.js#L519) for calculating QR decomposition which was [adapted](https://www.github.com/Zushah/Chalkboard/commit/1dce0dbac82b38f9a550dd496bc878c402a92442) into [v1.7.0 Descartes](https://www.github.com/Zushah/Chalkboard/releases/tag/v1.7.0).
133
142
 
134
143
  # Contact
135
144
  [GitHub](https://www.github.com/Zushah)\
package/docs/README.md CHANGED
@@ -1,2 +1,2 @@
1
1
  # Chalkboard documentation
2
- The documentation for [Chalkboard v1.6.0](https://www.github.com/Zushah/Chalkboard/releases/tag/v1.6.0) can be visited [here](https://zushah.github.io/Chalkboard/documentation.html/). Its source code is located [here](https://www.github.com/Zushah/zushah.github.io/blob/main/Chalkboard/documentation.html).
2
+ The documentation for [Chalkboard v1.7.0 Descartes](https://www.github.com/Zushah/Chalkboard/releases/tag/v1.7.0) can be visited [here](https://zushah.github.io/Chalkboard/documentation.html/). Its source code is located [here](https://www.github.com/Zushah/zushah.github.io/blob/main/Chalkboard/documentation.html).
@@ -1,5 +1,5 @@
1
1
  # Chalkboard examples
2
- Six basic programs made by Zushah that utilize [Chalkboard v1.6.0](https://www.github.com/Zushah/Chalkboard/releases/tag/v1.6.0) are located in this directory.
2
+ Six basic programs made by Zushah that utilize [Chalkboard v1.7.0 Descartes](https://www.github.com/Zushah/Chalkboard/releases/tag/v1.7.0) are located in this directory.
3
3
 
4
4
  They can be viewed in action here:
5
5
  - [fluid.js](https://zushah.github.io/Chalkboard/examples/fluid.html)
package/examples/fluid.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  The Chalkboard Library ===> https://www.github.com/Zushah/Chalkboard
3
- Version 1.6.0 Example Program: Fluid Flow
3
+ Version 1.7.0 Descartes Example Program: Fluid Flow
4
4
  Authored by Zushah ===> https://www.github.com/Zushah
5
5
  */
6
6
 
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  The Chalkboard Library ===> https://www.github.com/Zushah/Chalkboard
3
- Version 1.6.0 Example Program: Hyperbolic Functions
3
+ Version 1.7.0 Descartes Example Program: Hyperbolic Functions
4
4
  Authored by Zushah ===> https://www.github.com/Zushah
5
5
  */
6
6
 
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  The Chalkboard Library ===> https://www.github.com/Zushah/Chalkboard
3
- Version 1.6.0 Example Program: Mandelbrot Set
3
+ Version 1.7.0 Descartes Example Program: Mandelbrot Set
4
4
  Authored by Zushah ===> https://www.github.com/Zushah
5
5
  */
6
6
 
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  The Chalkboard Library ===> https://www.github.com/Zushah/Chalkboard
3
- Version 1.6.0 Example Program: Matrix Donut
3
+ Version 1.7.0 Descartes Example Program: Matrix Donut
4
4
  Authored by Zushah ===> https://www.github.com/Zushah
5
5
  */
6
6
 
@@ -11,7 +11,7 @@ canvas.height = window.innerHeight;
11
11
 
12
12
  var cb = Chalkboard; // Initialize Chalkboard as cb
13
13
 
14
- // Generate the donut's points with a parametric function (see: https://en.wikipedia.org/wiki/Torus)
14
+ // Generate the donut's points with parametric equations (see: https://en.wikipedia.org/wiki/Torus)
15
15
  var points = [];
16
16
  for(var u = 0; u < cb.PI(2); u += cb.PI(1/16)) {
17
17
  for(var v = 0; v < cb.PI(2); v += cb.PI(1/6)) {
@@ -41,9 +41,7 @@ function main() {
41
41
  // Make the donut rotate with a rotation matrix
42
42
  var r = cb.matr.rotator(cb.trig.toRad(1), cb.trig.toRad(1), cb.trig.toRad(1));
43
43
  for(var i = 0; i < points.length; i++) {
44
- var buffer = cb.vec3.toMatrix(points[i]); // Create a buffer matrix which has the donut's points
45
- var rbuffer = cb.matr.mul(r, buffer); // Multiply the rotation matrix with the buffer matrix
46
- points[i] = cb.matr.toVector(rbuffer, "vec3"); // Reassign the values of the donut's points to the new rotated points
44
+ points[i] = cb.matr.mulvec(r, points[i]); // Multiply the rotation matrix with the points' vectors
47
45
  }
48
46
 
49
47
  window.requestAnimationFrame(main);
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  The Chalkboard Library ===> https://www.github.com/Zushah/Chalkboard
3
- Version 1.6.0 Example Program: Newton's Method
3
+ Version 1.7.0 Descartes Example Program: Newton's Method
4
4
  Authored by Zushah ===> https://www.github.com/Zushah
5
5
  */
6
6
 
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  The Chalkboard Library ===> https://www.github.com/Zushah/Chalkboard
3
- Version 1.6.0 Example Program: Quaternion Donut
3
+ Version 1.7.0 Descartes Example Program: Quaternion Donut
4
4
  Authored by Zushah ===> https://www.github.com/Zushah
5
5
  */
6
6
 
@@ -11,7 +11,7 @@ canvas.height = window.innerHeight;
11
11
 
12
12
  var cb = Chalkboard; // Initialize Chalkboard as cb
13
13
 
14
- // Generate the donut's points with a parametric function (see: https://en.wikipedia.org/wiki/Torus)
14
+ // Generate the donut's points with parametric equations (see: https://en.wikipedia.org/wiki/Torus)
15
15
  var points = [];
16
16
  for(var u = 0; u < cb.PI(2); u += cb.PI(1/16)) {
17
17
  for(var v = 0; v < cb.PI(2); v += cb.PI(1/6)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zushah/chalkboard",
3
- "version": "1.6.0",
3
+ "version": "1.7.0",
4
4
  "description": "The Chalkboard library provides a plethora of mathematical functionalities for its user.",
5
5
  "main": "src/Chalkboard.js",
6
6
  "scripts": {