All Projects → guillefix → augmath

guillefix / augmath

Licence: BSD-3-Clause license
Interactive Computer Algebra System. Augmenting how we *do* mathematics using computers

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to augmath

Gap
Main development repository for GAP - Groups, Algorithms, Programming, a System for Computational Discrete Algebra
Stars: ✭ 447 (+990.24%)
Mutual labels:  algebra, math
Mathematics for Machine Learning
Learn mathematics behind machine learning and explore different mathematics in machine learning.
Stars: ✭ 28 (-31.71%)
Mutual labels:  algebra, math
Algebra Latex
Parse and calculate latex formatted math
Stars: ✭ 20 (-51.22%)
Mutual labels:  algebra, math
Grassmann.jl
⟨Leibniz-Grassmann-Clifford⟩ differential geometric algebra / multivector simplicial complex
Stars: ✭ 289 (+604.88%)
Mutual labels:  algebra, math
Reduce.jl
Symbolic parser generator for Julia language expressions using REDUCE algebra term rewriter
Stars: ✭ 172 (+319.51%)
Mutual labels:  algebra, math
Nerdamer
a symbolic math expression evaluator for javascript
Stars: ✭ 322 (+685.37%)
Mutual labels:  algebra, math
Algebra
means completeness and balancing, from the Arabic word الجبر
Stars: ✭ 92 (+124.39%)
Mutual labels:  algebra, math
racket-cas
Simple computer algebra system
Stars: ✭ 58 (+41.46%)
Mutual labels:  algebra, math
Math Php
Powerful modern math library for PHP: Features descriptive statistics and regressions; Continuous and discrete probability distributions; Linear algebra with matrices and vectors, Numerical analysis; special mathematical functions; Algebra
Stars: ✭ 2,009 (+4800%)
Mutual labels:  algebra, math
Alga
Abstract algebra for Rust.
Stars: ✭ 154 (+275.61%)
Mutual labels:  algebra, math
Mather
zzllrr mather(an offline tool for Math learning, education and research)小乐数学,离线可用的数学学习(自学或教学)、研究辅助工具。计划覆盖数学全部学科的解题、作图、演示、探索工具箱。目前是演示Demo版(抛转引玉),但已经支持数学公式编辑显示,部分作图功能,部分学科,如线性代数、离散数学的部分解题功能。最终目标是推动专业数学家、编程专家、教育工作者、科普工作者共同打造出更加专业级的Mather数学工具
Stars: ✭ 270 (+558.54%)
Mutual labels:  algebra, math
react-katex
Display math in TeX with KaTeX and ReactJS
Stars: ✭ 135 (+229.27%)
Mutual labels:  math, katex
Angourimath
Open-source symbolic algebra library for C# and F#. One of the most powerful in .NET
Stars: ✭ 266 (+548.78%)
Mutual labels:  algebra, math
Newton Api
➗ A really micro micro-service for advanced math.
Stars: ✭ 358 (+773.17%)
Mutual labels:  algebra, math
Euler
The open-source computational framework for the Swift language
Stars: ✭ 37 (-9.76%)
Mutual labels:  algebra, math
Unplugged
Open book about math and computer science.
Stars: ✭ 1,189 (+2800%)
Mutual labels:  algebra, math
Jekyll Spaceship
🚀 A Jekyll plugin to provide powerful supports for table, mathjax, plantuml, mermaid, emoji, video, audio, youtube, vimeo, dailymotion, soundcloud, spotify, etc.
Stars: ✭ 196 (+378.05%)
Mutual labels:  math, katex
Katex
Fast math typesetting for the web.
Stars: ✭ 14,623 (+35565.85%)
Mutual labels:  math, katex
Abstract Algebra Cheatsheet
📗 A visualization of key structures in abstract algebra.
Stars: ✭ 137 (+234.15%)
Mutual labels:  algebra, math
Fasteval
Fast and safe evaluation of algebraic expressions
Stars: ✭ 177 (+331.71%)
Mutual labels:  algebra, math

AugMath

Try it live here

Vision

See here. Some video demos can be seen here and here

Usage

Here's a quick demo of most of the current manipulations:
Proof of Quadratic Formula
(Created using ScreenToGif)

