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
void setup(){ | |
colorMode(HSB,360,100,100); | |
size(600,600); | |
background(1,0,99); | |
stroke(189,99,99); | |
strokeWeight(1); | |
frameRate(20); | |
} | |
void draw(){ |
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
//http://instagram.com/p/u3SA8fx8pl/?modal=true | |
//insert music file in data | |
//import liblary | |
import ddf.minim.analysis.*; | |
import ddf.minim.*; | |
Minim minim; | |
AudioPlayer player; |
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
//https://www.youtube.com/watch?v=_gfaIGxQ-Dg | |
//http://micromeeeter.hateblo.jp/entry/2014/11/29/000706 | |
import ddf.minim.*; | |
Minim minim; | |
AudioPlayer player; | |
final int turnNumber = 45; //Rotational speed 0f the record (33, 45, ...) | |
final int fps = 60; |
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
//http://micromeeeter.hateblo.jp/entry/2015/01/11/222630 | |
//instoll controlP5 | |
//insert music file in data | |
import ddf.minim.*; | |
import ddf.minim.analysis.*; | |
Minim minim; | |
import controlP5.*; | |
ControlP5 cp5; |
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
//This program is to be drawn by calculating the Pascal's triangle. | |
// | |
//パスカルの三角形を計算,描画するプログラムです. | |
//真面目に計算しているのである程度いくとintに収まりきらず正しくなくなります. | |
//パスカルの三角形で特定の自然数の倍数を塗りつぶしていくと規則的な図形が出てくるよ〜っていう性質を見たいときは | |
//訂正してくださった方のコメントを見てください...ありがとうございます | |
final int rowNum = 300; //Select an arbitrary natural number 任意の自然数を入れる | |
int[] termNum = new int[rowNum]; //Array that contains the number of terms in a row 一列における項数を入れる配列 |
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); | |
ofSetBackgroundAuto(false); | |
ofBackground(0, 0, 0); | |
ofEnableBlendMode(OF_BLENDMODE_ALPHA); | |
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(){ | |
ofBackground(29, 44, 121); | |
ofEnableBlendMode(OF_BLENDMODE_ALPHA); | |
ofSetWindowShape(width, height); //720*720 | |
ofSetFrameRate(30); | |
ofSetLineWidth(3); |
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
//SFC17「CGとCADの数理」で出たn次ベジェ曲線を実装する課題 | |
//本当はaddDegreeとかやりたくない、addPointだけでやりたいから時間が出来たらやる | |
//コメントがめんどくさいのであとでやる | |
class BezierCurve { | |
ArrayList<Integer> Px = new ArrayList<Integer>(); | |
ArrayList<Integer> Py = new ArrayList<Integer>(); | |
PVector[] R; | |
int tn; | |
int n; //degree |
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
//sfc17「グラフィックスプログラミング」で提出した課題 | |
//三次元メッシュのように見えてそうではない | |
// | |
//This program requires you to import two libraries, GLUT.framework and OpenGL.framework. | |
#include <iostream> | |
#include <OpenGL/OpenGL.h> | |
#include <GLUT/GLUT.h> | |
#include <math.h> |
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.video.*; | |
import processing.opengl.*; | |
Capture video; | |
ArrayList<PVector> ball = new ArrayList<PVector>(); //ボール位置の可変長配列 | |
float g_x, g_y; //抽出した青い部分の重心座標 | |
int sum; //抽出した青いpixelの総数 |
OlderNewer