SlideShare a Scribd company logo
‣
‣


‣
‣


‣
‣

‣
‣
‣
‣
‣
    ‣
    ‣


‣
    ‣
    ‣
‣
‣
    ‣


    ‣
    ‣
    ‣


    ‣
‣
‣
‣
‣
‣
‣
‣
‣
‣
‣
‣
To invent programs, you need to be able to capture abstractions and ex
    design. It’s the job of a programming language to help you do this. The
    process of invention and design by letting you encode abstractions tha
    It should let you make your ideas concrete in the code you write. Surf
    the architecture of your program.
‣
‣   All programming languages provide devices that help express abstrac
    are ways of grouping implementation details, hiding them, and giving
‣   a common interface—much as a mechanical object separates its interfa
    illustrated in “Interface and Implementation” .
‣
    Figure 2-1            Inte rfa ce a nd Im ple m e nta tion

    interface                         implementation




                      11
                 10
                9
                 8
                      7
                              6
‣
‣
‣
‣
‣
‣
‣




    getName()   getName()
‣
    ‣
    ‣
‣
‣
‣
‣


‣
‣
‣
‣
‣



‣
‣
‣

‣
‣
‣
‣
‣
‣


‣


‣
    ‣
    ‣
    ‣

‣
    ‣

    ‣
‣


‣
    ‣
    ‣
    ‣
    ‣
    ‣
    ‣
    ‣
    ‣
‣


‣
    ‣
    ‣
    ‣


‣
    ‣
    ‣
    ‣
‣
#pragma once

#include "ofMain.h"

class Particle {
public:
!
    ofVec2f pos; //
    ofVec2f vel; //
    ofVec2f frc; // (     )
    float damping; //

    Particle();
    virtual ~Particle(){};
    void resetForce();
    void addForce(float x, float y);
    void addDampingForce();
    void setInitialCondition(float px, float py, float vx, float vy);
    void update();
    void draw();

protected:
private:
};
‣
#include "Particle.h"

//           (     )
Particle::Particle(){
!   setInitialCondition(0,0,0,0);
!   damping = 0.01f;
}

//   (   )
void Particle::resetForce(){
    frc.set(0,0);
}

//
void Particle::addForce(float x, float y){
    frc.x = frc.x + x;
    frc.y = frc.y + y;
}

//
void Particle::addDampingForce(){
    frc.x = frc.x - vel.x * damping;
    frc.y = frc.y - vel.y * damping;
}
‣
//
void Particle::setInitialCondition(float px, float py, float vx, float vy){
    pos.set(px,py);
!   vel.set(vx,vy);
}

//
void Particle::update(){!
!   vel = vel + frc;
!   pos = pos + vel;
}

//
void Particle::draw(){
    ofCircle(pos.x, pos.y, 3);
}
‣
‣


‣
    ‣


‣
    ‣
    ‣
    ‣


‣
    ‣
‣
#pragma once

#include "ofMain.h"
#include "Particle.h"

class testApp : public ofSimpleApp{
!
public:

     void setup();
     void update();
     void draw();

     void keyPressed (int key);
     void keyReleased (int key);

     void   mouseMoved(int x, int y );
     void   mouseDragged(int x, int y, int button);
     void   mousePressed(int x, int y, int button);
     void   mouseReleased();

     //      Particle
     Particle p;
};
‣
#include "testApp.h"

void testApp::setup(){!
!   ofSetVerticalSync(true);
!   ofSetFrameRate(60);
!   ofBackground(0, 0, 0);
!   p.setInitialCondition(ofGetWidth()/2, ofGetHeight()/2,
                           ofRandom(-10,10), ofRandom(-10,10));
}

void testApp::update(){
!   p.resetForce();
!   p.addDampingForce();
!   p.update();

}

void testApp::draw(){
!   ofSetColor(255, 255, 255);
!   p.draw();
}
‣
‣



‣
    ‣
        ‣
    ‣
        ‣
    ‣
        ‣
    ‣
        ‣
‣
void testApp::mousePressed(int x, int y, int button){
! p.setInitialCondition(x,y,ofRandom(-10,10), ofRandom(-10,10));
}
‣
‣


‣
‣
‣
‣
‣
‣



    p[0]
    p[1]
    p[2]   NUM
‣



‣
‣
Particle p[100];




‣
‣

vector <Particle> p;
‣
‣



    Particle p[NUM]

          p[0]
          p[1]
          p[2]        NUM



         p[NUM]
‣
#pragma once

#include "ofMain.h"
#include "Particle.h"

#define NUM 100

class testApp : public ofSimpleApp{
!
public:

     void setup();
     void update();
     void draw();

     void keyPressed (int key);
     void keyReleased (int key);

     void   mouseMoved(int x, int y );
     void   mouseDragged(int x, int y, int button);
     void   mousePressed(int x, int y, int button);
     void   mouseReleased();

     //      Particle      (NUM )
     Particle p[100];
};
‣
#include "testApp.h"

void testApp::setup(){!
!   ofSetVerticalSync(true);
!   ofSetFrameRate(60);
!   ofBackground(0, 0, 0);
}

void testApp::update(){
    for (int i = 0; i < NUM; i++) {
        p[i].resetForce();
        p[i].addForce(0, 0.1);
        p[i].addDampingForce();
        p[i].update();
    }
}

void testApp::draw(){
!   ofSetColor(255, 255, 255);
    for (int i = 0; i < NUM; i++) {
        p[i].draw();
    }
}
‣



void testApp::mousePressed(int x, int y, int button){
    for (int i = 0; i < NUM; i++) {
        p[i].setInitialCondition(x, y, ofRandom(-10,10), ofRandom(-10,10));
    }
}
‣
‣


    Vector <Particle> particles

             particles[0]
             particles[1]
             particles[2]
‣


‣
‣
    particles.push_back(p);


‣
    particles.pop_back();


‣
    particles.clear();
‣
#pragma once
#include "ofMain.h"
#include "Particle.h"

#define NUM 100

class testApp : public ofSimpleApp{
!
public:

     void   setup();
     void   update();
     void   draw();
     void   keyPressed (int key);
     void   keyReleased (int key);
     void   mouseMoved(int x, int y );
     void   mouseDragged(int x, int y, int button);
     void   mousePressed(int x, int y, int button);
     void   mouseReleased();

     //      Particle         particles
     vector <Particle> particles;
};
‣
#include "testApp.h"

void testApp::setup(){!
! ofSetVerticalSync(true);
! ofSetFrameRate(60);
! ofBackground(0, 0, 0);
}

