Skip to content

Instantly share code, notes, and snippets.

View Erkaman's full-sized avatar

Eric Arnebäck Erkaman

View GitHub Profile
@Erkaman
Erkaman / main.cpp
Created December 31, 2016 11:50
black-white-animation. Source code of this https://twitter.com/erkaman2/status/815151845068992512
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <vector>
#include <string>
using std::vector;
using std::string;
using std::to_string;
@Erkaman
Erkaman / cloud_gen.cpp
Last active December 28, 2016 17:30
program that outputs a single vector cloud
// 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;
/*
GLM
*/
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>
#include <sstream>
#include <fstream>
#include <stdio.h>
@Erkaman
Erkaman / viewmesh.cpp
Created December 18, 2016 18:56 — forked from alecjacobson/viewmesh.cpp
Command line program to view 3D meshes from files, standard input and pipes
#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[])
/*
<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,
@Erkaman
Erkaman / create_grass_atlas.py
Created July 1, 2016 19:01
Python script that creates a simple Minecraft grass atlas.
# 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