Skip to content

Instantly share code, notes, and snippets.

@satoruhiga
satoruhiga / SimpleKalmanFilter
Last active September 24, 2015 16:38
SimpleKalmanFilter
class SimpleKalmanFilter
{
public:
float xhat, xhatminus;
float P, Pminus;
float _x, _p;
float Q, R, K;
@satoruhiga
satoruhiga / uncrustify.cfg
Created April 1, 2011 06:35
uncrustify.cfg
indent_align_string=false
indent_braces=false
indent_braces_no_func=false
indent_brace_parent=false
indent_namespace=false
indent_extern=false
indent_class=true
indent_class_colon=false
indent_else_if=false
indent_func_call_param=false
@satoruhiga
satoruhiga / chrome search engine settings
Created May 25, 2011 18:40
my chrome search engine settings
Google ja:
http://www.google.com/search?lr=lang_ja&q=%s
Google en:
http://www.google.com/search?lr=lang_en&q=%s
oF forum:
http://www.google.com/search?sitesearch=http%3A%2F%2Fforum.openframeworks.cc&q=%s
C++ reference:
http://www.google.com/search?sitesearch=http%3A%2F%2Fwww.cppreference.com/wiki/&q=%s
C++ reference(ja):
http://www.google.com/search?sitesearch=http%3A%2F%2Fwww.cppreference.com/wiki/jp/&q=%s
@satoruhiga
satoruhiga / run_titanium.py
Created July 7, 2011 13:01
run_titanium.py
#!/usr/bin/env python
'''
dependent to ios-sim command (https://github.com/Fingertips/ios-sim)
brew install ios-sim
'''
import os
def search_parent(path, target, count):
@satoruhiga
satoruhiga / retina2normal.py
Created July 11, 2011 19:19
retina2normal.py
#!/usr/bin/env python
import os, sys
imgs = [x for x in os.listdir('.') if x.endswith('@2x.png')]
for i in imgs:
t = i.replace('@2x.png', '.png')
os.system("convert -resize 50%% %s %s" % (i, t))
@satoruhiga
satoruhiga / billboard.h
Created July 17, 2011 09:17
OpenGL Billboard
// http://marina.sys.wakayama-u.ac.jp/~tokoi/?date=20110221
inline void billboard()
{
GLfloat m[16];
glGetFloatv(GL_MODELVIEW_MATRIX, m);
float inv_len;
m[8] = -m[12];
@satoruhiga
satoruhiga / PolygonArc.hpp
Created August 10, 2011 16:10
PolygonArc
class PolygonArc
{
public:
PolygonArc()
{
curveResolution = 4;
}
void draw()
@satoruhiga
satoruhiga / testApp.cpp
Created August 18, 2011 18:44
Strip Sphere
#include "testApp.h"
//--------------------------------------------------------------
void testApp::setup()
{
ofSetFrameRate(60);
ofSetVerticalSync(true);
ofBackground(0);
@satoruhiga
satoruhiga / ofxKdTree.h
Created August 22, 2011 17:14
ofxKdTree
#include "kdtree.h"
template<class T>
class ofxKdTree
{
public:
ofxKdTree()
{
kd = kd_create(3);
@satoruhiga
satoruhiga / ofxSmooth.h
Created August 30, 2011 15:28
ofxSmooth.h
#pragma once
#include "ofMain.h"
template <class T>
class ofxSmooth
{
T value, value_t;
float smooth;