All Projects → mathigon → euclid.js

mathigon / euclid.js

Licence: MIT license
2D Euclidean geometry classes, utilities, and drawing tools

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to euclid.js

Dotscad
Reduce the burden of mathematics when playing OpenSCAD
Stars: ✭ 344 (+398.55%)
Mutual labels:  geometry, mathematics
Math Toolbox
Lightweight and modular math toolbox
Stars: ✭ 71 (+2.9%)
Mutual labels:  geometry, mathematics
Cindyjs
A JavaScript framework for interactive (mathematical) content.
Stars: ✭ 495 (+617.39%)
Mutual labels:  geometry, mathematics
birkhoff
Euclidean plane and its relatives; a minimalist introduction.
Stars: ✭ 15 (-78.26%)
Mutual labels:  geometry, mathematics
humke-4d-geometry
A web-based 4D Geometry viewer
Stars: ✭ 51 (-26.09%)
Mutual labels:  geometry, mathematics
Mather
zzllrr mather(an offline tool for Math learning, education and research)小乐数学,离线可用的数学学习(自学或教学)、研究辅助工具。计划覆盖数学全部学科的解题、作图、演示、探索工具箱。目前是演示Demo版(抛转引玉),但已经支持数学公式编辑显示,部分作图功能,部分学科,如线性代数、离散数学的部分解题功能。最终目标是推动专业数学家、编程专家、教育工作者、科普工作者共同打造出更加专业级的Mather数学工具
Stars: ✭ 270 (+291.3%)
Mutual labels:  geometry, mathematics
Korma
Mathematics library focused on geometry for Multiplatform Kotlin 1.3
Stars: ✭ 65 (-5.8%)
Mutual labels:  geometry, mathematics
spherical-cow
A high volume fraction sphere packing library
Stars: ✭ 24 (-65.22%)
Mutual labels:  geometry, mathematics
geometer
A geometry library written in Python
Stars: ✭ 89 (+28.99%)
Mutual labels:  geometry, mathematics
Root
The official repository for ROOT: analyzing, storing and visualizing big data, scientifically
Stars: ✭ 1,377 (+1895.65%)
Mutual labels:  geometry, mathematics
Jsxgraph
JSXGraph is a cross-browser library for interactive geometry, function plotting, charting, and data visualization in a web browser.
Stars: ✭ 605 (+776.81%)
Mutual labels:  geometry, mathematics
alchemy
Generate any a-by-( b + c ) finite rectangle SVG containing potentially Infinitely many a-by-( 2 * b ) finite rectangles animated along a number line of ( ( c - b ) / a )^n scale symmetry.
Stars: ✭ 29 (-57.97%)
Mutual labels:  geometry, mathematics
Algorithms
A collection of algorithms and data structures
Stars: ✭ 11,553 (+16643.48%)
Mutual labels:  geometry, mathematics
Mathematics for Machine Learning
Learn mathematics behind machine learning and explore different mathematics in machine learning.
Stars: ✭ 28 (-59.42%)
Mutual labels:  geometry, mathematics
curve-shortening-demo
Visualize curve shortening flow in your browser.
Stars: ✭ 19 (-72.46%)
Mutual labels:  geometry, mathematics
three-strip
Generate strip geometry for three.js. Supports taper, twist, dasharray and uvgen.
Stars: ✭ 15 (-78.26%)
Mutual labels:  geometry
maths-for-deep-learning-ai
A open source book covering the foundational maths of deep learning and machine learning using TensorFlow
Stars: ✭ 35 (-49.28%)
Mutual labels:  mathematics
chaotic-maps
Simple implementations of chaotic maps in Processing
Stars: ✭ 18 (-73.91%)
Mutual labels:  mathematics
ai-math-roadmap
Your no-nonsense guide to the Math used in Artificial Intelligence
Stars: ✭ 173 (+150.72%)
Mutual labels:  mathematics
ludigraphix.github.io
Documentation for Ludigraphix
Stars: ✭ 21 (-69.57%)
Mutual labels:  geometry

Euclid.ts

Build Status npm npm

Euclid.ts is a Typescript library for 2D geometry. It contains classes for elements like points, lines, circles, and polygons, intersection detection, as well as SVG and Canvas drawing tools. It was developed for Mathigon.org, an award-winning mathematics education project.

API

All class instances are immutable: you need to create new copies rather than modifying their properties. This is mainly to facilitate fast change detection on downstream libraries.

  • Points: Point(x: number, y: number)

  • Lines: Line(p1: Point, p2: Point), Segment(p1: Point, p2: Point), Ray(p1: Point, p2: Point)

  • Polygons: Polygon(...points: Point[]), Polyline(...points: Point[])

  • Rectangles: Rectangle(p: Point, w: number, h: number)

  • Circles: Circle(c: Point, r: number)

  • Ellipses: Ellipse(c: Point, a: number, b: number)

  • Arcs: Arc((c: Point, start: Point, angle: number)), Sector((c: Point, start: Point, angle: number))

  • Angle: Angle(a: Point, b: Point, c: Point)

  • Bounds: Bounds(xMin: number, xMax: number, yMin: number, yMax: number)

  • Intersections: intsersection(...obj: GeoShape[])

  • Drawing: drawSVG(obj: GeoElement, options: SVGDrawingOptions), drawCanvas(ctx: CanvasRenderingContext2D, obj: GeoElement, options: CanvasDrawingOptions)

Usage

First, install Euclid.ts from NPM using

npm install @mathigon/euclid

Now, simply import all functions and classes you need, using

import {Point, Line} from '@mathigon/euclid'

Contributing

We welcome community contributions: please file any bugs you find or send us pull requests with improvements. You can find out more on Mathigon.io.

Before submitting a pull request, you will need to sign the Mathigon Individual Contributor License Agreement.

Copyright and License

Copyright © Mathigon ([email protected])
Released under the MIT license

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].