Skip to content

Instantly share code, notes, and snippets.

Patricio Gonzalez Vivo patriciogonzalezvivo

Block or report user

Report or block patriciogonzalezvivo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@patriciogonzalezvivo
patriciogonzalezvivo / MakingGeometries.md
Last active May 27, 2020
Creating Geometries in openFrameworks
View MakingGeometries.md

Face by Face

void addFace(ofMesh& mesh, ofVec3f a, ofVec3f b, ofVec3f c) {
	ofVec3f normal = ((b - a).cross(c - a)).normalize();
	mesh.addNormal(normal);
	mesh.addVertex(a);
	mesh.addNormal(normal);
	mesh.addVertex(b);
	mesh.addNormal(normal);
View GLSL-Math.md

Trigonometry

const float PI = 3.1415926535897932384626433832795;
const float PI_2 = 1.57079632679489661923;
const float PI_4 = 0.785398163397448309616;

float PHI = (1.0+sqrtf(5.0))/2.0;
View GLSL-Noise.md

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
	return mix(rand(fl), rand(fl + 1.0), fc);
}
View SFM.md

VisualSFM by Changchang Wu

Probably the most straight forward way to start generating Point Clouds from a set of pictures.

VisualSFM is a GUI application for 3D reconstruction using structure from motion (SFM). The reconstruction system integrates several of my previous projects: SIFT on GPU(SiftGPU), Multicore Bundle Adjustment, and Towards Linear-time Incremental Structure from Motion. VisualSFM runs fast by exploiting multicore parallelism for feature detection, feature matching, and bundle adjustment.

For dense reconstruction, this program supports Yasutaka Furukawa's PMVS/CMVS tool chain, and can prepare data for Michal Jancosek's CMP-MVS. In addition, the output of VisualSFM is natively supported by Mathias Rothermel and Konrad Wenzel's [SURE]

@patriciogonzalezvivo
patriciogonzalezvivo / PythonSetup.md
Created Oct 7, 2014
How to install Python correctly on Mac OSX
View PythonSetup.md

Install Homebrew

ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"

Add PATH to ~/.bash_profile and ~/.zshrc

export PATH=/usr/local/bin:$PATH
@patriciogonzalezvivo
patriciogonzalezvivo / GLSL-Lights.md
Last active Apr 23, 2020
GLSL Shaders Lights Funtions
View GLSL-Lights.md
View GLSL-color.md

RGB - YUB

mat3 yuv2rgb = mat3(1.0, 0.0, 1.28033, 1.0, -0.21482, -0.38059, 1.0, 2.12798, 0.0);
mat3 rgb2yuv = mat3(0.2126, 0.7152, 0.0722, -0.09991, -0.33609, 0.43600, 0.615, -0.5586, -0.05639);

RGB - HSV

@patriciogonzalezvivo
patriciogonzalezvivo / postgisOSM-LAS.md
Last active Oct 4, 2019
Loading OSM and LIDar to PostGIS
View postgisOSM-LAS.md
@patriciogonzalezvivo
patriciogonzalezvivo / toxic
Created Jun 27, 2015
Compiling a Tox Client in RPi
View toxic
git clone git://github.com/jedisct1/libsodium.git
cd libsodium
git checkout tags/1.0.0
./autogen.sh
./configure && make check
sudo checkinstall --install --pkgname libsodium --pkgversion 1.0.0 --nodoc
sudo ldconfig
cd ..
git clone git://github.com/irungentoo/toxcore.git
You can’t perform that action at this time.