Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/crertel/graphmath
An Elixir library for performing 2D and 3D mathematics.
https://github.com/crertel/graphmath
elixir elixir-lang graphics hex matrices vector
Last synced: about 1 month ago
JSON representation
An Elixir library for performing 2D and 3D mathematics.
- Host: GitHub
- URL: https://github.com/crertel/graphmath
- Owner: crertel
- License: unlicense
- Created: 2014-11-29T21:39:52.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2024-08-03T08:24:25.000Z (4 months ago)
- Last Synced: 2024-10-03T12:47:53.692Z (2 months ago)
- Topics: elixir, elixir-lang, graphics, hex, matrices, vector
- Language: Elixir
- Size: 2.29 MB
- Stars: 79
- Watchers: 9
- Forks: 14
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- freaking_awesome_elixir - Elixir - An Elixir library for performing 2D and 3D mathematics. (Algorithms and Data structures)
- fucking-awesome-elixir - graphmath - An Elixir library for performing 2D and 3D mathematics. (Algorithms and Data structures)
- awesome-elixir - graphmath - An Elixir library for performing 2D and 3D mathematics. (Algorithms and Data structures)
- awesome-elixir-gaming - GraphMath: a library for handling common 2D and 3D math operations
- awesome-elixir-gaming - GraphMath: a library for handling common 2D and 3D math operations
README
[![CircleCI](https://circleci.com/gh/crertel/graphmath.svg?style=svg)](https://circleci.com/gh/crertel/graphmath)
[![Inline docs](http://inch-ci.org/github/crertel/graphmath.svg)](http://inch-ci.org/github/crertel/graphmath)
[![hex.pm version](https://img.shields.io/hexpm/v/graphmath.svg)](https://hex.pm/packages/graphmath)
[![hex.pm downloads](https://img.shields.io/hexpm/dt/graphmath.svg)](https://hex.pm/packages/graphmath)
[![Coverage Status](https://coveralls.io/repos/crertel/graphmath/badge.svg?branch=master)](https://coveralls.io/r/crertel/graphmath?branch=master)What is graphmath?
===================Graphmath is a library for handling common 2D and 3D operations, usually with an eye towards vector arithmetic for graphics and simulation.
It's designed to be comfortable to use, reasonably fast, and something which will benefit game developers and graphics programmers, though it may also be useful for robotocists and anyone attempting large-scale simluations which exist in R2 or R3.
Features
========* Support for vectors in R2 and R3.
* Support for 3x3 and 4x4 matrices.
* Support for quaternions
* Addition, subtraction
* Element-wise multiplication
* Scalar multiplication
* Inner-products (dot product)
* Cross products
* Projection
* Normalization
* Comparison
* Rotation
* Linear interpolation
* Matrix inversion
* Tuples are used to represent vectors and matrices (faster than lists or structs)Installation
============This package is available from the [hex](https://hex.pm) package manager.
Just add it to your `mix.exs` file like so:
```elixir
def project do
[app: myapp,
version: "x.y.z",
elixir: "~> 1.0",
description: "description",
package: ...,
deps: [
...,
{:graphmath, "~> 1.0.2" },
...
] ]
end
```Conventions in library
======================All mathematics are done in a right-handed coordinate system--that is to say, +Z is the cross-product of +X with +Y.
All operations are accompanied by tests and documentation.
Contributing
============### Issues
1. Open an issue on Github.
### For developers
1. Fork this project on Github.
2. Open an issue for your proposed changes.
3. Add tests for your new functionality, if applicable.
4. Add documentation for your functionality, if applicable. *NO DOCS -> NO MERGE*.
5. Submit a pull request.
6. Bask in the glory of having helped create content on one of the best platforms ever devised.
### For non-developers
1. Buy me a beer if you see me at ElixirConf.
Wishlist
========* C/SIMD native extensions (probably want to live in a different, API-compatible library).
* Left-handed coordinate system support (don't care enough right now, but some interop would appreciate it).
* Functions to convert to packed 32-bit and 64-bit float byte arrays.
License
=======This project is put into the public domain under the unlicense.
If you can't use that, consider it under the WTFPL.
If you can't use *that*, fine--use the new BSD license.
Contributors
=============
* Chris Ertel
* Ivan Miranda
* Matthew Philyaw