void testApp::update(){
    for (int i = 0; i < particles.size(); i++) {
        particles[i].resetForce();
        particles[i].addForce(0, 0.1);
        particles[i].addDampingForce();
        particles[i].update();
    }
}

void testApp::draw(){
! ofSetColor(255, 255, 255);
    for (int i = 0; i < particles.size(); i++) {
        particles[i].draw();
    }
}
‣


void testApp::mousePressed(int x, int y, int button){
    particles.clear();
    for (int i = 0; i < NUM; i++) {
        //Particle              → myParticle
        Particle myParticle;
        //
        float vx = ofRandom(-10, 10);
        float vy = ofRandom(-10, 10);
        myParticle.setInitialCondition(x, y, vx, vy);
        //
        particles.push_back(myParticle);
    }
}
‣
‣
‣


‣
    ‣
    ‣
    ‣

‣
‣
#pragma once

#include "ofMain.h"
#include "Particle.h"

class testApp : public ofSimpleApp{
!
public:

     void   setup();
     void   update();
     void   draw();
     void   keyPressed (int key);
     void   keyReleased (int key);
     void   mouseMoved(int x, int y );
     void   mouseDragged(int x, int y, int button);
     void   mousePressed(int x, int y, int button);
     void   mouseReleased();

     //      Particle         particles
     vector <Particle> particles;
};
‣
#include "testApp.h"

void testApp::setup(){!
!   ofSetVerticalSync(true);
!   ofSetFrameRate(60);
!   ofBackground(0, 0, 0);
}

void testApp::update(){
    for (int i = 0; i < particles.size(); i++) {
        particles[i].resetForce();
        particles[i].addDampingForce();
        particles[i].update();
    }
}

void testApp::draw(){
!   ofSetColor(255, 255, 255);
!   //
!   string message = "current particle num = " + ofToString(particles.size(),0);
!   ofDrawBitmapString(message, 20, 20);

    for (int i = 0; i < particles.size(); i++) {
        particles[i].draw();
    }
}
‣
void testApp::keyPressed   (int key){
!   //'c'
!   if (key == 'c') {
!   !     particles.clear();
!   }
!   //'f'
!   if (key == 'f') {
!   !     ofToggleFullscreen();
!   }
}




void testApp::mouseDragged(int x, int y, int button){
!   //
!   Particle myParticle;
!   float vx = ofRandom(-3, 3);
!   float vy = ofRandom(-3, 3);
!   myParticle.setInitialCondition(x, y, vx, vy);
!   particles.push_back(myParticle);
}
‣
‣


‣
‣
‣
‣
‣
‣
‣


‣


‣
‣
‣


void testApp::draw(){
! ofSetColor(255, 255, 255);
! //
!   string message = "current particle num = "
!                    + ofToString(particles.size(),0);
!   ofDrawBitmapString(message, 20, 20);
!
!   ofNoFill();
!   ofBeginShape();
!   for (int i = 0; i < particles.size(); i++){
!   !    ofCurveVertex(particles[i].pos.x, particles[i].pos.y);
!   }
!   ofEndShape();
}
‣
‣


‣
‣
‣


‣
    ‣
    ‣
‣
#pragma once

#include "ofMain.h"
#include "Particle.h"

class testApp : public ofSimpleApp{
!
public:
    void setup();
    void update();
    void draw();
    void keyPressed (int key);
    void keyReleased (int key);
    void mouseMoved(int x, int y );
    void mouseDragged(int x, int y, int button);
    void mousePressed(int x, int y, int button);
    void mouseReleased();

    //     Particle         particles
     vector <Particle> particles;
!   //
! ofImage img;
};
‣
#include "testApp.h"

void testApp::setup(){!
! ofSetVerticalSync(true);
! ofSetFrameRate(60);
! ofBackground(0, 0, 0);
! ofEnableBlendMode(OF_BLENDMODE_ADD);

!   //
!   img.loadImage("particle32.png");
}

void testApp::update(){
    for (int i = 0; i < particles.size(); i++) {
        particles[i].resetForce();
        particles[i].addDampingForce();
        particles[i].update();
    }
}
‣
void testApp::draw(){
!   //
!   ofSetColor(255, 255, 255);
!   string message = "current particle num = " + ofToString(particles.size(),0);
!   ofDrawBitmapString(message, 20, 20);

!   //
!   for (int i = 0; i < particles.size(); i++){
!   !     float posx = particles[i].pos.x - 16;
!   !     float posy = particles[i].pos.y - 16;
!   !     img.draw(posx, posy);
!   }
}

void testApp::keyPressed   (int key){
!   //'c'
!   if (key == 'c') {
!   !     particles.clear();
!   }
!   //'f'
!   if (key == 'f') {
!   !     ofToggleFullscreen();
!   }
}
‣



void testApp::mouseDragged(int x, int y, int button){
! //
!   Particle myParticle;
!   float vx = ofRandom(-1, 1);
!   float vy = ofRandom(-1, 1);
!   myParticle.setInitialCondition(x, y, vx, vy);
!   particles.push_back(myParticle);
}
‣

More Related Content

What's hot

【Unite Tokyo 2019】たのしいDOTS〜初級から上級まで〜
【Unite Tokyo 2019】たのしいDOTS〜初級から上級まで〜【Unite Tokyo 2019】たのしいDOTS〜初級から上級まで〜
【Unite Tokyo 2019】たのしいDOTS〜初級から上級まで〜
UnityTechnologiesJapan002
 
ゲーム開発者のための C++11/C++14
ゲーム開発者のための C++11/C++14ゲーム開発者のための C++11/C++14
ゲーム開発者のための C++11/C++14
Ryo Suzuki
 
セガサターンマシン語プログラミングの紹介
セガサターンマシン語プログラミングの紹介セガサターンマシン語プログラミングの紹介
セガサターンマシン語プログラミングの紹介
Yuma Ohgami
 
イノベーションに向けたR&dの再定義
イノベーションに向けたR&dの再定義イノベーションに向けたR&dの再定義
イノベーションに向けたR&dの再定義
Osaka University
 
【Unite Tokyo 2019】大量のオブジェクトを含む広いステージでも大丈夫、そうDOTSならね
【Unite Tokyo 2019】大量のオブジェクトを含む広いステージでも大丈夫、そうDOTSならね【Unite Tokyo 2019】大量のオブジェクトを含む広いステージでも大丈夫、そうDOTSならね
【Unite Tokyo 2019】大量のオブジェクトを含む広いステージでも大丈夫、そうDOTSならね
UnityTechnologiesJapan002
 
