All Projects → crertel → graphmath

crertel / graphmath

Licence: Unlicense license
An Elixir library for performing 2D and 3D mathematics.

Programming Languages

elixir
2628 projects

Projects that are alternatives of or similar to graphmath

Sharpmath
A small .NET math library.
Stars: ✭ 36 (-50%)
Mutual labels:  vector, matrices
ad-lens
Automatic Differentiation using Pseudo Lenses. Neat.
Stars: ✭ 16 (-77.78%)
Mutual labels:  vector, matrices
sparse
Sparse matrix formats for linear algebra supporting scientific and machine learning applications
Stars: ✭ 136 (+88.89%)
Mutual labels:  vector, matrices
Fmatvec
A fast vector/matrix library
Stars: ✭ 5 (-93.06%)
Mutual labels:  vector, matrices
gmath
Lightweight C++ geometry math library (Vectors, Quaternions and Matrices)
Stars: ✭ 33 (-54.17%)
Mutual labels:  vector, matrices
CuVec
Unifying Python/C++/CUDA memory: Python buffered array ↔️ `std::vector` ↔️ CUDA managed memory
Stars: ✭ 73 (+1.39%)
Mutual labels:  vector
ludigraphix.github.io
Documentation for Ludigraphix
Stars: ✭ 21 (-70.83%)
Mutual labels:  vector
vector
A PHP functional programming library.
Stars: ✭ 19 (-73.61%)
Mutual labels:  vector
avatarmake
Easily make your own cartoon avatar base on d3.js
Stars: ✭ 34 (-52.78%)
Mutual labels:  vector
hexagonTab
Hexagon bookmarks accented with a chosen colour. Customise the layout, style, background and bookmarks with hexagonTab.
Stars: ✭ 65 (-9.72%)
Mutual labels:  hex
explicit-semantic-analysis
Wikipedia-based Explicit Semantic Analysis, as described by Gabrilovich and Markovitch
Stars: ✭ 34 (-52.78%)
Mutual labels:  vector
ecto commons
Ecto common validators for Date, Time, URLs, Emails, PostalCodes, Phone Numbers, Luhn checks, etc.
Stars: ✭ 33 (-54.17%)
Mutual labels:  hex
BitLens
🔎 Have your bits and eat them too! A C++17 bit lens container for vector types.
Stars: ✭ 20 (-72.22%)
Mutual labels:  vector
ProceduralHexTerrainGenerator
Procedural Hex Terrain Generator
Stars: ✭ 20 (-72.22%)
Mutual labels:  hex
mix script
A build tool which allows you to use mix packages in an elixir script
Stars: ✭ 16 (-77.78%)
Mutual labels:  hex
Fortress-of-Solitude
This Library has resources to solve common data structure algorithm problems like a Doubly linked list, Generic trees, Queue, Stack, and other algorithms. Each lib has an option to carry your custom data in elements. Custom data in detail, other fantastic resources.
Stars: ✭ 53 (-26.39%)
Mutual labels:  vector
vectorshapes-unity
Library for drawing vector shapes in Unity.
Stars: ✭ 44 (-38.89%)
Mutual labels:  vector
nrf-intel-hex
Yet another parser for "Intel HEX" files.
Stars: ✭ 21 (-70.83%)
Mutual labels:  hex
safe-svg
Enable SVG uploads and sanitize them to stop XML/SVG vulnerabilities in your WordPress website.
Stars: ✭ 129 (+79.17%)
Mutual labels:  vector
velcro
Collection initialization macros for Rust
Stars: ✭ 45 (-37.5%)
Mutual labels:  vector

CircleCI Inline docs hex.pm version hex.pm downloads Coverage Status

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 package manager.

Just add it to your mix.exs file like so:

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