Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
ガイダンス - Bio Media Art Workshopについて Processingの復習
Search
Atsushi Tadokoro
June 02, 2014
Technology
1.1k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
ガイダンス - Bio Media Art Workshopについて Processingの復習
Atsushi Tadokoro
June 02, 2014
More Decks by Atsushi Tadokoro
See All by Atsushi Tadokoro
デザイン言語総合講座 - クリエイティブ・コーディング
tado
0
2.8k
Tumblrを使う4 - Webサイトを構成する、固定ページとタグ
tado
0
1.8k
Tumblrを使う3- カスタムHTMLテーマの作成
tado
0
470
Processing.jsによるデータの可視化と生成的表現
tado
1
1.9k
Tumblrを使う2 - テーマをカスタマイズする
tado
0
380
Touchéの仕組みを理解 - ProcessingとArduinoの連携
tado
0
2.4k
Github Pagesで作品を公開、Automatic Page Generatorでサイトを生成
tado
0
1.7k
TumblrでWebサイトを作成
tado
0
730
bmaw14 第2回: Touchéセンサーを使う1 Touchéセンサーを作成する
tado
0
2.3k
Other Decks in Technology
See All in Technology
検証フェーズはAIの回答を判断するための学習機会
toru_kubota
2
550
Essential architectural thinking (revised edition)
ufried
0
110
More Freedom on the Same Shared GPU Cluster: A Small Team’s Experience with vCluster
nttcom
0
140
"優秀な誰か"の下位互換にならないために
yut0naga1_fa
0
1k
事業活動を AI Ready にする攻めと守りのデータエンジニアリング / data-engineering-for-ai-ready-business
pei0804
6
2.3k
LLM機能を自作して分かるSnowflake Cortex AIの強み
nayuts
0
340
Deep Data Security 機能解説
oracle4engineer
PRO
2
740
今こそ知りたいAmplifyGen2
mkdev10
2
160
実践! SRE × AI - ABEMA における AIOps -
tetsuya28
7
2.5k
AI時代に必要な脅威モデリング― 変化の速度に負けない理解とリスク判断
masakane55
5
1.2k
生成AIと進める探索的データ分析(2026.10.03 第122回Tokyo.R勉強会)
tatamiya
2
1.5k
DWH の限界突破! AI エージェント向け爆速リアルタイムデータ基盤 ClickHouse
jozono
1
330
Featured
See All Featured
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
20k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
520
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
350
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.6k
Optimizing for Happiness
mojombo
378
71k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.4k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
490
A Tale of Four Properties
chriscoyier
163
24k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.6k
GraphQLとの向き合い方2022年版
quramy
50
15k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
490
Transcript
ୈճΨΠμϯε #JP.FEJB"SU8PSLTIPQʹ͍ͭͯ 1SPDFTTJOHͷ෮श ݄ ଟຎඒज़େֶใσβΠϯֶՊϝσΟΞܳज़ίʔε ాॴ३
#JP.FEJB"SU8PSLTIPQ ϫʔΫγϣοϓʹ͍ͭͯ
͜ͷϫʔΫγϣοϓͷඪ ‣ 1SPDFTTJOHͱ"SEVJOPΛΈ߹ͤΔ ‣ ηϯαʔͰڥͷใΛܭଌͨ͠ΓɺԻޫɺಈ͖Ͱڥʹಇ͖͔͚Δ ‣ ২ͱిࢠ࡞ɺϓϩάϥϛϯάωοτϫʔΫΛΈ߹ͤΔ ‣ ࠷ऴඪόΠΦɾΨδΣοτΛ੍࡞
"SEVJOP ‣ ηϯαʔͰܭଌͨ͠पғͷڥʹؔ͢ΔσʔλΛऔಘͯ͠.BDͳͲͷ1$ʹૹग़
"SEVJOP ‣ ͜ͷػձʹ"SEVJOPࣗઐ༻ͷͷΛߪೖ͠·͠ΐ͏ ‣ "SEVJOP6/0͕ɺ࠷ॳͷͱͯ͠Φεεϝ ‣ εΠοναΠΤϯεIUUQXXXTXJUDITDJFODFDPNDBUBMPH ‣ ԁ
"SEVJOP ‣ ϒϨουϘʔυɺύονέʔϒϧͳͲແ͍߹ηοτ͕͓ಘ ‣ "SEVJOPΛ͡ΊΑ͏ΩοτIUUQXXXTXJUDITDJFODFDPNDBUBMPH ‣ ԁ
1SPDFTTJOH ‣ ιϑτΣΞΞʔτɺϏδϡΞϧσβΠϯͷͨΊͷϓϩάϥϛϯάݴޠ ‣ .*5ϝσΟΞϥϘʹࡏ੶͍ͯͨ͠ɺ$BTFZ3FBTɺ#FOKBNJO'SZʹΑͬͯ։ൃ ʙ ‣ IUUQQSPDFTTJOHPSH
1SPDFTTJOH ‣ 1SPDFTTJOHɺ։ൃڥڙ͍͑ͯΔ ‣ खܰʹεέονΛ͢ΔΑ͏ʹϓϩάϥϛϯά
ϫʔΫγϣοϓશମͷߏ
ϫʔΫγϣοϓͰ࡞͢ΔγεςϜͷΠϝʔδ
੍࡞͢Δ࡞ͷྫ ‣ #PUBOJDVT*OUFSBDUJDVT*OUFSBDUJWF1MBOU5FDIOPMPHZ ‣ IUUQXXXEJTOFZSFTFBSDIDPNQSPKFDUCPUBOJDVTJOUFSBDUJDVT JOUFSBDUJWFQMBOUUFDIOPMPHZ
5PVDIÉ ‣ ͜ͷ࡞Ͱ༻͍ΒΕ͍ͯΔηϯαʔɺ5PVDIÉʹ͍ͭͯ ‣ IUUQXXXEJTOFZSFTFBSDIDPNQSPKFDUUPVDIFUPVDIBOEHFTUVSF TFOTJOHGPSUIFSFBMXPSME
1SPDFTTJOHͷ෮श
1SPDFTTJOHͷ෮श ‣ 1SPDFTTJOHΛεϐʔυ෮श͠·͢ ‣ ΦεεϝαΠτIUUQIFMMPQSPDFTTJOHPSH
࠲ඪɺΛඳ͘ ‣ ࠲ඪͷ֓೦ʹ͍ͭͯ
࠲ඪɺΛඳ͘ ‣ ࠲ඪΛࢦఆͯ͠Λඳ͘ size(640,480); //640x480pixelͷը໘Λੜ point(300,200); //300x200ͷॴʹΛඳ͘
࠲ඪɺΛඳ͘ ‣ Α͘ݟΕ͕Ճ͞Ε͍ͯΔ
جຊਤܗ ‣ ઢMJOF Y Z Y Z
جຊਤܗ ‣ ࢛֯SFDU Y Z XJEUI IFJHIU
جຊਤܗ ‣ ԁɺପԁFMMJQTF Y Z XJEUI IFJHIU
جຊਤܗ ‣ ઢɺ࢛֯ɺԁΛ·ͱΊͯඳ͍ͯΈΔ size(640,480); //640x480pixelͷը໘Λੜ point(300,200); //(300,200)ͷॴʹΛඳ͘ line(50,100,400,300); //(50,100)ͷ͔Β(400,300)ͷઢΛҾ͘ rect(400,100,100,300);
//(400,100)ͷ͔Βɺ෯100ɺߴ͞300ͷ࢛֯ܗΛඳ͘ ellipse(200,340,300,200); //(200,340)ͷΛத৺ʹɺ෯300ɺߴ͞200ͷପԁΛඳ͘
‣ جຊਤܗ͕ඳ͚ͨ جຊਤܗ
৭ ‣ എܠ৭ ‣ CBDLHSPVOE (SBZ άϨΠεέʔϧ ‣ CBDLHSPVOE 3
( # 3(# ‣ CBDLHSPVOE 3 ( # " 3(#" ˞"ಁ໌ ! ‣ ృΓͷ৭ ‣ pMM (SBZ ‣ pMM 3 ( # ‣ pMM 3 ( # " ! ‣ ڥքઢͷ৭ ‣ TUSPLF (SBZ ‣ TUSPLF 3 ( # ‣ TUSPLF 3 ( # "
جຊਤܗ ‣ ৭Λࢦఆͯ͠ΈΔ background(15); //എܠ৭ stroke(63,191,255); //ઢͷ৭ fill(0,127,255,127); //ృΓͷ৭ size(640,
480); //640x480pixelͷը໘Λੜ point(300, 200); //(300,200)ͷॴʹΛඳ͘ line(50, 100, 400, 300); //(50,100)ͷ͔Β(400,300)ͷઢΛҾ͘ rect(400, 100, 100, 300); //(400,100)ͷ͔Βɺ෯100ɺߴ͞300ͷ࢛֯ܗΛඳ͘ ellipse(200, 340, 300, 200); //(200,340)ͷΛத৺ʹɺ෯300ɺߴ͞200ͷପԁΛඳ͘
৭ ‣ ৭ΛࢦఆͰ͖ͨ
Ξχϝʔγϣϯ ‣ TFUVQ ͱESBX
Ξχϝʔγϣϯ ‣ ྫԁ͕Ҡಈ͢ΔΞχϝʔγϣϯ PVector location; //ҐஔͷϕΫτϧ PVector velocity; //ͷϕΫτϧ !
void setup() { size(640, 480); //640x480pixelͷը໘Λੜ frameRate(60); //ϑϨʔϜϨʔτ stroke(63, 191, 255); //ઢͷ৭ fill(0, 127, 255, 127); //ృΓͷ৭ location = new PVector(40, 40); //ҐஔͷϕΫτϧͷॳظઃఆ velocity = new PVector(3, 2); //ͷϕΫτϧͷॳظઃఆ } !
Ξχϝʔγϣϯ ‣ ྫԁ͕Ҡಈ͢ΔΞχϝʔγϣϯ void draw() { background(15); //എܠΛඳը ellipse(location.x, location.y,
20, 20); //ࢦఆͨ͠ҐஔʹԁΛඳը location.add(velocity); //ҐஔͷϕΫτϧʹͷϕΫτϧΛՃࢉɺ࣍ͷҐஔʹͳΔ if ((location.x > width) || (location.x < 0)) { //͠ը໘ͷࠨ·ͨӈʹ౸ୡͨ͠Β velocity.x *= -1; //XํͷεϐʔυΛస } if ((location.y > height) || (location.y < 0)) { //͠ը໘ͷԼ·্ͨʹ౸ୡͨ͠Β velocity.y *= -1; //YํͷεϐʔυΛస } }
Ξχϝʔγϣϯ ‣ ԁ͕Ҡಈ͢ΔΞχϝʔγϣϯ
͘Γฦ͠ʹΑΔ૿৩ ‣ ྻʹ͍ͭͯཧղ͢Δ ‣ ྫɿ float data[] = new float[5];
͘Γฦ͠ʹΑΔ૿৩ ‣ Ґஔ MPDBUJPO ɺ WFMPDJUZ ΛͦΕͧΕྻʹมߋ int NUM =
100; //ྻͷ PVector[] location = new PVector[NUM]; //ҐஔͷϕΫτϧͷྻ PVector[] velocity = new PVector[NUM]; //ͷϕΫτϧͷྻ</p> ! void setup() { size(640, 480); //640x480pixelͷը໘Λੜ frameRate(60); //ϑϨʔϜϨʔτ stroke(63, 191, 255); //ઢͷ৭ fill(0, 127, 255, 127); //ృΓͷ৭ for (int i = 0; i < NUM; i++) { //ྻͷ͚ͩ܁Γฦ͠ location[i] = new PVector(random(width), random(height)); //ҐஔͷϕΫτϧ velocity[i] = new PVector(random(-4, 4), random(-4, 4)); //ͷϕΫτϧ } }
͘Γฦ͠ʹΑΔ૿৩ ‣ Ґஔ MPDBUJPO ɺ WFMPDJUZ ΛͦΕͧΕྻʹมߋ void draw() {
background(15); //എܠΛඳը for (int i = 0; i < NUM; i++) { //ྻͷ͚ͩ܁Γฦ͠ ellipse(location[i].x, location[i].y, 20, 20); //ࢦఆͨ͠ҐஔʹԁΛඳը location[i].add(velocity[i]); //ҐஔͷϕΫτϧʹͷϕΫτϧΛՃࢉɺ࣍ͷҐஔʹͳΔ if ((location[i].x > width) || (location[i].x < 0)) { velocity[i].x *= -1; //XํͷεϐʔυΛస } if ((location[i].y > height) || (location[i].y < 0)) { velocity[i].y *= -1; //YํͷεϐʔυΛస } } }
͘Γฦ͠ʹΑΔ૿৩ ‣ ૿৩ͨ͠Ξχϝʔγϣϯ
͘Γฦ͠ʹΑΔ૿৩ ‣ ࠷ޙʹɺԁͷ৭ͱେ͖͞ϥϯμϜʹࢦఆͯ͠ΈΔ
͘Γฦ͠ʹΑΔ૿৩ ‣ Ґஔ MPDBUJPO ɺ WFMPDJUZ ɺ৭ DPM ɺେ͖͞ EJBNFUFS
ΛϥϯμϜʹ int NUM = 500; //ྻͷ PVector[] location = new PVector[NUM]; //ҐஔͷϕΫτϧͷྻ PVector[] velocity = new PVector[NUM]; //ͷϕΫτϧͷྻ color[] col = new color[NUM]; //ృΓͷ৭ͷྻ float[] diameter = new float[NUM]; //ԁͷେ͖͞(ܘ)ͷྻ</p> ! void setup() { size(640, 480); //640x480pixelͷը໘Λੜ frameRate(60); //ϑϨʔϜϨʔτ noStroke(); for (int i = 0; i < NUM; i++) { //ྻͷ͚ͩ܁Γฦ͠ location[i] = new PVector(random(width), random(height)); //ҐஔͷϕΫτϧͷॳظઃఆ velocity[i] = new PVector(random(-4, 4), random(-4, 4)); //ͷϕΫτϧͷॳظઃఆ col[i] = color(random(255), random(255), random(255), 127); //৭ͷॳظઃఆ diameter[i] = random(3, 40); //େ͖͞ͷॳظઃఆ } }
͘Γฦ͠ʹΑΔ૿৩ ‣ Ґஔ MPDBUJPO ɺ WFMPDJUZ ɺ৭ DPM ɺେ͖͞ EJBNFUFS
ΛϥϯμϜʹ void draw() { background(15); //എܠΛඳը for (int i = 0; i < NUM; i++) { //ྻͷ͚ͩ܁Γฦ͠ fill(col[i]); //৭Λࢦఆ ellipse(location[i].x, location[i].y, diameter[i], diameter[i]); //ࢦఆͨ͠ҐஔʹԁΛඳը location[i].add(velocity[i]); //ҐஔͷϕΫτϧʹͷϕΫτϧΛՃࢉɺ࣍ͷҐஔʹͳΔ if ((location[i].x > width) || (location[i].x < 0)) { //͠ը໘ͷࠨӈʹ౸ୡͨ͠Β velocity[i].x *= -1; //XํͷεϐʔυΛస } if ((location[i].y > height) || (location[i].y < 0)) { //͠ը໘ͷ্Լʹ౸ୡͨ͠Β velocity[i].y *= -1; //YํͷεϐʔυΛస } } }
͘Γฦ͠ʹΑΔ૿৩ ‣
ࠓ͜͜·Ͱ