【Unite Tokyo 2018】誘導ミサイル完全マスター
【Unite Tokyo 2018】誘導ミサイル完全マスター【Unite Tokyo 2018】誘導ミサイル完全マスター
【Unite Tokyo 2018】誘導ミサイル完全マスター
Unity Technologies Japan K.K.
 
Media Art II 2013 第6回:openFrameworks Addonを使う 2 - ofxOpenCV と ofxCv
Media Art II 2013  第6回:openFrameworks Addonを使う 2 - ofxOpenCV と ofxCvMedia Art II 2013  第6回:openFrameworks Addonを使う 2 - ofxOpenCV と ofxCv
Media Art II 2013 第6回:openFrameworks Addonを使う 2 - ofxOpenCV と ofxCvAtsushi Tadokoro
 
わからないまま使っている?UE4 の AI の基本的なこと
わからないまま使っている?UE4 の AI の基本的なことわからないまま使っている?UE4 の AI の基本的なこと
わからないまま使っている?UE4 の AI の基本的なこと
rarihoma
 
シェーダーグラフで作るヒットエフェクト
シェーダーグラフで作るヒットエフェクトシェーダーグラフで作るヒットエフェクト
シェーダーグラフで作るヒットエフェクト
r_ngtm
 
UE4でAIとビヘイビアツリーと-基礎-
UE4でAIとビヘイビアツリーと-基礎-UE4でAIとビヘイビアツリーと-基礎-
UE4でAIとビヘイビアツリーと-基礎-
com044
 
shared_ptrとゲームプログラミングでのメモリ管理
shared_ptrとゲームプログラミングでのメモリ管理shared_ptrとゲームプログラミングでのメモリ管理
shared_ptrとゲームプログラミングでのメモリ管理
DADA246
 
不遇の標準ライブラリ - valarray
不遇の標準ライブラリ - valarray不遇の標準ライブラリ - valarray
不遇の標準ライブラリ - valarray
Ryosuke839
 
【Unite 2017 Tokyo】スマートフォンでどこまでできる?3Dゲームをぐりぐり動かすテクニック講座
【Unite 2017 Tokyo】スマートフォンでどこまでできる?3Dゲームをぐりぐり動かすテクニック講座【Unite 2017 Tokyo】スマートフォンでどこまでできる?3Dゲームをぐりぐり動かすテクニック講座
【Unite 2017 Tokyo】スマートフォンでどこまでできる?3Dゲームをぐりぐり動かすテクニック講座
Unite2017Tokyo
 
Media Art II openFrameworks 複数のシーンの管理・切替え
Media Art II openFrameworks 複数のシーンの管理・切替えMedia Art II openFrameworks 複数のシーンの管理・切替え
Media Art II openFrameworks 複数のシーンの管理・切替えAtsushi Tadokoro
 
UE4ディープラーニングってやつでなんとかして!環境構築編(Python3+TensorFlow)
UE4ディープラーニングってやつでなんとかして!環境構築編(Python3+TensorFlow) UE4ディープラーニングってやつでなんとかして!環境構築編(Python3+TensorFlow)
UE4ディープラーニングってやつでなんとかして!環境構築編(Python3+TensorFlow)
エピック・ゲームズ・ジャパン Epic Games Japan
 
Siv3Dで楽しむゲームとメディアアート開発
Siv3Dで楽しむゲームとメディアアート開発Siv3Dで楽しむゲームとメディアアート開発
Siv3Dで楽しむゲームとメディアアート開発
Ryo Suzuki
 
C++のビルド高速化について
C++のビルド高速化についてC++のビルド高速化について
C++のビルド高速化についてAimingStudy
 
CascadeのエフェクトをNiagaraで作成してみよう
CascadeのエフェクトをNiagaraで作成してみようCascadeのエフェクトをNiagaraで作成してみよう
CascadeのエフェクトをNiagaraで作成してみよう
Yuya Shiotani
 
CG2013 09
CG2013 09CG2013 09
CG2013 09
shiozawa_h
 
【Unite Tokyo 2019】バンダイナムコスタジオ流Unityの使い方
【Unite Tokyo 2019】バンダイナムコスタジオ流Unityの使い方【Unite Tokyo 2019】バンダイナムコスタジオ流Unityの使い方
【Unite Tokyo 2019】バンダイナムコスタジオ流Unityの使い方
UnityTechnologiesJapan002
 

What's hot (20)

【Unite Tokyo 2019】たのしいDOTS〜初級から上級まで〜
【Unite Tokyo 2019】たのしいDOTS〜初級から上級まで〜【Unite Tokyo 2019】たのしいDOTS〜初級から上級まで〜
【Unite Tokyo 2019】たのしいDOTS〜初級から上級まで〜
 
ゲーム開発者のための C++11/C++14
ゲーム開発者のための C++11/C++14ゲーム開発者のための C++11/C++14
ゲーム開発者のための C++11/C++14
 
セガサターンマシン語プログラミングの紹介
セガサターンマシン語プログラミングの紹介セガサターンマシン語プログラミングの紹介
セガサターンマシン語プログラミングの紹介
 
イノベーションに向けたR&dの再定義
イノベーションに向けたR&dの再定義イノベーションに向けたR&dの再定義
イノベーションに向けたR&dの再定義
 
【Unite Tokyo 2019】大量のオブジェクトを含む広いステージでも大丈夫、そうDOTSならね
【Unite Tokyo 2019】大量のオブジェクトを含む広いステージでも大丈夫、そうDOTSならね【Unite Tokyo 2019】大量のオブジェクトを含む広いステージでも大丈夫、そうDOTSならね
【Unite Tokyo 2019】大量のオブジェクトを含む広いステージでも大丈夫、そうDOTSならね
 
【Unite Tokyo 2018】誘導ミサイル完全マスター
【Unite Tokyo 2018】誘導ミサイル完全マスター【Unite Tokyo 2018】誘導ミサイル完全マスター
【Unite Tokyo 2018】誘導ミサイル完全マスター
 
Media Art II 2013 第6回:openFrameworks Addonを使う 2 - ofxOpenCV と ofxCv
Media Art II 2013  第6回:openFrameworks Addonを使う 2 - ofxOpenCV と ofxCvMedia Art II 2013  第6回:openFrameworks Addonを使う 2 - ofxOpenCV と ofxCv
Media Art II 2013 第6回:openFrameworks Addonを使う 2 - ofxOpenCV と ofxCv
 
わからないまま使っている?UE4 の AI の基本的なこと
わからないまま使っている?UE4 の AI の基本的なことわからないまま使っている?UE4 の AI の基本的なこと
わからないまま使っている?UE4 の AI の基本的なこと
 
シェーダーグラフで作るヒットエフェクト
シェーダーグラフで作るヒットエフェクトシェーダーグラフで作るヒットエフェクト
シェーダーグラフで作るヒットエフェクト
 
UE4でAIとビヘイビアツリーと-基礎-
UE4でAIとビヘイビアツリーと-基礎-UE4でAIとビヘイビアツリーと-基礎-
UE4でAIとビヘイビアツリーと-基礎-
 
shared_ptrとゲームプログラミングでのメモリ管理
shared_ptrとゲームプログラミングでのメモリ管理shared_ptrとゲームプログラミングでのメモリ管理
shared_ptrとゲームプログラミングでのメモリ管理
 
不遇の標準ライブラリ - valarray
不遇の標準ライブラリ - valarray不遇の標準ライブラリ - valarray
不遇の標準ライブラリ - valarray
 
【Unite 2017 Tokyo】スマートフォンでどこまでできる?3Dゲームをぐりぐり動かすテクニック講座
【Unite 2017 Tokyo】スマートフォンでどこまでできる?3Dゲームをぐりぐり動かすテクニック講座【Unite 2017 Tokyo】スマートフォンでどこまでできる?3Dゲームをぐりぐり動かすテクニック講座
【Unite 2017 Tokyo】スマートフォンでどこまでできる?3Dゲームをぐりぐり動かすテクニック講座
 
Media Art II openFrameworks 複数のシーンの管理・切替え
Media Art II openFrameworks 複数のシーンの管理・切替えMedia Art II openFrameworks 複数のシーンの管理・切替え
Media Art II openFrameworks 複数のシーンの管理・切替え
 
UE4ディープラーニングってやつでなんとかして!環境構築編(Python3+TensorFlow)
UE4ディープラーニングってやつでなんとかして!環境構築編(Python3+TensorFlow) UE4ディープラーニングってやつでなんとかして!環境構築編(Python3+TensorFlow)
UE4ディープラーニングってやつでなんとかして!環境構築編(Python3+TensorFlow)
 
Siv3Dで楽しむゲームとメディアアート開発
Siv3Dで楽しむゲームとメディアアート開発Siv3Dで楽しむゲームとメディアアート開発
Siv3Dで楽しむゲームとメディアアート開発
 
C++のビルド高速化について
C++のビルド高速化についてC++のビルド高速化について
C++のビルド高速化について
 
CascadeのエフェクトをNiagaraで作成してみよう
CascadeのエフェクトをNiagaraで作成してみようCascadeのエフェクトをNiagaraで作成してみよう
CascadeのエフェクトをNiagaraで作成してみよう
 
CG2013 09
CG2013 09CG2013 09
CG2013 09
 
【Unite Tokyo 2019】バンダイナムコスタジオ流Unityの使い方
【Unite Tokyo 2019】バンダイナムコスタジオ流Unityの使い方【Unite Tokyo 2019】バンダイナムコスタジオ流Unityの使い方
【Unite Tokyo 2019】バンダイナムコスタジオ流Unityの使い方
 

Similar to openFrameworks – パーティクルを動かす、静的配列と動的配列 - 多摩美メディアアートII

openFrameworks – 関数・クラス、オブジェクト指向プログラミング導入 - 多摩美メディアアートII
openFrameworks – 関数・クラス、オブジェクト指向プログラミング導入 - 多摩美メディアアートIIopenFrameworks – 関数・クラス、オブジェクト指向プログラミング導入 - 多摩美メディアアートII
openFrameworks – 関数・クラス、オブジェクト指向プログラミング導入 - 多摩美メディアアートIIAtsushi Tadokoro
 
BCSL 058 solved assignment
BCSL 058 solved assignmentBCSL 058 solved assignment
openFrameworks、サウンド機能・音響合成、ofxMaxim, ofxOsc, ofxPd, ofxSuperCollider
openFrameworks、サウンド機能・音響合成、ofxMaxim, ofxOsc, ofxPd, ofxSuperCollideropenFrameworks、サウンド機能・音響合成、ofxMaxim, ofxOsc, ofxPd, ofxSuperCollider
openFrameworks、サウンド機能・音響合成、ofxMaxim, ofxOsc, ofxPd, ofxSuperColliderAtsushi Tadokoro
 
2012 JDays Bad Tests Good Tests
2012 JDays Bad Tests Good Tests2012 JDays Bad Tests Good Tests
2012 JDays Bad Tests Good Tests
Tomek Kaczanowski
 
662305 11
662305 11662305 11
ADA FILE
ADA FILEADA FILE
ADA FILE
Gaurav Singh
 
C Language Lecture 17
C Language Lecture 17C Language Lecture 17
C Language Lecture 17
Shahzaib Ajmal
 
Calculator code with scientific functions in java
Calculator code with scientific functions in java Calculator code with scientific functions in java
Calculator code with scientific functions in java
Amna Nawazish
 
HTML5って必要?
HTML5って必要?HTML5って必要?
HTML5って必要?
GCS2013
 
33rd Degree 2013, Bad Tests, Good Tests
33rd Degree 2013, Bad Tests, Good Tests33rd Degree 2013, Bad Tests, Good Tests
33rd Degree 2013, Bad Tests, Good TestsTomek Kaczanowski
 
Java awt
Java awtJava awt
JAVA...With N.E.T_B.E.A.N.S___________________________________.pdf
JAVA...With N.E.T_B.E.A.N.S___________________________________.pdfJAVA...With N.E.T_B.E.A.N.S___________________________________.pdf
JAVA...With N.E.T_B.E.A.N.S___________________________________.pdf
calderoncasto9163
 
mobl: Een DSL voor mobiele applicatieontwikkeling
mobl: Een DSL voor mobiele applicatieontwikkelingmobl: Een DSL voor mobiele applicatieontwikkeling
mobl: Een DSL voor mobiele applicatieontwikkelingDevnology
 
Unit testing in iOS featuring OCUnit, GHUnit & OCMock
Unit testing in iOS featuring OCUnit, GHUnit & OCMockUnit testing in iOS featuring OCUnit, GHUnit & OCMock
Unit testing in iOS featuring OCUnit, GHUnit & OCMockRobot Media
 
Cpds lab
Cpds labCpds lab

Similar to openFrameworks – パーティクルを動かす、静的配列と動的配列 - 多摩美メディアアートII (20)

openFrameworks – 関数・クラス、オブジェクト指向プログラミング導入 - 多摩美メディアアートII
openFrameworks – 関数・クラス、オブジェクト指向プログラミング導入 - 多摩美メディアアートIIopenFrameworks – 関数・クラス、オブジェクト指向プログラミング導入 - 多摩美メディアアートII
openFrameworks – 関数・クラス、オブジェクト指向プログラミング導入 - 多摩美メディアアートII
 
