Giter Site home page Giter Site logo

cppd / math Goto Github PK

View Code? Open in Web Editor NEW
12.0 3.0 2.0 16.58 MB

The more dimensions, the better the geometry.

License: GNU General Public License v3.0

CMake 0.55% C++ 96.64% C 0.18% GLSL 2.24% Python 0.40%
fun 3d 4d 5d 6d computational-geometry geometry graphics rendering algorithms

math's Introduction

Math Viewer

Just for fun with mathematics and stuff

image

Contents

File types

  • OBJ and STL files with objects in 3-space
  • Extended OBJ and STL files with objects in n-space
  • Text files with the coordinates of points in n-space

Rendering

GPU

  • Triangle meshes (rasterization)
  • Volumes (ray marching)
  • Isosurfaces (ray marching)
  • Shadows (ray tracing, ray marching, shadow mapping)
  • Order-independent transparency (lists of fragments)

CPU

  • Bidirectional path tracing with multiple importance sampling
  • (n-1)-simplex meshes in n-space on (n-1)-dimensional screen
  • n-dimensional microfacet BRDF
  • Spectral rendering

Algorithms

2-space

C++ and GLSL

Subject Algorithms
Discrete Fourier transform for arbitrary sizes Bluestein's algorithm and radix-2 fast Fourier transform
Optical flow Pyramidal Lucas-Kanade
Convex hull Divide et impera

Spaces with arbitrary number of dimensions

C++

Subject Algorithms
Convex hull Randomized incremental
Delaunay triangulation Convex hull of paraboloid
Voronoi diagram The Delaunay triangulation
Manifold reconstruction Cocone
Manifold reconstruction with boundary detection BoundCocone
Euclidean minimum spanning tree Kruskal’s algorithm and the Delaunay triangulation
Intersection of hyperplanes Gaussian elimination
Intersection of convex polytopes The simplex algorithm
Ray intersection acceleration using spatial subdivision 2d-trees
Ray intersection acceleration using object subdivision Bounding volume hierarchies and the surface area heuristic
Eigenvalues and eigenvectors of symmetric matrices Jacobi method
Least squares fitting a plane to points Principal component analysis
State estimation The Kalman filter
The extended Kalman filter (EKF)
The unscented Kalman filter (UKF)
The H filter

Technical details

Property Value
Programming languages C++23, GLSL 4.60
C++ compilers GCC 13, Clang 18
Platforms Linux
Graphics and compute APIs Vulkan 1.3 with ray tracing extensions
Frameworks Qt 6
Libraries FreeType, GMP
Optional libraries cuFFT (for DFT tests), FFTW (for DFT tests)
Build systems CMake

Images

3-manifold reconstruction and path tracing in 4-space

2D images of a 3D image of the 3-manifold reconstructed from the points on the 3-torus T3 (S1×S1×S1)

  • 5-space
    • The convex hull
    • 4-simplex facets
  • 4-space
    • 3-simplex mesh without boundary
    • 4-parallelotope hierarchy
    • 4-dimensional microfacet BRDF
    • 3-ball light source
    • 4-dimensional soft shadows
    • Parallel projection onto 3D screen

Volumetric rendering

image image image image image image image image image image image image image image image

4D Cornell box

2D images of a 3D image of the 4-dimensional Cornell box

  • Seven 3-parallelotopes (the sides of the box)
  • One 3-parallelotope light source
  • One 3-simplex mesh without boundary (3-sphere)
  • One 4-parallelotope
  • 4-dimensional microfacet BRDF
  • 4-dimensional soft shadows
  • Perspective projection onto 3D screen

image image image image

Real-time rendering

Semitransparent objects

  • Triangle mesh (green) and its ray tracing shadows
  • Isosurface (blue) and its ray marching shadows

image image image image

3D models

Spectral rendering

  1. Blackbody 2500 K
  2. Daylight 4000 K
  3. Daylight D65
  4. Blackbody 12000 K

image image image image

image image image image

4D polytope

4-dimensional cross-polytope

v -11   0   0   0
v   0 -12   0   0
v   0   0 -13   0
v   0   0   0 -14
v   0   0   0  15
v   0   0  16   0
v   0  17   0   0
v  18   0   0   0
f 1 2 3 4
f 1 2 3 5
f 1 2 6 4
f 1 2 6 5
f 1 7 3 4
f 1 7 3 5
f 1 7 6 4
f 1 7 6 5
f 8 2 3 4
f 8 2 3 5
f 8 2 6 4
f 8 2 6 5
f 8 7 3 4
f 8 7 3 5
f 8 7 6 4
f 8 7 6 5

image image image image

math's People

Contributors

cppd avatar

Stargazers

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