Development

  1. Install MeteorJS

  2. Run npm install to intall rest of dependencies

  3. Install webpack and webpack-dev-server for trying the bundled version (work in progress).

You can now bundle augmath into a standalone JS file and use it in your own projects through a simple API!

To use: Run npm run webpack, get the bundle/augmath.js file, and see client/library.jsx and index.html for example of how to use it on your own html files.

File structure

Following standard Meteor structure.

The entrypoint files for the client app (where most of the action happens right now) are in the client folder. Some assets are found in public. For the server side part, they are in the server folder.

The client/main.jsx file basically just imports everything it needs, from the main codebase, found in imports. The file containing the main structure and layout of the web app is imports/ui/App.js. We are using the awesome React, so we are using the components found in the imports/ui/components folder.

I recommend using the React developer tools and Redux DevTools

The main area where math is found is built with components in imports/ui/components/intmath (interactive math). There, we have two compoments to input math (mathinput.js for latex, and mqinput.js for the natural math input MathQuill), and two compoments to display dynamic maths (matharea.js is just a container of Equation compoments from equation.js). The Equation compoment is the most complex one, as it has to keep track of the whole tree which stores the equation structure, together with its associated DOM elements (see MathTree below), as well as all the events for making it interactive and animated (including the pretty buggy drag and drop functionality).

The tools (imports/ui/components/tools) compoments just contain all the buttons that allow you to do actions/manipulations.

In imports/ui/components/maths we have functions.js, we have many useful functions, mainly used by the equation compoment. At the bottom are found the big bois. The functions that parse the KaTeX HTML to make the MathTree, and a function that takes a MathTree (together with a node to be replaced) and produces a new LaTeX string. These are at the heart of AugMath! I'll explain the more below.

In manipulations.js we have the code that says what the manipulations do, and how to animate them (for those where an animation is implemented). symbols.js is just a technical thing to translate unicode to latex for non-ascii math symbols, taken from KaTeX.

In imports/startup, and imports/api, we just have two files to deal with simple server and database stuff, like the collections where one can save equations, and the users.

Finally, in imports/redux, we have the Redux stuff. A store (), where we save the state of the app, and the reducers (which take actions built with simple action-creators). In case you are not familiar with Redux, the reducer is just a big function, which takes an action, and a state, and produces the new state of the app. Mixing react and redux means that React compoments can depend on this global app state, and dispatch actions that change it. This breaks the whole nice compartimentalization of react a bit. But it is much more convenient for some things, and its strong functional philosophy makes it actually not too bad, and even quite good!

The triangle of math representations

The main object of an equation in AugMath is a tree (created with TreeModel), which contains all the manipulatives in the equation or expression, and we call a MathTree (often math_root in code). This is done through the function parse_poly in functions.js. This creates a tree by parsing the HTML created by KaTeX from a LaTeX string. This is nice because the tree then doesn't only contain the logic of the equation (could be done by parsing LaTeX string directly), but it automatically connectes each node in the tree with a DOM element, so that we can make it interactive and dynamic! We can add event handlers and animate arbitrary bits of the HTML-rendered equation. This is what all the manipulations do.

However, after we have animated something, we haven't really changed the html equation. To do this, I have implemented parse_mtstr in functions.js. It takes a MathTree, a set of nodes (as IDs) in the tree, and a set of LaTeX strings with which to substitute the nodes. Then it creates a LaTeX string from the MathTree, but where the nodes are substituted. This allows a manipulation to do this: We first animate the manipulation, then we compute the LaTeX string that results after performing that manipulation to the equation. This is done with parse_mtstr (actually called through its wrapper replace_in_mtstr), by removing some nodes, and adding others in the right places. Then we rerender the equation with KaTeX. If the animation is done well enough, and because KaTeX is so fast, the user shouldn't notice anything, and it should all look smooth :D

Here's a diagram of this triangle of math representations and their transformation functions at the heart of AugMath!

AugMath_loop

Acknowledgements

AugMath uses KaTeX for math rendering, Algebrite, for some algebraic operations and Math.js for some math operations, MathQuill for input, and KaTeX for rendering, and jQuery for animations and stuff.

Here is a Worflowy list I made to organize the stuff that goes into AugMath.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].