Of class1
Of class1Of class1
Of class1
 
Sbaw091020
Sbaw091020Sbaw091020
Sbaw091020
 
BCSL 058 solved assignment
BCSL 058 solved assignmentBCSL 058 solved assignment
BCSL 058 solved assignment
 
openFrameworks、サウンド機能・音響合成、ofxMaxim, ofxOsc, ofxPd, ofxSuperCollider
openFrameworks、サウンド機能・音響合成、ofxMaxim, ofxOsc, ofxPd, ofxSuperCollideropenFrameworks、サウンド機能・音響合成、ofxMaxim, ofxOsc, ofxPd, ofxSuperCollider
openFrameworks、サウンド機能・音響合成、ofxMaxim, ofxOsc, ofxPd, ofxSuperCollider
 
Of class3
Of class3Of class3
Of class3
 
Of class2
Of class2Of class2
Of class2
 
Sbaw090623
Sbaw090623Sbaw090623
Sbaw090623
 
2012 JDays Bad Tests Good Tests
2012 JDays Bad Tests Good Tests2012 JDays Bad Tests Good Tests
2012 JDays Bad Tests Good Tests
 
662305 11
662305 11662305 11
662305 11
 
ADA FILE
ADA FILEADA FILE
ADA FILE
 
C Language Lecture 17
C Language Lecture 17C Language Lecture 17
C Language Lecture 17
 
Calculator code with scientific functions in java
Calculator code with scientific functions in java Calculator code with scientific functions in java
Calculator code with scientific functions in java
 
HTML5って必要?
HTML5って必要?HTML5って必要?
HTML5って必要?
 
33rd Degree 2013, Bad Tests, Good Tests
33rd Degree 2013, Bad Tests, Good Tests33rd Degree 2013, Bad Tests, Good Tests
33rd Degree 2013, Bad Tests, Good Tests
 
Java awt
Java awtJava awt
Java awt
 
JAVA...With N.E.T_B.E.A.N.S___________________________________.pdf
JAVA...With N.E.T_B.E.A.N.S___________________________________.pdfJAVA...With N.E.T_B.E.A.N.S___________________________________.pdf
JAVA...With N.E.T_B.E.A.N.S___________________________________.pdf
 
mobl: Een DSL voor mobiele applicatieontwikkeling
mobl: Een DSL voor mobiele applicatieontwikkelingmobl: Een DSL voor mobiele applicatieontwikkeling
mobl: Een DSL voor mobiele applicatieontwikkeling
 
Unit testing in iOS featuring OCUnit, GHUnit & OCMock
Unit testing in iOS featuring OCUnit, GHUnit & OCMockUnit testing in iOS featuring OCUnit, GHUnit & OCMock
Unit testing in iOS featuring OCUnit, GHUnit & OCMock
 
Cpds lab
Cpds labCpds lab
Cpds lab
 

More from Atsushi Tadokoro

「クリエイティブ・ミュージック・コーディング」- オーディオ・ビジュアル作品のための、オープンソースなソフトウエア・フレームワークの現状と展望
「クリエイティブ・ミュージック・コーディング」- オーディオ・ビジュアル作品のための、オープンソースなソフトウエア・フレームワークの現状と展望「クリエイティブ・ミュージック・コーディング」- オーディオ・ビジュアル作品のための、オープンソースなソフトウエア・フレームワークの現状と展望
「クリエイティブ・ミュージック・コーディング」- オーディオ・ビジュアル作品のための、オープンソースなソフトウエア・フレームワークの現状と展望Atsushi Tadokoro
 
プログラム初級講座 - メディア芸術をはじめよう
プログラム初級講座 - メディア芸術をはじめようプログラム初級講座 - メディア芸術をはじめよう
プログラム初級講座 - メディア芸術をはじめようAtsushi Tadokoro
 
Interactive Music II ProcessingとSuperColliderの連携 -2
Interactive Music II ProcessingとSuperColliderの連携 -2Interactive Music II ProcessingとSuperColliderの連携 -2
Interactive Music II ProcessingとSuperColliderの連携 -2Atsushi Tadokoro
 
coma Creators session vol.2
coma Creators session vol.2coma Creators session vol.2
coma Creators session vol.2Atsushi Tadokoro
 
Interactive Music II ProcessingとSuperColliderの連携1
Interactive Music II ProcessingとSuperColliderの連携1Interactive Music II ProcessingとSuperColliderの連携1
Interactive Music II ProcessingとSuperColliderの連携1Atsushi Tadokoro
 
Interactive Music II Processingによるアニメーション
Interactive Music II ProcessingによるアニメーションInteractive Music II Processingによるアニメーション
Interactive Music II ProcessingによるアニメーションAtsushi Tadokoro
 
Interactive Music II Processing基本
Interactive Music II Processing基本Interactive Music II Processing基本
Interactive Music II Processing基本Atsushi Tadokoro
 
Interactive Music II SuperCollider応用 2 - SuperColliderとPure Dataの連携
Interactive Music II SuperCollider応用 2 - SuperColliderとPure Dataの連携Interactive Music II SuperCollider応用 2 - SuperColliderとPure Dataの連携
Interactive Music II SuperCollider応用 2 - SuperColliderとPure Dataの連携Atsushi Tadokoro
 
Media Art II openFrameworks アプリ間の通信とタンジブルなインターフェイス
Media Art II openFrameworks  アプリ間の通信とタンジブルなインターフェイス Media Art II openFrameworks  アプリ間の通信とタンジブルなインターフェイス
Media Art II openFrameworks アプリ間の通信とタンジブルなインターフェイス Atsushi Tadokoro
 
Interactive Music II SuperCollider応用 - SuperColliderと OSC (Open Sound Control)
Interactive Music II SuperCollider応用 - SuperColliderと OSC (Open Sound Control)Interactive Music II SuperCollider応用 - SuperColliderと OSC (Open Sound Control)
Interactive Music II SuperCollider応用 - SuperColliderと OSC (Open Sound Control)Atsushi Tadokoro
 
iTamabi 13 ARTSAT API 実践 5 - 衛星の軌道を描く
iTamabi 13 ARTSAT API 実践 5 - 衛星の軌道を描くiTamabi 13 ARTSAT API 実践 5 - 衛星の軌道を描く
iTamabi 13 ARTSAT API 実践 5 - 衛星の軌道を描くAtsushi Tadokoro
 
メディア芸術基礎 II 第11回:HTML5実践 表現のための様々なJavaScriptライブラリ
メディア芸術基礎 II 第11回:HTML5実践 表現のための様々なJavaScriptライブラリメディア芸術基礎 II 第11回:HTML5実践 表現のための様々なJavaScriptライブラリ
メディア芸術基礎 II 第11回:HTML5実践 表現のための様々なJavaScriptライブラリAtsushi Tadokoro
 
芸術情報演習デザイン(Web) 第8回: CSSフレームワークを使う
芸術情報演習デザイン(Web)  第8回: CSSフレームワークを使う芸術情報演習デザイン(Web)  第8回: CSSフレームワークを使う
芸術情報演習デザイン(Web) 第8回: CSSフレームワークを使うAtsushi Tadokoro
 
Interactive Music II SuperCollider応用 JITLib - ライブコーディング 2
Interactive Music II SuperCollider応用 JITLib - ライブコーディング 2Interactive Music II SuperCollider応用 JITLib - ライブコーディング 2
Interactive Music II SuperCollider応用 JITLib - ライブコーディング 2Atsushi Tadokoro
 
iTamabi 13 第9回:ARTSAT API 実践 3 ジオコーディングで衛星の位置を取得
iTamabi 13 第9回:ARTSAT API 実践 3 ジオコーディングで衛星の位置を取得iTamabi 13 第9回:ARTSAT API 実践 3 ジオコーディングで衛星の位置を取得
iTamabi 13 第9回:ARTSAT API 実践 3 ジオコーディングで衛星の位置を取得Atsushi Tadokoro
 
Webデザイン 第10回:HTML5実践 Three.jsで3Dプログラミング
Webデザイン 第10回:HTML5実践 Three.jsで3DプログラミングWebデザイン 第10回:HTML5実践 Three.jsで3Dプログラミング
Webデザイン 第10回:HTML5実践 Three.jsで3DプログラミングAtsushi Tadokoro
 
Interactive Music II SuperCollider応用 JITLib - ライブコーディング 1
Interactive Music II SuperCollider応用 JITLib - ライブコーディング 1Interactive Music II SuperCollider応用 JITLib - ライブコーディング 1
Interactive Music II SuperCollider応用 JITLib - ライブコーディング 1Atsushi Tadokoro
 
iTamabi 13 第8回:ARTSAT API 実践 2 衛星アプリを企画する
iTamabi 13 第8回:ARTSAT API 実践 2 衛星アプリを企画するiTamabi 13 第8回:ARTSAT API 実践 2 衛星アプリを企画する
iTamabi 13 第8回:ARTSAT API 実践 2 衛星アプリを企画するAtsushi Tadokoro
 
Interactive Music II SuperCollider実習 オリジナルの楽器を作ろう!
Interactive Music II SuperCollider実習  オリジナルの楽器を作ろう!Interactive Music II SuperCollider実習  オリジナルの楽器を作ろう!
Interactive Music II SuperCollider実習 オリジナルの楽器を作ろう!Atsushi Tadokoro
 

More from Atsushi Tadokoro (20)

「クリエイティブ・ミュージック・コーディング」- オーディオ・ビジュアル作品のための、オープンソースなソフトウエア・フレームワークの現状と展望
「クリエイティブ・ミュージック・コーディング」- オーディオ・ビジュアル作品のための、オープンソースなソフトウエア・フレームワークの現状と展望「クリエイティブ・ミュージック・コーディング」- オーディオ・ビジュアル作品のための、オープンソースなソフトウエア・フレームワークの現状と展望
「クリエイティブ・ミュージック・コーディング」- オーディオ・ビジュアル作品のための、オープンソースなソフトウエア・フレームワークの現状と展望
 
プログラム初級講座 - メディア芸術をはじめよう
プログラム初級講座 - メディア芸術をはじめようプログラム初級講座 - メディア芸術をはじめよう
プログラム初級講座 - メディア芸術をはじめよう
 
Interactive Music II ProcessingとSuperColliderの連携 -2
Interactive Music II ProcessingとSuperColliderの連携 -2Interactive Music II ProcessingとSuperColliderの連携 -2
Interactive Music II ProcessingとSuperColliderの連携 -2
 
coma Creators session vol.2
coma Creators session vol.2coma Creators session vol.2
coma Creators session vol.2
 
Interactive Music II ProcessingとSuperColliderの連携1
Interactive Music II ProcessingとSuperColliderの連携1Interactive Music II ProcessingとSuperColliderの連携1
Interactive Music II ProcessingとSuperColliderの連携1
 
Interactive Music II Processingによるアニメーション
Interactive Music II ProcessingによるアニメーションInteractive Music II Processingによるアニメーション
Interactive Music II Processingによるアニメーション
 
Interactive Music II Processing基本
Interactive Music II Processing基本Interactive Music II Processing基本
Interactive Music II Processing基本
 
Interactive Music II SuperCollider応用 2 - SuperColliderとPure Dataの連携
Interactive Music II SuperCollider応用 2 - SuperColliderとPure Dataの連携Interactive Music II SuperCollider応用 2 - SuperColliderとPure Dataの連携
Interactive Music II SuperCollider応用 2 - SuperColliderとPure Dataの連携
 
Media Art II openFrameworks アプリ間の通信とタンジブルなインターフェイス
Media Art II openFrameworks  アプリ間の通信とタンジブルなインターフェイス Media Art II openFrameworks  アプリ間の通信とタンジブルなインターフェイス
Media Art II openFrameworks アプリ間の通信とタンジブルなインターフェイス
 
Interactive Music II SuperCollider応用 - SuperColliderと OSC (Open Sound Control)
Interactive Music II SuperCollider応用 - SuperColliderと OSC (Open Sound Control)Interactive Music II SuperCollider応用 - SuperColliderと OSC (Open Sound Control)
Interactive Music II SuperCollider応用 - SuperColliderと OSC (Open Sound Control)
 
iTamabi 13 ARTSAT API 実践 5 - 衛星の軌道を描く
iTamabi 13 ARTSAT API 実践 5 - 衛星の軌道を描くiTamabi 13 ARTSAT API 実践 5 - 衛星の軌道を描く
iTamabi 13 ARTSAT API 実践 5 - 衛星の軌道を描く
 
メディア芸術基礎 II 第11回:HTML5実践 表現のための様々なJavaScriptライブラリ
メディア芸術基礎 II 第11回:HTML5実践 表現のための様々なJavaScriptライブラリメディア芸術基礎 II 第11回:HTML5実践 表現のための様々なJavaScriptライブラリ
メディア芸術基礎 II 第11回:HTML5実践 表現のための様々なJavaScriptライブラリ
 
