Skip to content

Instantly share code, notes, and snippets.

View motoishmz's full-sized avatar

Motoi Shimizu motoishmz

View GitHub Profile
@motoishmz
motoishmz / GLSL-geom-billboard.md
Created February 13, 2016 03:06 — forked from patriciogonzalezvivo/GLSL-geom-billboard.md
GLSL Geom shader billboard
    vec2 offSet[4];
 	offSet[0] = vec2(0.,0.);
    offSet[1] = vec2(0.,1.);
    offSet[2] = vec2(1.,0.);
    offSet[3] = vec2(1.,1.);

	vec3 zAxis = normalize( vNormal[0] );
    vec3 yAxis = vec3( 0.0, 1.0, 0.0 );
 vec3 xAxis = normalize( cross(zAxis, yAxis) );
@motoishmz
motoishmz / GLSL-Noise.md
Created February 13, 2016 03:05 — forked from patriciogonzalezvivo/GLSL-Noise.md
GLSL Noise Algorithms

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);
}
(function(){
var url = "http://syedrezaali.com/apps/vase/?";
var params = {
"Facets": Math.random() * 6
,"Top%20Radius": Math.random() * 3
,"Bottom%20Radius": Math.random() * 30
,"Transition%20Radius": Math.random() * 30
,"Layers": Math.random() * 30
,"Height": Math.random() * 30
,"Transition%20Height": Math.random() * 30
@motoishmz
motoishmz / OF90RC2_emptyExample_message_on_console.h
Last active November 2, 2015 09:04
The fresh emptyExample runs fine on Xcode7 Debug/Release, but this message appears on console after editing emptyExample a couple of times. Then it never starts in spite of the build succeeded.
//
// This is an automatically generated file.
// Do not edit.
//
const unsigned short expTable[] =
{
0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00,
0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00,
0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00,
@motoishmz
motoishmz / build-caffe.md
Last active August 31, 2015 08:12 — forked from kylemcdonald/build-caffe.md
How to build Caffe for OS X.

Theory of Building Caffe on OS X

Introduction

Our goal is to run python -c "import caffe" without crashing. For anyone who doesn't spend most of their time with build systems, getting to this point can be extremely difficult on OS X. Instead of providing a list of steps to follow, I'll try to epxlain why each step happens.

This page has OS X specific install instructions.

I assume:

@motoishmz
motoishmz / ofxZmq_diff.patch
Created July 27, 2015 18:00
今日教えてもらった奴のdiff: $ patch -p0 < ofxZmq_diff.patch
diff --git a/libs/zmq/src/config.hpp b/libs/zmq/src/config.hpp
index 6e5ef5a..5c1e6c8 100644
--- a/libs/zmq/src/config.hpp
+++ b/libs/zmq/src/config.hpp
@@ -20,6 +20,8 @@
#ifndef __ZMQ_CONFIG_HPP_INCLUDED__
#define __ZMQ_CONFIG_HPP_INCLUDED__
+#undef check
+
@motoishmz
motoishmz / bmpcc.md
Last active August 29, 2015 14:25 — forked from novi/bmpcc.md

たまにアップデートします

ボタンダブルクリックなどの操作もあるので一度説明書は読んだほうがよい。 サポートからダウンロードできるアプリで本体のファームウェアをアップデートできる。(ファームはネット経由の自動アップデートではないので毎回自分でアプリを更新する)

電源

  • 電池フル充電で1時間持たない。40分くらい。
  • Nikon純正の互換予備バッテリ必須。
#include "ofMain.h"
class ofApp : public ofBaseApp
{
public:
void setup()
{
// GLFW Monitor handling
#include "ofMain.h"
class ofApp : public ofBaseApp
{
const int limit = 100;
const int num_col = 10;
const int col_size = 25;
public: