SlideShare une entreprise Scribd logo
1  sur  12
Télécharger pour lire hors ligne
正弦波と極座標 
Processing資料(5)
正弦波
float theta; 
void setup() { 
size(580, 350); 
background(255); 
} 
void draw() { 
background(255); 
for (int i = 0; i < 30; i++) { 
ellipse(i*20, height/2 + 100*sin(radians(theta + i * 10)), 20, 20); 
} 
theta++; 
}
float theta; 
void setup() { 
size(580, 350); 
background(255); 
} 
void draw() { 
background(255); 
for (int i = 0; i < 30; i++) { 
ellipse(i*20, height/2 + 100*sin(radians(theta + i * 10)), 20, 20); 
} 
theta++; 
}
float theta; 
void setup() { 
size(580, 350); 
background(255); 
} 
void draw() { 
background(255); 
for (int i = 0; i < 30; i++) { 
ellipse(i*20, height/2 + 50*sin(radians(theta + i * 10)), 20, 20); 
} 
theta++; 
}
float theta; 
void setup() { 
size(580, 350); 
background(255); 
} 
void draw() { 
background(255); 
for (int i = 0; i < 30; i++) { 
ellipse(i*20, height/2 + 100*sin(radians(theta + i * 10)), 20, 20); 
} 
theta++; 
}
float theta; 
void setup() { 
size(580, 350); 
background(255); 
} 
void draw() { 
background(255); 
for (int i = 0; i < 30; i++) { 
ellipse(i*20, height/2 + 100*sin(radians(theta + i * 30)), 20, 20); 
} 
theta++; 
}
極座標 
θ 
r 
(r*cos(θ),r*sin(θ))
円運動
int r = 150; 
float x; 
float y; 
int theta; 
void setup() { 
size(400, 400); 
background(255); 
} 
void draw() { 
fill(255, 30); 
noStroke(); 
rect(0, 0, width, height); 
x = width/2 + r * cos(radians(theta)); 
y = height/2 + r * sin(radians(theta)); 
fill(0); 
ellipse(x, y, 30, 30); 
theta++; 
}

Contenu connexe

Tendances

ECMAScript 6 major changes
ECMAScript 6 major changesECMAScript 6 major changes
ECMAScript 6 major changes
hayato
 
functions
functionsfunctions
functions
smirn4
 
ARTDM 170, Week13: Processing
ARTDM 170, Week13: ProcessingARTDM 170, Week13: Processing
ARTDM 170, Week13: Processing
Gilbert Guerrero
 
Maple Code for Steepest Descent
Maple Code for Steepest DescentMaple Code for Steepest Descent
Maple Code for Steepest Descent
Jeremy Lane
 

Tendances (18)

ECMAScript 6 major changes
ECMAScript 6 major changesECMAScript 6 major changes
ECMAScript 6 major changes
 
Corner Stitching in Swift @ Base Labs - Krakow
Corner Stitching in Swift @ Base Labs - KrakowCorner Stitching in Swift @ Base Labs - Krakow
Corner Stitching in Swift @ Base Labs - Krakow
 
PYTHON PROGRAMS FOR BEGINNERS
PYTHON PROGRAMS FOR BEGINNERSPYTHON PROGRAMS FOR BEGINNERS
PYTHON PROGRAMS FOR BEGINNERS
 
Programa expresiones regulares
Programa expresiones regularesPrograma expresiones regulares
Programa expresiones regulares
 
functions
functionsfunctions
functions
 
Pre-Calc 30S May 2
Pre-Calc 30S May 2Pre-Calc 30S May 2
Pre-Calc 30S May 2
 
ARTDM 170, Week13: Processing
ARTDM 170, Week13: ProcessingARTDM 170, Week13: Processing
ARTDM 170, Week13: Processing
 
[3] 프로세싱과 아두이노
[3] 프로세싱과 아두이노[3] 프로세싱과 아두이노
[3] 프로세싱과 아두이노
 
Proga 0706
Proga 0706Proga 0706
Proga 0706
 
Simulate bouncing ball in pygame
Simulate bouncing ball in pygameSimulate bouncing ball in pygame
Simulate bouncing ball in pygame
 
Deleting a Node from a Binary Search Tree (Scheme
Deleting a Node from a Binary Search Tree (SchemeDeleting a Node from a Binary Search Tree (Scheme
Deleting a Node from a Binary Search Tree (Scheme
 
Engineering Graphics
Engineering Graphics Engineering Graphics
Engineering Graphics
 
4.5 tan and cot.ppt worked
4.5   tan and cot.ppt worked4.5   tan and cot.ppt worked
4.5 tan and cot.ppt worked
 
Maple Code for Steepest Descent
Maple Code for Steepest DescentMaple Code for Steepest Descent
Maple Code for Steepest Descent
 
Kwp2 100107
Kwp2 100107Kwp2 100107
Kwp2 100107
 
Include
IncludeInclude
Include
 
Simulate elliptical orbit in pygame
Simulate elliptical orbit in pygameSimulate elliptical orbit in pygame
Simulate elliptical orbit in pygame
 
Dfs implementation in c
Dfs implementation in cDfs implementation in c
Dfs implementation in c
 

En vedette

低レイヤー入門
低レイヤー入門低レイヤー入門
低レイヤー入門
demuyan
 
バイナリより低レイヤな話 (プロセッサの心を読み解く) - カーネル/VM探検隊@北陸1
バイナリより低レイヤな話 (プロセッサの心を読み解く) - カーネル/VM探検隊@北陸1バイナリより低レイヤな話 (プロセッサの心を読み解く) - カーネル/VM探検隊@北陸1
バイナリより低レイヤな話 (プロセッサの心を読み解く) - カーネル/VM探検隊@北陸1
Hirotaka Kawata
 
Media Art II 2013 第7回 : openFrameworks 3Dグラフィクス、OpenGL
Media Art II 2013 第7回 : openFrameworks 3Dグラフィクス、OpenGLMedia Art II 2013 第7回 : openFrameworks 3Dグラフィクス、OpenGL
Media Art II 2013 第7回 : openFrameworks 3Dグラフィクス、OpenGL
Atsushi Tadokoro
 

En vedette (12)

Processing資料(6) 様々な図形
Processing資料(6) 様々な図形Processing資料(6) 様々な図形
Processing資料(6) 様々な図形
 
Processing資料(2) 再帰
Processing資料(2) 再帰Processing資料(2) 再帰
Processing資料(2) 再帰
 
Processingでジャバジャバ稼ぐ
Processingでジャバジャバ稼ぐProcessingでジャバジャバ稼ぐ
Processingでジャバジャバ稼ぐ
 
Processing資料(1) Processingの基本
Processing資料(1) Processingの基本Processing資料(1) Processingの基本
Processing資料(1) Processingの基本
 
低レイヤー入門
低レイヤー入門低レイヤー入門
低レイヤー入門
 
プログラミング初心者さんにもオススメ!アートなプログラミング言語 Processingについて
プログラミング初心者さんにもオススメ!アートなプログラミング言語 Processingについてプログラミング初心者さんにもオススメ!アートなプログラミング言語 Processingについて
プログラミング初心者さんにもオススメ!アートなプログラミング言語 Processingについて
 
WordPress でプロフィールサイトをつくってみた
WordPress でプロフィールサイトをつくってみたWordPress でプロフィールサイトをつくってみた
WordPress でプロフィールサイトをつくってみた
 
バイナリより低レイヤな話 (プロセッサの心を読み解く) - カーネル/VM探検隊@北陸1
バイナリより低レイヤな話 (プロセッサの心を読み解く) - カーネル/VM探検隊@北陸1バイナリより低レイヤな話 (プロセッサの心を読み解く) - カーネル/VM探検隊@北陸1
バイナリより低レイヤな話 (プロセッサの心を読み解く) - カーネル/VM探検隊@北陸1
 
やってよかったOS作り
やってよかったOS作りやってよかったOS作り
やってよかったOS作り
 
Media Art II 2013 第7回 : openFrameworks 3Dグラフィクス、OpenGL
Media Art II 2013 第7回 : openFrameworks 3Dグラフィクス、OpenGLMedia Art II 2013 第7回 : openFrameworks 3Dグラフィクス、OpenGL
Media Art II 2013 第7回 : openFrameworks 3Dグラフィクス、OpenGL
 
ゼロから始める自作 CPU 入門
ゼロから始める自作 CPU 入門ゼロから始める自作 CPU 入門
ゼロから始める自作 CPU 入門
 
C++でできる!OS自作入門
C++でできる!OS自作入門C++でできる!OS自作入門
C++でできる!OS自作入門
 

Similaire à Processing資料(5) 正弦波と極座標 (12)

Graphical representation of Stack
Graphical representation of StackGraphical representation of Stack
Graphical representation of Stack
 
Gauss in java
Gauss in javaGauss in java
Gauss in java
 
Proga 0622
Proga 0622Proga 0622
Proga 0622
 
Proga 090525
Proga 090525Proga 090525
Proga 090525
 
Raspberry Pi à la GroovyFX
Raspberry Pi à la GroovyFXRaspberry Pi à la GroovyFX
Raspberry Pi à la GroovyFX
 
Proga 0601
Proga 0601Proga 0601
Proga 0601
 
ARTDM 170, Week 13: Text Elements + Arrays
ARTDM 170, Week 13: Text Elements + ArraysARTDM 170, Week 13: Text Elements + Arrays
ARTDM 170, Week 13: Text Elements + Arrays
 
Proga 0629
Proga 0629Proga 0629
Proga 0629
 
Mobile Game and Application with J2ME
Mobile Gameand Application with J2MEMobile Gameand Application with J2ME
Mobile Game and Application with J2ME
 
Mobile Game and Application with J2ME - Collision Detection
Mobile Gameand Application withJ2ME  - Collision DetectionMobile Gameand Application withJ2ME  - Collision Detection
Mobile Game and Application with J2ME - Collision Detection
 
662305 10
662305 10662305 10
662305 10
 
Java cheatsheet
Java cheatsheetJava cheatsheet
Java cheatsheet
 

Plus de reona396

Plus de reona396 (11)

PWAnight_20221019_クリエイティブコーディングとは?
PWAnight_20221019_クリエイティブコーディングとは?PWAnight_20221019_クリエイティブコーディングとは?
PWAnight_20221019_クリエイティブコーディングとは?
 
PCD Tokyo 2020 ワークショップ「Processingでクリエイティブコーダーデビュー!」資料
PCD Tokyo 2020 ワークショップ「Processingでクリエイティブコーダーデビュー!」資料PCD Tokyo 2020 ワークショップ「Processingでクリエイティブコーダーデビュー!」資料
PCD Tokyo 2020 ワークショップ「Processingでクリエイティブコーダーデビュー!」資料
 
PCD2019 TOKYO ワークショップ「2時間で!Processingでプログラミング入門」
PCD2019 TOKYO ワークショップ「2時間で!Processingでプログラミング入門」PCD2019 TOKYO ワークショップ「2時間で!Processingでプログラミング入門」
PCD2019 TOKYO ワークショップ「2時間で!Processingでプログラミング入門」
 
Processingについて
ProcessingについてProcessingについて
Processingについて
 
p5.js について
p5.js についてp5.js について
p5.js について
 
Processing資料(10) リファレンス
Processing資料(10) リファレンスProcessing資料(10) リファレンス
Processing資料(10) リファレンス
 
Processing資料(9) モード
Processing資料(9) モードProcessing資料(9) モード
Processing資料(9) モード
 
Processing資料(7) マウスとキーボード
Processing資料(7) マウスとキーボードProcessing資料(7) マウスとキーボード
Processing資料(7) マウスとキーボード
 
Processing資料(4) アニメーション
Processing資料(4) アニメーションProcessing資料(4) アニメーション
Processing資料(4) アニメーション
 
Processing資料(3) 色の指定
Processing資料(3) 色の指定Processing資料(3) 色の指定
Processing資料(3) 色の指定
 
プログラミング初心者さん歓迎! アートでデザインなプログラミング言語 Processing について
プログラミング初心者さん歓迎! アートでデザインなプログラミング言語 Processing についてプログラミング初心者さん歓迎! アートでデザインなプログラミング言語 Processing について
プログラミング初心者さん歓迎! アートでデザインなプログラミング言語 Processing について
 

Dernier

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Dernier (20)

Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 

Processing資料(5) 正弦波と極座標

  • 3. float theta; void setup() { size(580, 350); background(255); } void draw() { background(255); for (int i = 0; i < 30; i++) { ellipse(i*20, height/2 + 100*sin(radians(theta + i * 10)), 20, 20); } theta++; }
  • 4. float theta; void setup() { size(580, 350); background(255); } void draw() { background(255); for (int i = 0; i < 30; i++) { ellipse(i*20, height/2 + 100*sin(radians(theta + i * 10)), 20, 20); } theta++; }
  • 5. float theta; void setup() { size(580, 350); background(255); } void draw() { background(255); for (int i = 0; i < 30; i++) { ellipse(i*20, height/2 + 50*sin(radians(theta + i * 10)), 20, 20); } theta++; }
  • 6.
  • 7. float theta; void setup() { size(580, 350); background(255); } void draw() { background(255); for (int i = 0; i < 30; i++) { ellipse(i*20, height/2 + 100*sin(radians(theta + i * 10)), 20, 20); } theta++; }
  • 8. float theta; void setup() { size(580, 350); background(255); } void draw() { background(255); for (int i = 0; i < 30; i++) { ellipse(i*20, height/2 + 100*sin(radians(theta + i * 30)), 20, 20); } theta++; }
  • 9.
  • 10. 極座標 θ r (r*cos(θ),r*sin(θ))
  • 12. int r = 150; float x; float y; int theta; void setup() { size(400, 400); background(255); } void draw() { fill(255, 30); noStroke(); rect(0, 0, width, height); x = width/2 + r * cos(radians(theta)); y = height/2 + r * sin(radians(theta)); fill(0); ellipse(x, y, 30, 30); theta++; }