芸術情報演習デザイン(Web) 第8回: CSSフレームワークを使う
芸術情報演習デザイン(Web)  第8回: CSSフレームワークを使う芸術情報演習デザイン(Web)  第8回: CSSフレームワークを使う
芸術情報演習デザイン(Web) 第8回: CSSフレームワークを使う
 
Interactive Music II SuperCollider応用 JITLib - ライブコーディング 2
Interactive Music II SuperCollider応用 JITLib - ライブコーディング 2Interactive Music II SuperCollider応用 JITLib - ライブコーディング 2
Interactive Music II SuperCollider応用 JITLib - ライブコーディング 2
 
iTamabi 13 第9回:ARTSAT API 実践 3 ジオコーディングで衛星の位置を取得
iTamabi 13 第9回:ARTSAT API 実践 3 ジオコーディングで衛星の位置を取得iTamabi 13 第9回:ARTSAT API 実践 3 ジオコーディングで衛星の位置を取得
iTamabi 13 第9回:ARTSAT API 実践 3 ジオコーディングで衛星の位置を取得
 
Tamabi media131118
Tamabi media131118Tamabi media131118
Tamabi media131118
 
Webデザイン 第10回:HTML5実践 Three.jsで3Dプログラミング
Webデザイン 第10回:HTML5実践 Three.jsで3DプログラミングWebデザイン 第10回:HTML5実践 Three.jsで3Dプログラミング
Webデザイン 第10回:HTML5実践 Three.jsで3Dプログラミング
 
Interactive Music II SuperCollider応用 JITLib - ライブコーディング 1
Interactive Music II SuperCollider応用 JITLib - ライブコーディング 1Interactive Music II SuperCollider応用 JITLib - ライブコーディング 1
Interactive Music II SuperCollider応用 JITLib - ライブコーディング 1
 
iTamabi 13 第8回:ARTSAT API 実践 2 衛星アプリを企画する
iTamabi 13 第8回:ARTSAT API 実践 2 衛星アプリを企画するiTamabi 13 第8回:ARTSAT API 実践 2 衛星アプリを企画する
iTamabi 13 第8回:ARTSAT API 実践 2 衛星アプリを企画する
 
Interactive Music II SuperCollider実習 オリジナルの楽器を作ろう!
Interactive Music II SuperCollider実習  オリジナルの楽器を作ろう!Interactive Music II SuperCollider実習  オリジナルの楽器を作ろう!
Interactive Music II SuperCollider実習 オリジナルの楽器を作ろう!
 

Recently uploaded

Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
ThomasParaiso2
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
Peter Spielvogel
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 

Recently uploaded (20)

Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 

