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
int NUM = 2000; | |
ParticleVec3[] particles = new ParticleVec3[NUM]; | |
void setup() { | |
size(1280, 720, P3D); | |
frameRate(60); | |
for (int i = 0; i < NUM; i++) { | |
particles[i] = new ParticleVec3(); | |
particles[i].radius = 4.0; | |
particles[i].position.set(random(width), random(height), random(height)); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>HTMLのテンプレート</title> | |
</head> | |
<body> | |
<h1>HTMLテンプレート</h1> | |
<p>HTMLのテンプレートです。</p> | |
</body> |
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 "ofApp.h" | |
//-------------------------------------------------------------- | |
void ofApp::setup(){ | |
//画面設定 | |
ofSetFrameRate(60); | |
ofBackground(0); | |
// Kinect初期化 | |
kinect.init(); | |
kinect.open(); |
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
PImage img; | |
void setup() { | |
size(800, 600); | |
img = loadImage("photo.jpg"); | |
image(img, 0, 0, width, height); | |
loadPixels(); | |
background(0); | |
} | |
void draw() { | |
noStroke(); |
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 "ofApp.h" | |
using namespace ofxCv; | |
using namespace cv; | |
void ofApp::setup() { | |
cam.initGrabber(ofGetWidth(), ofGetHeight()); | |
contourFinder.setMinAreaRadius(10); | |
contourFinder.setMaxAreaRadius(200); | |
} |
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
live_loop :live do | |
use_synth :mod_dsaw | |
with_fx :reverb do | |
add_note = 0 | |
8.times do | |
play choose([10, 14, 15, 17, 19]) + add_note, pan:rrand(-1.0, 1.0) | |
play choose([10, 14, 15, 17, 19]) + add_note + 12, pan:rrand(-1.0, 1.0) | |
sleep 0.5 * 0.5 * 0.5 | |
add_note = add_note + 12.0 | |
end |
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 "testApp.h" | |
using namespace ofxCv; | |
void testApp::setup() { | |
ofSetVerticalSync(true); | |
cam.initGrabber(640, 480); | |
tracker.setup(); | |
ofBackground(0); | |
} |
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
#!/bin/bash | |
S="$1" | |
(echo "main(t){for(t=0;;t++)putchar($S);}" | clang -x c - -w -o /tmp/bytebeat && /tmp/bytebeat | sox -q -traw -r8000 -b8 -e unsigned-integer - -tcoreaudio) |
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
// OpenCV輪郭抽出 | |
// ライブカメラバージョン | |
import gab.opencv.*; | |
import processing.video.*; | |
Capture video; // ライブカメラ | |
OpenCV opencv; // OpenCV | |
void setup() { |
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
size(800, 800); | |
float shades = 50.0; | |
noStroke(); | |
for(int i = 0; i < shades; i++){ | |
fill(color(255/shades*i)); | |
rect(width/shades*i, 0, width/shades, height); | |
} |