Code Monkey home page Code Monkey logo

pga3's Introduction

PGA3

This library provides Proper Geometry Algorithms, for doing geometry in 3D as the math-gods intended.

Psst ... if you're a math-person, this library implements Projective Geometric Algebra in 3D (i.e. โ„(3, 0, 1)), so that intersections and joins etc. are super easy to implement, and benefit from all the nicities of this algebra. But I don't want to scare our users, so we provide an API that normal humans can actually understand.

Status

Experimental and work in progress. I dug into this to see if it's something we could use in pygfx. I'm not sure yet. This state matches my progress (and understanding) so far.

Benefits of this library (over libs that use linalg)

  • Small size (once we have the algebra set up, all conversions, intersections etc. are one-liners).
  • Transformations (translation + rotations) can be composed with minimal loss of precision (in contrast to composing multiple 4x4 matrices).
  • Transformations are "linear", in that you can multiply them, e.g. to get smooth interpolation.
  • Less need for checks and exceptions: intersecting two parallel lines? Fine! The result is a point at infinity (a direction)!
  • No implicit design decisions like right-handed vs left-handed.

Diving into the algebra

This lib attempts to provide a way to use a very cool/advanced/new mathematical tool (3D PGA) without having to know about it.

If you do want to learn more about (projective) geometric algebra, here are some resources that I found useful. Prepare for your mind being blown:

pga3's People

Contributors

almarklein avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.