openFrameworks – パーティクルを動かす、静的配列と動的配列 - 多摩美メディアアートII

  • 1.
  • 3.
  • 4. ‣ ‣ ‣ ‣ ‣ ‣ ‣
  • 5.
  • 6. ‣ ‣ ‣ ‣ ‣
  • 10.
  • 11. To invent programs, you need to be able to capture abstractions and ex design. It’s the job of a programming language to help you do this. The process of invention and design by letting you encode abstractions tha It should let you make your ideas concrete in the code you write. Surf the architecture of your program. ‣ ‣ All programming languages provide devices that help express abstrac are ways of grouping implementation details, hiding them, and giving ‣ a common interface—much as a mechanical object separates its interfa illustrated in “Interface and Implementation” . ‣ Figure 2-1 Inte rfa ce a nd Im ple m e nta tion interface implementation 11 10 9 8 7 6
  • 13. ‣ ‣ ‣ ‣ getName() getName()
  • 14. ‣ ‣
  • 18.
  • 21. ‣ ‣ ‣ ‣ ‣ ‣ ‣ ‣ ‣
  • 22. ‣ ‣ ‣ ‣ ‣ ‣ ‣ ‣ ‣ ‣
  • 23. ‣ ‣ ‣ ‣ ‣ ‣ ‣ ‣ ‣
  • 24. ‣ #pragma once #include "ofMain.h" class Particle { public: ! ofVec2f pos; // ofVec2f vel; // ofVec2f frc; // ( ) float damping; // Particle(); virtual ~Particle(){}; void resetForce(); void addForce(float x, float y); void addDampingForce(); void setInitialCondition(float px, float py, float vx, float vy); void update(); void draw(); protected: private: };
  • 25. ‣ #include "Particle.h" // ( ) Particle::Particle(){ ! setInitialCondition(0,0,0,0); ! damping = 0.01f; } // ( ) void Particle::resetForce(){ frc.set(0,0); } // void Particle::addForce(float x, float y){ frc.x = frc.x + x; frc.y = frc.y + y; } // void Particle::addDampingForce(){ frc.x = frc.x - vel.x * damping; frc.y = frc.y - vel.y * damping; }
  • 26. ‣ // void Particle::setInitialCondition(float px, float py, float vx, float vy){ pos.set(px,py); ! vel.set(vx,vy); } // void Particle::update(){! ! vel = vel + frc; ! pos = pos + vel; } // void Particle::draw(){ ofCircle(pos.x, pos.y, 3); }
  • 27. ‣ ‣ ‣ ‣ ‣ ‣ ‣ ‣ ‣ ‣
  • 28. ‣ #pragma once #include "ofMain.h" #include "Particle.h" class testApp : public ofSimpleApp{ ! public: void setup(); void update(); void draw(); void keyPressed (int key); void keyReleased (int key); void mouseMoved(int x, int y ); void mouseDragged(int x, int y, int button); void mousePressed(int x, int y, int button); void mouseReleased(); // Particle Particle p; };
  • 29. ‣ #include "testApp.h" void testApp::setup(){! ! ofSetVerticalSync(true); ! ofSetFrameRate(60); ! ofBackground(0, 0, 0); ! p.setInitialCondition(ofGetWidth()/2, ofGetHeight()/2, ofRandom(-10,10), ofRandom(-10,10)); } void testApp::update(){ ! p.resetForce(); ! p.addDampingForce(); ! p.update(); } void testApp::draw(){ ! ofSetColor(255, 255, 255); ! p.draw(); }
  • 30.
  • 31. ‣ ‣ ‣ ‣ ‣ ‣ ‣ ‣ ‣ ‣
  • 32. ‣ void testApp::mousePressed(int x, int y, int button){ ! p.setInitialCondition(x,y,ofRandom(-10,10), ofRandom(-10,10)); }
  • 33.
  • 35.
  • 36. ‣ ‣ ‣ ‣ p[0] p[1] p[2] NUM
  • 38. ‣ ‣ Particle p[NUM] p[0] p[1] p[2] NUM p[NUM]
  • 39. ‣ #pragma once #include "ofMain.h" #include "Particle.h" #define NUM 100 class testApp : public ofSimpleApp{ ! public: void setup(); void update(); void draw(); void keyPressed (int key); void keyReleased (int key); void mouseMoved(int x, int y ); void mouseDragged(int x, int y, int button); void mousePressed(int x, int y, int button); void mouseReleased(); // Particle (NUM ) Particle p[100]; };
  • 40. ‣ #include "testApp.h" void testApp::setup(){! ! ofSetVerticalSync(true); ! ofSetFrameRate(60); ! ofBackground(0, 0, 0); } void testApp::update(){ for (int i = 0; i < NUM; i++) { p[i].resetForce(); p[i].addForce(0, 0.1); p[i].addDampingForce(); p[i].update(); } } void testApp::draw(){ ! ofSetColor(255, 255, 255); for (int i = 0; i < NUM; i++) { p[i].draw(); } }
  • 41. ‣ void testApp::mousePressed(int x, int y, int button){ for (int i = 0; i < NUM; i++) { p[i].setInitialCondition(x, y, ofRandom(-10,10), ofRandom(-10,10)); } }
  • 42.
  • 43. Vector <Particle> particles particles[0] particles[1] particles[2]
  • 44. ‣ ‣ ‣ particles.push_back(p); ‣ particles.pop_back(); ‣ particles.clear();
  • 45. ‣ #pragma once #include "ofMain.h" #include "Particle.h" #define NUM 100 class testApp : public ofSimpleApp{ ! public: void setup(); void update(); void draw(); void keyPressed (int key); void keyReleased (int key); void mouseMoved(int x, int y ); void mouseDragged(int x, int y, int button); void mousePressed(int x, int y, int button); void mouseReleased(); // Particle particles vector <Particle> particles; };
  • 46. ‣ #include "testApp.h" void testApp::setup(){! ! ofSetVerticalSync(true); ! ofSetFrameRate(60); ! ofBackground(0, 0, 0); } void testApp::update(){ for (int i = 0; i < particles.size(); i++) { particles[i].resetForce(); particles[i].addForce(0, 0.1); particles[i].addDampingForce(); particles[i].update(); } } void testApp::draw(){ ! ofSetColor(255, 255, 255); for (int i = 0; i < particles.size(); i++) { particles[i].draw(); } }
  • 47. ‣ void testApp::mousePressed(int x, int y, int button){ particles.clear(); for (int i = 0; i < NUM; i++) { //Particle → myParticle Particle myParticle; // float vx = ofRandom(-10, 10); float vy = ofRandom(-10, 10); myParticle.setInitialCondition(x, y, vx, vy); // particles.push_back(myParticle); } }
  • 48.
  • 49. ‣ ‣ ‣ ‣ ‣ ‣ ‣
  • 50. ‣ #pragma once #include "ofMain.h" #include "Particle.h" class testApp : public ofSimpleApp{ ! public: void setup(); void update(); void draw(); void keyPressed (int key); void keyReleased (int key); void mouseMoved(int x, int y ); void mouseDragged(int x, int y, int button); void mousePressed(int x, int y, int button); void mouseReleased(); // Particle particles vector <Particle> particles; };
  • 51. ‣ #include "testApp.h" void testApp::setup(){! ! ofSetVerticalSync(true); ! ofSetFrameRate(60); ! ofBackground(0, 0, 0); } void testApp::update(){ for (int i = 0; i < particles.size(); i++) { particles[i].resetForce(); particles[i].addDampingForce(); particles[i].update(); } } void testApp::draw(){ ! ofSetColor(255, 255, 255); ! // ! string message = "current particle num = " + ofToString(particles.size(),0); ! ofDrawBitmapString(message, 20, 20); for (int i = 0; i < particles.size(); i++) { particles[i].draw(); } }
  • 52. ‣ void testApp::keyPressed (int key){ ! //'c' ! if (key == 'c') { ! ! particles.clear(); ! } ! //'f' ! if (key == 'f') { ! ! ofToggleFullscreen(); ! } } void testApp::mouseDragged(int x, int y, int button){ ! // ! Particle myParticle; ! float vx = ofRandom(-3, 3); ! float vy = ofRandom(-3, 3); ! myParticle.setInitialCondition(x, y, vx, vy); ! particles.push_back(myParticle); }
  • 53.
  • 56. ‣ void testApp::draw(){ ! ofSetColor(255, 255, 255); ! // ! string message = "current particle num = " ! + ofToString(particles.size(),0); ! ofDrawBitmapString(message, 20, 20); ! ! ofNoFill(); ! ofBeginShape(); ! for (int i = 0; i < particles.size(); i++){ ! ! ofCurveVertex(particles[i].pos.x, particles[i].pos.y); ! } ! ofEndShape(); }
  • 57.
  • 59. ‣ #pragma once #include "ofMain.h" #include "Particle.h" class testApp : public ofSimpleApp{ ! public: void setup(); void update(); void draw(); void keyPressed (int key); void keyReleased (int key); void mouseMoved(int x, int y ); void mouseDragged(int x, int y, int button); void mousePressed(int x, int y, int button); void mouseReleased(); // Particle particles vector <Particle> particles; ! // ! ofImage img; };
  • 60. ‣ #include "testApp.h" void testApp::setup(){! ! ofSetVerticalSync(true); ! ofSetFrameRate(60); ! ofBackground(0, 0, 0); ! ofEnableBlendMode(OF_BLENDMODE_ADD); ! // ! img.loadImage("particle32.png"); } void testApp::update(){ for (int i = 0; i < particles.size(); i++) { particles[i].resetForce(); particles[i].addDampingForce(); particles[i].update(); } }
  • 61. ‣ void testApp::draw(){ ! // ! ofSetColor(255, 255, 255); ! string message = "current particle num = " + ofToString(particles.size(),0); ! ofDrawBitmapString(message, 20, 20); ! // ! for (int i = 0; i < particles.size(); i++){ ! ! float posx = particles[i].pos.x - 16; ! ! float posy = particles[i].pos.y - 16; ! ! img.draw(posx, posy); ! } } void testApp::keyPressed (int key){ ! //'c' ! if (key == 'c') { ! ! particles.clear(); ! } ! //'f' ! if (key == 'f') { ! ! ofToggleFullscreen(); ! } }
  • 62. ‣ void testApp::mouseDragged(int x, int y, int button){ ! // ! Particle myParticle; ! float vx = ofRandom(-1, 1); ! float vy = ofRandom(-1, 1); ! myParticle.setInitialCondition(x, y, vx, vy); ! particles.push_back(myParticle); }
  • 63.