Skip to content

Instantly share code, notes, and snippets.

View micromeeeter's full-sized avatar

Momoha Matsuhashi micromeeeter

View GitHub Profile
@micromeeeter
micromeeeter / forProsperityOfTheWorld.ino
Created January 21, 2018 11:49
SFC2017年度秋学期 電子工作 最終課題 Wild Computing / 自然の中で機能するシステム-「世界の繁栄のために」
#include <Servo.h>
//motor A connected between A01 and A02
//motor B connected between B01 and B02
int STBY = 9; //standby
//Motor A
const int PWMA = 3; //Speed control
const int AIN1 = 4; //Direction
@micromeeeter
micromeeeter / linesStudy.pde
Created December 1, 2017 08:01
p5で描いた絵をpdfで吐くサンプル
import processing.pdf.*; //pdf吐くためのライブラリをインポート
size(500, 500, PDF, "test.pdf");
stroke(0);
for(int i = 0; i < 50; i++){
for(int j = 0; j < 50; j++){
float a = random(1);
if(a < 0.5){
@micromeeeter
micromeeeter / gameOfLifeToCrossStitch.pde
Created December 1, 2017 07:39
ライフゲームをクロスステッチの図案として見る
//AT17adcal :: 1 :: ジェネるマンに推したい手芸の話
//1: ライフゲームをクロスステッチする
//サンプルコード by モハ
final int cell = 10; //図面の1マスの1辺の長さ
final int widthNum = 40; //life gameの発生しうるマスの横の個数
final int heightNum = 40; //life gameの発生しうるマスの縦の個数
boolean[][] state = new boolean[widthNum + 2][heightNum + 2]; //1マスごとの、現在の生死が格納される配列
boolean[][] state_pre = new boolean[widthNum + 2][heightNum + 2]; //1マスごとの、1フレ前の生死が格納される配列
@micromeeeter
micromeeeter / main.cpp
Created September 10, 2017 12:37
transboundary :: OSC preparer
#include "ofMain.h"
#include "ofApp.h"
//========================================================================
int main( ){
ofSetupOpenGL(500,500,OF_WINDOW); // <-------- setup the GL context
// this kicks off the running of my app
// can be OF_WINDOW or OF_FULLSCREEN
// pass in width and height too:
@micromeeeter
micromeeeter / main.cpp
Created September 10, 2017 12:33
transboundary :: threshold GUI controller from Wekinator to Arduino via OSC
//from wekinator and gui part written by Momoha Matsuhashi
//serial communication part(arduino) written by Shin Hanagata
#include "ofMain.h"
#include "ofApp.h"
//========================================================================
int main( ){
ofSetupOpenGL(1024,768,OF_WINDOW); // <-------- setup the GL context
@micromeeeter
micromeeeter / transboundary_granularized.maxpat
Last active September 9, 2017 03:24
transboundary :: sound
{
"patcher" : {
"fileversion" : 1,
"appversion" : {
"major" : 7,
"minor" : 0,
"revision" : 0,
"architecture" : "x64",
"modernui" : 1
}
@micromeeeter
micromeeeter / main.cpp
Created September 9, 2017 02:57
transboundary :: webcam
#include "ofMain.h"
#include "ofApp.h"
//========================================================================
int main( ){
ofSetupOpenGL(1024,768,OF_WINDOW); // <-------- setup the GL context
// this kicks off the running of my app
// can be OF_WINDOW or OF_FULLSCREEN
// pass in width and height too:
//import "img.png" as a background image to "data"
final int n = 5;
PVector[] p1 = new PVector[n];
PVector[] p2 = new PVector[n];
PVector[] p3 = new PVector[n];
PVector[] v1 = new PVector[n];
PVector[] v2 = new PVector[n];
PVector[] v3 = new PVector[n];
@micromeeeter
micromeeeter / main.cpp
Created August 2, 2017 05:06
traffic information (oFでクラスの練習 SFC17春グラフィックスプログラミング課題)
#include "ofMain.h"
#include "ofApp.h"
//========================================================================
int main( ){
ofSetupOpenGL(1024,768,OF_WINDOW); // <-------- setup the GL context
// this kicks off the running of my app
// can be OF_WINDOW or OF_FULLSCREEN
// pass in width and height too:
@micromeeeter
micromeeeter / posCatchSender.pde
Created July 31, 2017 04:14
SFC17年度春学期 画像処理プログラミング最終作品"ふりかえってもいない"
//画像処理プログラミング 最終課題
//"ふりかえってもいない"
//松橋百葉(環境情報1年/71747568)
//参考: ProcessingでのUSBカメラ読み込み(https://office606.org/archives/529/)
import processing.video.*; //webcam使用用のライブラリ
import oscP5.*; //以下osc通信用のライブラリ
import netP5.*;