Git Product home page Git Product logo

3d_and_physics's Introduction

3D and Physics Math Tests - JS

Some 3D and rendering math in js.

  • Basic physics (with AABB trees and octrees, but not implemented yet in the collision checks),
  • graph node trees for translating/rotating meshes
  • 3D math e.g. basic linear algebra and calculus. Efficient nearest neighbor search.
  • pinhole camera model

Largely untested, more for exercise but eventually will get used by me (and thus cleaned up & demo'd).

The Mat4 and Camera matrix math in this version is based on using 2D arrays which is not quite as efficient but is conceptually easier. Meshes are still 1D arrays e.g. [p0x,p0y,p0z,p1x,p1y,p1z,p2x,p2y,p2z] Lots of better libraries for 1D array based matrix operations.

Bonus jank Double Pendulum simulation with 3 different derivations rendering side by side. They all have... issues... This is being made to explore more of the math of complex systems and learn lagrangian mechanics.

The web does not have good options for efficient pluggable 2d and 3d physics models to go on top of, say, a ThreeJS renderer. There are some things to do to leverage the gpu for simulating large physics body collections that I cannot find any JS implementations for that are developer oriented (if not behind a paywall or deeply integated in a larger system). I prefer few to no dependencies and otherwise just keeping my object formats fairly standard and general across libraries so it's easier to mix and match based on my needs. Maybe there will be a standard some day for all of the expected systems and data structures we are constantly redeveloping in each language etc, since right now that is mainly managed by what is actually efficient - which gets really esoteric really fast.

3d_and_physics's People

Contributors

joshbrew avatar

Watchers

 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.