This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this python script simply creates a simple grass atlas image. | |
# the atlas is used in this small minecraft renderer: | |
# https://github.com/mikolalysenko/regl/pull/21 | |
import png | |
import os | |
import noise | |
# open file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
<p>Metaball rendering demo. Many ideas and code taken from <a href="https://www.clicktorelease.com/code/bumpy-metaballs">here</a></p> | |
*/ | |
const regl = require('../regl')() | |
const isosurface = require('isosurface') | |
const normals = require('angle-normals') | |
const mat3 = require('gl-mat3') | |
const camera = require('./util/camera')(regl, { | |
distance: 1, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <igl/guess_extension.h> | |
#include <igl/read_triangle_mesh.h> | |
#include <igl/viewer/Viewer.h> | |
#include <Eigen/Core> | |
#include <iostream> | |
#include <string> | |
#include <cstdio> | |
#include <unistd.h> | |
int main(int argc, char * argv[]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
GLM | |
*/ | |
#include <glm/glm.hpp> | |
#include <glm/gtc/matrix_transform.hpp> | |
#include <glm/gtc/type_ptr.hpp> | |
#include <sstream> | |
#include <fstream> | |
#include <stdio.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// program that outputs a single vector cloud. | |
#include <stdio.h> | |
#include <math.h> | |
#include <stdlib.h> | |
#include <float.h> | |
#include <vector> | |
#include <string> | |
using std::vector; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <math.h> | |
#include <stdlib.h> | |
#include <vector> | |
#include <string> | |
using std::vector; | |
using std::string; | |
using std::to_string; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
The MIT License (MIT) | |
Copyright (c) 2016 Eric Arnebäck | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################################ | |
How to solve a matrix equation with Cholesky Decomposition | |
############################################################ | |
We want to solve the matrix equation Ax=b. So we want x. The Cholesky decomposition of A is just | |
the matrix product A = L(L^T). Where L is some lower triangular matrix, and L^T is its transpose. | |
So L^T is upper triangular. See wikipedia an example of such a decomposition: | |
https://en.wikipedia.org/wiki/Cholesky_decomposition#Example | |
If we now substitute our decomposition of A into our equation we get |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// empty fragment shader. | |
void main() | |
{ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#version 430 | |
#define GLUINT_MAX 4294967295 | |
#define NULL_NODE (GLUINT_MAX - 0) | |
#define SUBDIVIDE_NODE (GLUINT_MAX - 1) | |
#define LEAF_NODE (GLUINT_MAX - 2) | |
// node in the octree. | |
struct OctNode { |
OlderNewer