Skip to content

Instantly share code, notes, and snippets.

@roxlu ☾ roxlu

Block or report user

Report or block roxlu

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
View README.md

Mitchell’s best-candidate algorithm generates a new random sample by creating k candidate samples and picking the best of k. Here the “best” sample is defined as the sample that is farthest away from previous samples. The algorithm approximates Poisson-disc sampling, producing a much more natural appearance (better blue noise spectral characteristics) than uniform random sampling.

See also the white-on-black and Voronoi variations of this example.

@roxlu
roxlu / test_vorbis.c
Last active Aug 29, 2015
Decoding vorbis flow (w/o cleanup yet).
View test_vorbis.c
/*
test_vorbis
------------
See online version: https://gist.github.com/roxlu/af1ffc1290b9dc37b5b9
Example code which decodes a .ogg file that contains vorbis and/or
some other stream, e.g. theora. We ignore all non-vorbis streams and
simply flush the packets.
@roxlu
roxlu / test_fex_load_image.cpp
Created Aug 22, 2014
Examples on how to load + reuse memory using rx_load_png and rx_load_jpg
View test_fex_load_image.cpp
/*
test_fex_load_image
-------------------
Plain test which loads + reloads a couple of images and reallocating the
previously allocated buffer when needed. Just a tiny test to speed up
the image loading process.
*/
@roxlu
roxlu / fun.cpp
Last active Aug 29, 2015 — forked from kizzx2/fun.cpp
THIS DOES NOT WORK WITH 5.2
View fun.cpp
// fun.cpp
extern "C"
{
#include <lua.h>
#include <lauxlib.h>
#include <lualib.h>
}
#include <iostream>
@roxlu
roxlu / ptf.cpp
Created Dec 27, 2011
Parallel Transport Frames - TEST
View ptf.cpp
//--------------------------------------------------------------
void testApp::setup(){
ofSetFrameRate(60);
ofSetVerticalSync(true);
ofBackground(33);
donnie.create(125);
donnie.si.drawUsingQuads();
//renderer.addSceneItem(donnie.si);
@roxlu
roxlu / testApp.h
Created Feb 7, 2012
Supersimp water simulation
View testApp.h
#pragma once
#include "ofMain.h"
#include "Roxlu.h"
struct point {
int i;
int j;
};
class testApp : public ofBaseApp{
View badwords.txt
ahole
anus
ash0le
ash0les
asholes
ass
Ass Monkey
Assface
assh0le
assh0lez
@roxlu
roxlu / save_binary.cpp
Created Feb 9, 2012
Saving data into a binary file (no endianness check)
View save_binary.cpp
#include "TwitterSearchTermQueue.h"
namespace roxlu {
TwitterSearchTermQueue::TwitterSearchTermQueue()
:filepath()
{
}
TwitterSearchTermQueue::~TwitterSearchTermQueue() {
@roxlu
roxlu / fix_header_includes.py
Created Feb 10, 2012
Fixing includes for openni framework
View fix_header_includes.py
#!/usr/bin/env python
import sys
import os
import re
# Create map of localfiles
local_files = []
for dirname, dirnames, filenames in os.walk('.'):
@roxlu
roxlu / testapp.cpp
Created Mar 16, 2012
Curl FTP upload
View testapp.cpp
//--------------------------------------------------------------
void testApp::setup(){
ftp.setup("ftp.example.com", "username", "password", "HTML/"); // HTML/ <-- must end with slash.
}
//--------------------------------------------------------------
void testApp::update(){
ofSetWindowTitle(ofToString(ofGetFrameRate()));
ftp.update();
}
You can’t perform that action at this time.