This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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フレ前の生死が格納される配列 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"patcher" : { | |
"fileversion" : 1, | |
"appversion" : { | |
"major" : 7, | |
"minor" : 0, | |
"revision" : 0, | |
"architecture" : "x64", | |
"modernui" : 1 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//画像処理プログラミング 最終課題 | |
//"ふりかえってもいない" | |
//松橋百葉(環境情報1年/71747568) | |
//参考: ProcessingでのUSBカメラ読み込み(https://office606.org/archives/529/) | |
import processing.video.*; //webcam使用用のライブラリ | |
import oscP5.*; //以下osc通信用のライブラリ | |
import netP5.*; |
NewerOlder