mathigon / textbooks Goto Github PK
View Code? Open in Web Editor NEWSource code of Mathigon's interactive textbooks
Home Page: https://mathigon.org
Source code of Mathigon's interactive textbooks
Home Page: https://mathigon.org
An interactive, parabolic mirror, that shows how light from a fixed point is reflected in parallel rays. students can slide the position of the light bulb (to find the focus), and change the shape of the parabola (using a slider).
Bonus: Rather than having static lines to represent light rays, have a subtle animation (e.g. small arrows or beads slowly flowing along the ray, in the direction of the light).
Bonus 2: A few other types of shapes (e.g. semicircle), to show that slight rays are reflected differently.
Bonus 3: Swap the graphics to show how to heat an egg on a parabolic grill, using incoming light from the sun, or concentrate radio waves onto a detector in a radio telescope.
For the Königsberg Bridges problem in Graphs and Networks, you can cheat by moving the cursor outside the city area:
This interactive diagram shows how the angle between consecutive leaves in a plant is always constant. We should add a rotating arc that visualises this:
https://mathigon.org/course/sequences/fibonacci#sunflower-growing
Codes:
$step.model.rad = (r: number) => {
const a = r / Math.PI;
return a > 1.99 ? 2 : round(a, 2);
};
const zero = new Point(240, 140);
const center = new Point(140, 140);
const ends = [new Point(240, 140.4), new Point(40, 140), new Point(140, 40)];
function setState(i: number) {
const arc1 = new Angle($step.model.a, center, zero).arc;
const arc2 = new Angle($step.model.b, center, ends[i]).arc;
animate((p) => {
$step.model.a = arc1.at(p);
$step.model.b = arc2.at(p);
}, 600);
}
How do I understand $step.model.rad
, $step.model.a
and $step.model.b
?
When I try write that:
import { SVGParentView, observe } from '@mathigon/boost';
const $svg = new SVGParentView(document.getElementById('svg'));
console.log($svg.model);
$svg.bindModel(observe($svg.$('.a')));
$svg.bindModel(observe($svg.$('.b')));
console.log($svg.model);
// => Only one
So what can I bind model for myself?
A virtual enigma machine: students can click keys on a keyboard, at which point the corresponding cipher letter lights up, and the rotors move by one. Students can also switch out different rotors, or connect differently plugs on the plugboard.
Similar to this, but with nicer graphics?
After creating a ciphertext, students should be able to send it to a friend (together with initial setup instructions), who should then be able to decipher it using the same component.
I was trying to customize the content/transformations/components/wallpaper.pug
file, but noticed that Gulp doesn't watch files with .pug extension for changes to auto-run the parser and renderer. Here's the Gulp config: https://github.com/mathigon/textbooks/blob/master/gulpfile.js#L49-L53
This would be useful to have. Currently, I need to run rm content/.cache.json && npm start
after every change in these .pug files.
In Polygons and Polyhedra, users are asked to draw rectangles with the same size as given parallelograms or trapeziums. The area check works correctly, but we should shift user's rectangles if they don't correspond to the the position assumed in the explanation:
An Angry Birds-style game, that shows how projectiles follow a parabolic path.
Preview: https://mathigon.org/course/quadratics/projectiles?preview
https://github.com/mathigon/textbooks/blob/master/content/quadratics/components/projectile.ts
Students have a slingshot at position (0, 0) and have to hit specific targets at other positions (fish?). You should be able to hide or show a coordinate system overlay.
The game should be a configurable custom webcomponent that can be used in two different settings:
An interactive game, where students can play the prisoners' paradox against another player, or the computer.
Similar to https://youtu.be/_q4DrUHKC0Q?t=2230
TBD: how to select other users, e.g. can two students play on the same device simultaneously, do we link with other students logged into the same class on Mathigon, or random users from the web?
I believe that machine translation should be used with caution in the texts on mathematical topics, because mathematical terms are rarely used correctly. At least in the German translation, they may cause more harm than good to the pupils and students.
Therefore it would be absolutely necessary to mark these translations as machine translations which should be used with caution.
This will require replacing all uses of THREE.Geometry
with THREE.BufferGemetry
…
sieve-eratosthenes:
title: Sieve of Eratosthenes
text: The Sieve of Eratosthenes is a procedure for finding prime numbers,
by continuoulsy eliminating numbers that are not prime.
link: /course/divisibility/primes#eratosthenes
should read as follows:
sieve-eratosthenes:
title: Sieve of Eratosthenes
text: The Sieve of Eratosthenes is a procedure for finding prime numbers,
by continuously eliminating numbers that are not prime.
link: /course/divisibility/primes#eratosthenes
venn-diagram:
title: Venn Diagram
text: A __venn diagram__ visualises multiple properties or events that
overlap.
image: venn.svg
should read as follows:
venn-diagram:
title: Venn Diagram
text: A __Venn diagram__ visualises multiple properties or events that
overlap.
image: venn.svg
Sorry for not including these in the other issue that has been fixed.
polyhedron:
title: Polyhedron
text: A polyhedron (the plural is polyhedra) is a 3-dimensional solid
with no curves surfaces or edges. All faces of a polyhedron are polygons.
For example, a cube and a pyramid are polyhedra, but a sphere is not.
link: /course/polyhedra/polyhedra
should read as follows:
polyhedron:
title: Polyhedron
text: A polyhedron (the plural is polyhedra) is a 3-dimensional solid
with no curved surfaces or edges. All faces of a polyhedron are polygons.
For example, a cube and a pyramid are polyhedra, but a sphere is not.
link: /course/polyhedra/polyhedra
I am working on the french translation of the glossary.
In a directed graph, every edge as an arrow, i.e. a start vertex and an end vertex.
Is it a correct english sentence ? I understand the meaning of the sentence (so I can translate it) but it doesn't seems correct in english. However I might be wrong as english is not my main language.
When I change the language on the Pythagoras' Theorem textbook eg. to german, the already translated page doesn't show up.
For many of the sequences, e.g.
https://mathigon.org/course/sequences/fibonacci#rabbits-3
it would be cool to ad an interactive "recurrence relation slider", as described here:
http://www.antonellaperucca.net/perucca-recurrence.pdf
A THREE.js component that visualises the cross-sections of different polyhedra, for the Polyhedra course.
Students can select from a few different pre-selected polyhedra (platonic solids, prisms and pyramids), which are arbitrarily rotatable by dragging. Students also have a slider to change the "distance" of the polyhedron from a horizontal place, which it can pass through.
If the polyhedron intersects the plane, highlight the shape of the cross-section. For example, you can make a hexagon by appropriately positioning a cube.
Essentially, a virtual version of MoMath's Wall of Fire.
We shouldn't rescale the y-axis in these coordinate systems, so that students get a better idea of how the variable parameters affect the growth of the sequence:
https://mathigon.org/course/sequences/arithmetic-geometric#arithmetic-geometric-graph
In the course on Euclid's Axioms, the section on Congruence does not automatically display the next batch of text after the exercises is completed, which looks like a bug.
The workaround is for the user to click on the message "Are you stuck? Skip to the next step or reveal all steps"
We should slow down the colour animations in the Sieve of Eratosthenes grid, so that it's easier to see what's going on:
Improve the tessellation builder in Polygons and Polyhedra:
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates are awaiting their schedule. Click on a checkbox to get an update now.
@typescript-eslint/eslint-plugin
, @typescript-eslint/parser
, eslint
, eslint-plugin-import
).github/workflows/codeql.yml
actions/checkout v3
github/codeql-action v2
github/codeql-action v2
.github/workflows/test.yml
actions/checkout v3
actions/setup-node v3
package.json
@mathigon/boost 1.2.13
@mathigon/core 1.1.10
@mathigon/euclid 1.1.12
@mathigon/fermat 1.1.9
@mathigon/hilbert 1.1.9
@mathigon/studio 0.1.35
npm-run-all 4.1.5
ts-node 10.9.1
typescript 5.1.6
@typescript-eslint/eslint-plugin 6.2.1
@typescript-eslint/parser 6.2.1
eslint 8.46.0
eslint-config-google 0.14.0
eslint-plugin-import 2.28.0
node >=16
Getting Started
section in the README file does not contain any reference to the must-have requirement of having Node installed before running npm install
command. This issue may present challenges to new contributors.
A reference to Node installation could be added as part of the Getting Started
section in the README file as the first instruction as a check mark before proceeding with forking and cloning.
<rect x="378" width="4" height="88.2" y="177.6" fill="white"></rect>
or
<rect x="370" width="9.8" height="9.8" y="177.6" fill="black"></rect><rect x="380" width="9.8" height="9.8" y="177.6" fill="white"></rect>
<rect x="370" width="9.8" height="9.8" y="187.4" fill="white"></rect><rect x="380" width="9.8" height="9.8" y="187.4" fill="black"></rect>
<rect x="370" width="9.8" height="9.8" y="197.2" fill="black"></rect><rect x="380" width="9.8" height="9.8" y="197.2" fill="white"></rect>
<rect x="370" width="9.8" height="9.8" y="207.0" fill="white"></rect><rect x="380" width="9.8" height="9.8" y="207.0" fill="black"></rect>
<rect x="370" width="9.8" height="9.8" y="216.8" fill="black"></rect><rect x="380" width="9.8" height="9.8" y="216.8" fill="white"></rect>
<rect x="370" width="9.8" height="9.8" y="226.6" fill="white"></rect><rect x="380" width="9.8" height="9.8" y="226.6" fill="black"></rect>
<rect x="370" width="9.8" height="9.8" y="236.4" fill="black"></rect><rect x="380" width="9.8" height="9.8" y="236.4" fill="white"></rect>
<rect x="370" width="9.8" height="9.8" y="246.2" fill="white"></rect><rect x="380" width="9.8" height="9.8" y="246.2" fill="black"></rect>
<rect x="370" width="9.8" height="9.8" y="256.0" fill="black"></rect><rect x="380" width="9.8" height="9.8" y="256.0" fill="white"></rect>
I think the first one is better.
There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.
Error type: undefined. Note: this is a nested preset so please contact the preset author if you are unable to fix it yourself.
See https://mathigon.org/course/graphs-and-networks#salesman
The handshake table in Graphs and Networks is broken on mobile devices:
Cool video: https://www.youtube.com/watch?v=8NmHZEKkkpM
In the Mandelbrot set section of fractal textbook it is written that
In some cases, the sequence doesn’t converge to a single point – instead it reaches a cycle of multiple points, like a triangle. These cycles are called orbits.
Many textbooks on dynamical systems call these cycles as periodic orbits, and the term orbit is used to refer to any trajectory of the dynamical system. Should not be better to change 'orbits' to 'periodic orbits'?
ENHANCEMENT
When the hypotenuse is mentioned here:
https://mathigon.org/course/triangles/pythagoras
Add the fact that it is the longest side?
Hi,
There is currently a logic chapter on mathigon but it's more aimed to advanced student.
I wrote the last years an article for a blog I have at my school. It is aimed on giving some basics notion on logic. It is a little fun and verry accessible.
I post it here because it might give some idea if you ever want to write a logic chapter for not advanced student.
Unfortunatly it's in french.
https://mathematiques.xyz/blog/Logique/article.html
Ps : The article it's in C0 but picture are not because I didn't make them (they are CC-BY though)
An interactive component for the Conic Sections course, that allows students to draw an ellipse using a virtual pencil and a rope that is connected to two pegs (the foci of the ellipse):
Students should be able to move the pencil as well as the position of the two foci, by clicking and dragging with finger or mouse.
The rope needs some basic physics simulation (rope/chain) to model behaviour when it is slack. The pencil should be movable to anywhere within the ellipse, not just the positions along the edge, and leave a faint trail of where it has been.
Hi, Would it be possible for you to add a LICENSE file to the GitHub repository, e.g. with the text of the MIT or Apache 2 license (or whatever license you choose, of course)? This makes it easier for employees at companies such as Google to sign the CLA and contribute.
An interactive simulation that shows how to generate the logistic map.
References:
https://www.youtube.com/watch?v=ovJcsL7vyrk
https://geoffboeing.com/2015/03/chaos-theory-logistic-map/
This should consist of a series of different elements:
A high-res version of the logistic map, that allows students to zoom in
(bonus) A 3D version that illustrates its relation to the Mandelbrot set.
Claude Shannon's lifetime is (1916 - 2001) according to Wikipedia. But in timeline activity of Mathigon, both on website and Android app it mentions (1898 – 1972).
(Just some though, I don't plan to translate those course for the moment)
In France, we start our sequence at rank 0 (which simplify a lots of formula !).
When translating, should the translater rewrite the course so that sequence start at rank 0 to follow french way to do ? What about Canada (which also have french as main language), I checked really quick but it seems that they start their sequence at rank 1. I think french course should follow France guideline and start at rank 0.
In France, in reccurcive formula, we usually give u(n+1) in function of u(n) instead of giving u(n) in function of u(n-1). What should the translator do ? I Think u(n) in function of u(n-1) is easier to understand, but it would then means that student have different reccursive formula than formula at their school (which shouldn't be a problem if they really understand what the formula means but this might still bug lots of students).
More problematic, we (but France is pronanly not be the only country to do that) also have a totally different definition for limit. We say that « f tends to L as x tends to a if for every ɛ>0 there exists δ>0 such that for every x in the domain of f, |x - a| ≤ δ implies that |f(x) - L| ≤ ɛ » while your definition also require that 0 < | x - a |. So some function might have limit with english definition but not with french definition. Again, what the translator should do ?
I repeat, it's just some though, I don't plan to translate those course for the moment.
al-haytham:
born: 965
died: 1050
name: Al-Haytham
bio: |
Hasan Ibn al-Haytham (أبو علي، الحسن بن الحسن بن الهيثم, c. 965 – 1050)
lived in Cairo during the Islamic Golden Age, and studied mathematics,
physics, astronomy, philosophy and medicine. He was a proponent of the
scientific method: the belief that any a scientific hypothesis must be
verified using experiments or mathematical logic – centuries before
European scientists during the Renaissance. ...
should read as follows:
al-haytham:
born: 965
died: 1050
name: Al-Haytham
bio: |
Hasan Ibn al-Haytham (أبو علي، الحسن بن الحسن بن الهيثم, c. 965 – 1050)
lived in Cairo during the Islamic Golden Age, and studied mathematics,
physics, astronomy, philosophy , and medicine. He was a proponent of the
scientific method: the belief that any a scientific hypothesis must be
verified using experiments or mathematical logic – centuries before
European scientists during the Renaissance.
al-karaji:
born: 953
died: 1029
name: Al-Karaji
bio: Muhammad Al-Karaji (ابو بکر محمد بن الحسن الکرجی, c. 953 – 1029) was
a Persian mathematician and engineer. He was the first person to use prove
by induction, which allowed him to prove the binomial theorem.
links:
- title: Proof by Induction
url: /world/Axioms_and_Proof
Should read as follows:
al-karaji:
born: 953
died: 1029
name: Al-Karaji
bio: Muhammad Al-Karaji (ابو بکر محمد بن الحسن الکرجی, c. 953 – 1029) was
a Persian mathematician and engineer. He was the first person to use proof
by induction, which allowed him to prove the binomial theorem.
links:
- title: Proof by Induction
url: /world/Axioms_and_Proof
al-khwarizmi:
born: 780
died: 850
name: Al-Khwarizmi
overflow: true
bio: |
The Persian mathematician Muhammad Al-Khwarizmi (محمد بن موسى الخوارزمي,
780 – 850) lived during the golden age of the Muslim Abbasid regime in
Baghdad. He worked at the “House of Wisdom”, which contained the first large
collection of academic books since the destruction of the Library of
Alexandria.
Al-Khwarizmi has been called the “**father** of algebra” – in fact, the word
Should read as follows:
al-khwarizmi:
born: 780
died: 850
name: Al-Khwarizmi
overflow: true
bio: |
The Persian mathematician Muhammad Al-Khwarizmi (محمد بن موسى الخوارزمي,
780 – 850) lived during the golden age of the Muslim Abbasid regime in
Baghdad. He worked at the “House of Wisdom”, which contained the first large
collection of academic books since the destruction of the Library of
Alexandria.
Al-Khwarizmi has been called the “**Father** of algebra” – in fact, the word
**This one comes up a lot. "Father of ....". In some cases, "Father is capitalized. IN other cases, it without quotes. Not sure if you want to standardize on a style.
It comes up with:**
Other typos:
cardano:
born: 1501
died: 1576
name: Cardano
bio: |
The Italian Gerolamo Cardano (1501 – 1576) was one of the most
influential mathematicians and scientists of the Renaissance. He
investigated hypocycloids, published Tartaglia’s and Ferrari’s solution for
cubic and quartic equations, was the first European to systematically use
negative numbers, and even acknowledged the existing of imaginary numbers
(based on sqrt(-1)
).
Cardano also made some early progress in probability theory and introduced binomial coefficients and binomial theorem to Europe. He invented many
mechanical devices, including combination locks, gyroscopes with three
degrees of freedom, and drive shafts (or Cardan shafts) that are still used
in vehicles today.
links:
- title: Imaginary Numbers
url: /world/Real_Irrational_Imaginary
Should read as follows:
cardano:
born: 1501
died: 1576
name: Cardano
bio: |
The Italian Gerolamo Cardano (1501 – 1576) was one of the most
influential mathematicians and scientists of the Renaissance. He
investigated hypercycloids, published Tartaglia’s and Ferrari’s solution for
cubic and quartic equations, was the first European to systematically use
negative numbers, and even acknowledged the existence of imaginary numbers
(based on sqrt(-1)
).
Cardano also made some early progress in probability theory and introduced
binomial coefficients and **the** binomial theorem to Europe. He invented many mechanical devices, including combination locks, gyroscopes with three degrees of freedom, and drive shafts (or Cardan shafts) that are still used in vehicles today.
links:
- title: Imaginary Numbers
url: /world/Real_Irrational_Imaginary
cauchy:
born: 1789
died: 1857
name: Cauchy
small: true
bio: |
Augustin-Louis Cauchy (1789 – 1857) was a French mathematician and physicist. He contributed to a wide range of areas in mathematics, and
dozens of theorems and named after him.
.......
Should read as follows:
cauchy:
born: 1789
died: 1857
name: Cauchy
small: true
bio: |
Augustin-Louis Cauchy (1789 – 1857) was a French mathematician and physicist. He contributed to a wide range of areas in mathematics, and
dozens of theorems are named after him.
.....
cavalieri:
name: Cavalieri
born: 1598
died: 1647
bio: |
Bonaventura Cavalieri (1598 – 1647) was an Italian mathematician and monk. He developed a precursor to infinitesimal calculus, and is remembered
for Cavalieri’s principle to find the volume of solids in geometry.
Cavalieri also worked **optics and motion, introduction logarithms to Italy,**
and exchanged many letters with Galileo Galilei.
links:
- title: Cavalieri’s Principle
url: /course/circles/spheres-cones-cylinders#cavalieri
Should read as follows:
cavalieri:
name: Cavalieri
born: 1598
died: 1647
bio: |
Bonaventura Cavalieri (1598 – 1647) was an Italian mathematician and monk. He developed a precursor to infinitesimal calculus, and is remembered
for Cavalieri’s principle to find the volume of solids in geometry.
Cavalieri also worked **in** optics and motion, **introduced** logarithms to Italy,
and exchanged many letters with Galileo Galilei.
links:
- title: Cavalieri’s Principle
url: /course/circles/spheres-cones-cylinders#cavalieri
diophantus:
born: 200
died: 284
name: Diophantus
overflow: true
bio: |
Diophantus was a Hellenistic mathematician who lived in Alexandria.
Most of his works are about solving polynomial equations with several unknowns. These are now called Diophantine equation and remain an
an important area of research today.
It was while reading one of Diophantus’ books, many centuries later, that
_Pierre de Fermat_ proposed one of these equations had no solution. This became known as “Fermat’s Last Theorem”, and was only solved in 1994.
Should read as follows:
diophantus:
born: 200
died: 284
name: Diophantus
overflow: true
bio: |
Diophantus was a Hellenistic mathematician who lived in Alexandria.
Most of his works are about solving polynomial equations with several unknowns. These are now called Diophantine equations and remain an
an important area of research today.
It was while reading one of Diophantus’ books, many centuries later, that
_Pierre de Fermat_ proposed one of these equations had no solution. This became known as “Fermat’s Last Theorem”, and was only solved in 1994.
fuller:
name: Fuller
bio: Richard Buckminster “Bucky” Fuller (1895 – 1983) was an American
architect, designer and inventor. He is famous for constructing geodesic
dome – large, spherical structures. Similar looking Carbon molecules, the
fullerenes, were later named after him.
Should read as follows:
fuller:
name: Fuller
born: 1895
died: 1983
bio: Richard Buckminster “Bucky” Fuller (1895 – 1983) was an American
architect, designer and inventor. He is famous for constructing geodesic
dome – large, spherical structures. Similar looking carbon molecules, the
fullerenes, were later named after him.
galois:
**While still in his teens, Galois proved that there is no general solution
for polynomial equations of degree five or higher – simultaneously with
Niels Abel.**
At the age of 21, Galois was shot in a duel (some say a feud over a woman),
and later died of his wounds. In the night before his death, he summarised
his mathematical discoveries in a letter to a friend. It would take other mathematicians many years to fully realise the true impact of his work.
could read:
While still in his teens, Galois, along with Niels Abel, proved that there is no general solution
for polynomial equations of degree five or higher.
At the age of 21, Galois was shot in a duel (some say a feud over a woman),
and later died of his wounds. On the night before his death, he summarised
his mathematical discoveries in a letter to a friend. It would take other mathematicians many years to fully realise the true impact of his work.
planck:
name: Plank
bio: Max Plank (1858 – 1947) was a German physicist and one of the
original developers of Quantum Mechanics – for which received the Nobel
Prize in 1918.
Should read as follows:
planck:
name: Plank
born: 1858
died: 1947
bio: Max Plank (1858 – 1947) was a German physicist and one of the
original developers of Quantum Mechanics – for which he( received the Nobel
Prize in 1918.
In Polygons and Polyhedra, it asks to draw a rectangle with the same area. But it doesn't consider all possible rectangles.
Allow students to make their own graphs, and try to draw them with a single stroke
At the beginning of Polygons and Polyhedra, rounding errors can mean that the four angles in the quadrilateral don't actually add up to 360°. We should probably set the last angle to 360° – rounded other angles
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.