SlideShare a Scribd company logo
Introduction to Programming
Class 13
Paul Brebner
3d tutorial
• https://www.processing.org/tutorials/p3d/
2d -> 3d
• So far we’ve worked in 2d (x,y) dimensions
– E.g. Line, rectangles, ellipses, etc.
• How about 3d? (x,y,z)?
– Spheres, Cubes, etc
– Problem: Computer screen is 2d
– But Video card can display 3d world on 2d screen
• Tell Processing to use 3d
void setup()
{
size(200, 200, P3D); // 3rd parameter
}
3d co-ordinates and shapes
• X dimension is horizontal (+ to the right)
• Y dimension is vertical (+ down, - up)
• Z dimension is in/out (+ towards you, - away)
• 3d shapes are:
– box(size)
– sphere(size)
– Custom using vertex()
– Box and sphere only have 1 argument! Size
• How do you draw them in a (x,y,z) location???
Box (sketch_3dA)
void setup()
{
size(200, 200, P3D); // go 3d!
}
void draw()
{
background(0);
box(100); // where's my box? Try making it bigger
}
Translate – move the screen!
• All 3d objects are drawn at (0,0,0)
• To draw them somewhere else, move the
screen with the translate(x,y,z) function
void setup()
{
size(200, 200, P3D); // go 3d!
}
void draw()
{
background(0);
translate(50, 0, 0); // move screen 50 across
box(100);
}
Box (sketch_3dB)
void setup()
{
size(500, 500, P3D); // go 3d!
}
void draw()
{
background(0);
// translate(frameCount, 0, 0); // move in x direction only
// translate(0, frameCount, 0); // move in y direction only
// translate(0, 0, frameCount); // move in x direction only
// translate(frameCount, frameCount, 0); // move in x and y
// translate(frameCount, frameCount, frameCount); // x y and z
// translate(frameCount, frameCount, -frameCount); // vanishing act
translate(mouseX, mouseY, 0); // use mouse for x and y
box(100); // where's my box?
}
Box + rotate (sketch_3dC)
rotate(radians(degrees))
void setup()
{
size(500, 500, P3D); // go 3d!
}
void draw()
{
background(0);
translate(frameCount, frameCount, 0);
rotateX(radians(frameCount)); // let’s SPIN!
rotateY(radians(frameCount));
rotateZ(radians(frameCount));
box(100);
}
Box + scale (sketch_3dD)
scale(1, 1, 1) same size, scale(2, 2, 2)
x2 size etc
void setup()
{
size(500, 500, P3D); // go 3d!
}
void draw()
{
background(0);
translate(frameCount, frameCount, 0);
rotateX(radians(frameCount)); // let’s SPIN!
rotateY(radians(frameCount));
rotateZ(radians(frameCount));
scale(frameCount, frameCount, frameCount); // explode!
// scale(frameCount, frameCount/10, frameCount/10); // what does this do?
box(100);
}
Add some colour 3dE
void setup()
{
size(500, 500, P3D); // go 3d!
}
void draw()
{
background(0);
fill( frameCount * 3 % 255,
frameCount * 5 % 255,
frameCount * 7 % 255);
translate(frameCount, frameCount, 0);
rotateX(radians(frameCount)); // let’s SPIN!
rotateY(radians(frameCount));
rotateZ(radians(frameCount));
scale(frameCount, frameCount/10, frameCount/10);
box(1);
}
Lights 3dF
void setup()
{
size(500, 500, P3D); // go 3d!
}
void draw()
{
background(0);
translate(width/2, height/2, 0); // move it to the centre
rotateX(radians(frameCount)); // let’s SPIN!
rotateY(radians(frameCount));
rotateZ(radians(frameCount));
if (mousePressed) lights(); // lights are turned off each frame, default
box(100); // try sphere();
}
Lights 3dG
Other lights
// ambient light just has a colour
ambientLight(0,0,255); // RGB arguments for blue ambient
// directional light has colour and direction
directionalLight(0, 255, 0, 0, -1, 0); // RGB colour and direction (1,0,-1) for (x,y,z)
// spotlight has colour, location, direction, angle, concentration
spotLight(255, 0, 0, width/2, height/2, 400, 0, 0, -1, PI/4, 2);
Lights 3dG
void setup()
{
size(500, 500, P3D); // go 3d!
}
void draw()
{
background(0);
translate(width/2, height/2, 0); // move it to the centre
// directionalLight(0, 255, 0, 1, -1, -1);
spotLight(255, 0, 0, mouseX-(width/2), mouseY-(height/2), 400, 0, 0, -1, PI/4, 100);
// box(100);
sphere(100);
}
More
• Lights, camera, action
• camera() sets where the viewer is
• perspective() sets how far away you are
• texture() add image to 3d objects
• Try
– Java Examples, Demos, Graphics, Planets

More Related Content

What's hot

04 factorising, roots, zeros, quadratics eqn (2)
04   factorising, roots, zeros, quadratics eqn (2)04   factorising, roots, zeros, quadratics eqn (2)
04 factorising, roots, zeros, quadratics eqn (2)
majapamaya
 
Curve sketching
Curve sketchingCurve sketching
Curve sketching
Shaun Wilson
 
การสอนเรื่อง การแยกตัวประกอบฯ
การสอนเรื่อง การแยกตัวประกอบฯการสอนเรื่อง การแยกตัวประกอบฯ
การสอนเรื่อง การแยกตัวประกอบฯ
Krukomnuan
 
Alg1 lesson 9-5
Alg1 lesson 9-5Alg1 lesson 9-5
Alg1 lesson 9-5
Carol Defreese
 
Tactical motifs 2
Tactical motifs 2Tactical motifs 2
Tactical motifs 2
Dattatraya Patwardhan
 
Graphing Linear Inequalities
Graphing Linear InequalitiesGraphing Linear Inequalities
Graphing Linear Inequalities
kevinryanclark
 
Add,sub,mult polynomials
Add,sub,mult polynomialsAdd,sub,mult polynomials
Add,sub,mult polynomials
Jessica Garcia
 
Balotario resuelto 2012 1-upla_administración201
Balotario resuelto 2012 1-upla_administración201Balotario resuelto 2012 1-upla_administración201
Balotario resuelto 2012 1-upla_administración201
Enriguillermo
 
MS2 POwer Rules
MS2 POwer RulesMS2 POwer Rules
Regras diferenciacao
Regras diferenciacaoRegras diferenciacao
Regras diferenciacao
Uniengenheiros2011
 
U1 03 productos notables
U1   03 productos notablesU1   03 productos notables
U1 03 productos notables
UNEFA Zulia
 
Funcion matematica
Funcion matematicaFuncion matematica
Math AB Chapter 8 Polynomials
Math AB Chapter 8 PolynomialsMath AB Chapter 8 Polynomials
Math AB Chapter 8 Polynomials
mcarls
 
Algebra i ccp quarter 1 benchmark review
Algebra i ccp quarter 1 benchmark reviewAlgebra i ccp quarter 1 benchmark review
Algebra i ccp quarter 1 benchmark review
ldaneau
 
4.1 notes
4.1 notes4.1 notes
4.1 notes
toney
 
Derivadas con Derive
Derivadas con DeriveDerivadas con Derive
Derivadas con Derive
fgrino2
 
Completing the square
Completing the squareCompleting the square
Completing the square
Puniswary Paramasivam
 

What's hot (17)

04 factorising, roots, zeros, quadratics eqn (2)
04   factorising, roots, zeros, quadratics eqn (2)04   factorising, roots, zeros, quadratics eqn (2)
04 factorising, roots, zeros, quadratics eqn (2)
 
Curve sketching
Curve sketchingCurve sketching
Curve sketching
 
การสอนเรื่อง การแยกตัวประกอบฯ
การสอนเรื่อง การแยกตัวประกอบฯการสอนเรื่อง การแยกตัวประกอบฯ
การสอนเรื่อง การแยกตัวประกอบฯ
 
Alg1 lesson 9-5
Alg1 lesson 9-5Alg1 lesson 9-5
Alg1 lesson 9-5
 
Tactical motifs 2
Tactical motifs 2Tactical motifs 2
Tactical motifs 2
 
Graphing Linear Inequalities
Graphing Linear InequalitiesGraphing Linear Inequalities
Graphing Linear Inequalities
 
Add,sub,mult polynomials
Add,sub,mult polynomialsAdd,sub,mult polynomials
Add,sub,mult polynomials
 
Balotario resuelto 2012 1-upla_administración201
Balotario resuelto 2012 1-upla_administración201Balotario resuelto 2012 1-upla_administración201
Balotario resuelto 2012 1-upla_administración201
 
MS2 POwer Rules
MS2 POwer RulesMS2 POwer Rules
MS2 POwer Rules
 
Regras diferenciacao
Regras diferenciacaoRegras diferenciacao
Regras diferenciacao
 
U1 03 productos notables
U1   03 productos notablesU1   03 productos notables
U1 03 productos notables
 
Funcion matematica
Funcion matematicaFuncion matematica
Funcion matematica
 
Math AB Chapter 8 Polynomials
Math AB Chapter 8 PolynomialsMath AB Chapter 8 Polynomials
Math AB Chapter 8 Polynomials
 
Algebra i ccp quarter 1 benchmark review
Algebra i ccp quarter 1 benchmark reviewAlgebra i ccp quarter 1 benchmark review
Algebra i ccp quarter 1 benchmark review
 
4.1 notes
4.1 notes4.1 notes
4.1 notes
 
Derivadas con Derive
Derivadas con DeriveDerivadas con Derive
Derivadas con Derive
 
Completing the square
Completing the squareCompleting the square
Completing the square
 

Viewers also liked

GanapathiramanBALASUBRAMANIAN_LeadEngineer_Upload
GanapathiramanBALASUBRAMANIAN_LeadEngineer_UploadGanapathiramanBALASUBRAMANIAN_LeadEngineer_Upload
GanapathiramanBALASUBRAMANIAN_LeadEngineer_Upload
Ganapathi Raman B
 
my CV
my CVmy CV
Concannon.FieldNotes.2
Concannon.FieldNotes.2Concannon.FieldNotes.2
Concannon.FieldNotes.2
Brittany Concannon
 
История развития анализа хозяйственной деятельности
История развития анализа хозяйственной деятельностиИстория развития анализа хозяйственной деятельности
История развития анализа хозяйственной деятельности
Нanna Loseva
 
THE MALL JUMEIRAH
THE MALL JUMEIRAHTHE MALL JUMEIRAH
THE MALL JUMEIRAH
Aditi Bhatt
 
C documents and settings_aula_escritorio_dibujo1 (2) model (1
C  documents and settings_aula_escritorio_dibujo1 (2) model (1C  documents and settings_aula_escritorio_dibujo1 (2) model (1
C documents and settings_aula_escritorio_dibujo1 (2) model (1msallesfoxa
 
Harsh Yash and kunal
Harsh Yash  and kunalHarsh Yash  and kunal
Harsh Yash and kunal
Harsh Singh
 
Laleaua
LaleauaLaleaua
El Cuerpo como referente de Diseño
El Cuerpo como referente de DiseñoEl Cuerpo como referente de Diseño
El Cuerpo como referente de Diseño
Laura Jiménez Quintero
 
my cv final9
my cv final9my cv final9
my cv final9
Anil Nair
 
Fisă de evaluare Stăncescu Adina
Fisă de evaluare Stăncescu AdinaFisă de evaluare Stăncescu Adina
Fisă de evaluare Stăncescu Adina
Simonne Chirilă
 
誠芳能源科技有限公司-五甲教堂提案
誠芳能源科技有限公司-五甲教堂提案誠芳能源科技有限公司-五甲教堂提案
誠芳能源科技有限公司-五甲教堂提案
ray6814
 
Monica andrea recetor1
Monica andrea recetor1Monica andrea recetor1
Monica andrea recetor1
klaumilenitha
 

Viewers also liked (14)

GanapathiramanBALASUBRAMANIAN_LeadEngineer_Upload
GanapathiramanBALASUBRAMANIAN_LeadEngineer_UploadGanapathiramanBALASUBRAMANIAN_LeadEngineer_Upload
GanapathiramanBALASUBRAMANIAN_LeadEngineer_Upload
 
Arbol
ArbolArbol
Arbol
 
my CV
my CVmy CV
my CV
 
Concannon.FieldNotes.2
Concannon.FieldNotes.2Concannon.FieldNotes.2
Concannon.FieldNotes.2
 
История развития анализа хозяйственной деятельности
История развития анализа хозяйственной деятельностиИстория развития анализа хозяйственной деятельности
История развития анализа хозяйственной деятельности
 
THE MALL JUMEIRAH
THE MALL JUMEIRAHTHE MALL JUMEIRAH
THE MALL JUMEIRAH
 
C documents and settings_aula_escritorio_dibujo1 (2) model (1
C  documents and settings_aula_escritorio_dibujo1 (2) model (1C  documents and settings_aula_escritorio_dibujo1 (2) model (1
C documents and settings_aula_escritorio_dibujo1 (2) model (1
 
Harsh Yash and kunal
Harsh Yash  and kunalHarsh Yash  and kunal
Harsh Yash and kunal
 
Laleaua
LaleauaLaleaua
Laleaua
 
El Cuerpo como referente de Diseño
El Cuerpo como referente de DiseñoEl Cuerpo como referente de Diseño
El Cuerpo como referente de Diseño
 
my cv final9
my cv final9my cv final9
my cv final9
 
Fisă de evaluare Stăncescu Adina
Fisă de evaluare Stăncescu AdinaFisă de evaluare Stăncescu Adina
Fisă de evaluare Stăncescu Adina
 
誠芳能源科技有限公司-五甲教堂提案
誠芳能源科技有限公司-五甲教堂提案誠芳能源科技有限公司-五甲教堂提案
誠芳能源科技有限公司-五甲教堂提案
 
Monica andrea recetor1
Monica andrea recetor1Monica andrea recetor1
Monica andrea recetor1
 

Similar to Introduction to programming class 13

CS 354 Graphics Math
CS 354 Graphics MathCS 354 Graphics Math
CS 354 Graphics Math
Mark Kilgard
 
3D Design with OpenSCAD
3D Design with OpenSCAD3D Design with OpenSCAD
3D Design with OpenSCAD
VickyTGAW
 
Computer graphics
Computer graphics   Computer graphics
Computer graphics
Prianka Padmanaban
 
Computer graphics
Computer graphics   Computer graphics
Computer graphics
Prianka Padmanaban
 
Basics of Computer graphics lab
Basics of Computer graphics labBasics of Computer graphics lab
Basics of Computer graphics lab
Priya Goyal
 
Computer graphics lab manual
Computer graphics lab manualComputer graphics lab manual
Computer graphics lab manual
Uma mohan
 
Creating masterpieces with raphael
Creating masterpieces with raphaelCreating masterpieces with raphael
Creating masterpieces with raphael
Pippi Labradoodle
 
COMPAPPABCA49085rFunrAP__Practical Number 9 & 10.docx
COMPAPPABCA49085rFunrAP__Practical Number 9 & 10.docxCOMPAPPABCA49085rFunrAP__Practical Number 9 & 10.docx
COMPAPPABCA49085rFunrAP__Practical Number 9 & 10.docx
TashiBhutia12
 
2Bytesprog2 course_2014_c9_graph
2Bytesprog2 course_2014_c9_graph2Bytesprog2 course_2014_c9_graph
2Bytesprog2 course_2014_c9_graph
kinan keshkeh
 
building_games_with_ruby_rubyconf
building_games_with_ruby_rubyconfbuilding_games_with_ruby_rubyconf
building_games_with_ruby_rubyconf
tutorialsruby
 
building_games_with_ruby_rubyconf
building_games_with_ruby_rubyconfbuilding_games_with_ruby_rubyconf
building_games_with_ruby_rubyconf
tutorialsruby
 
Fun with D3.js: Data Visualization Eye Candy with Streaming JSON
Fun with D3.js: Data Visualization Eye Candy with Streaming JSONFun with D3.js: Data Visualization Eye Candy with Streaming JSON
Fun with D3.js: Data Visualization Eye Candy with Streaming JSON
Tomomi Imura
 
Building a Visualization Language
Building a Visualization LanguageBuilding a Visualization Language
Building a Visualization Language
jeresig
 
CG OpenGL Shadows + Light + Texture -course 10
CG OpenGL Shadows + Light + Texture -course 10CG OpenGL Shadows + Light + Texture -course 10
CG OpenGL Shadows + Light + Texture -course 10
fungfung Chen
 
Cg my own programs
Cg my own programsCg my own programs
Cg my own programs
Amit Kapoor
 
Line drawing algorithm and antialiasing techniques
Line drawing algorithm and antialiasing techniquesLine drawing algorithm and antialiasing techniques
Line drawing algorithm and antialiasing techniques
Ankit Garg
 
Processing and Processing.js
Processing and Processing.jsProcessing and Processing.js
Processing and Processing.js
jeresig
 
Darkonoid
DarkonoidDarkonoid
Darkonoid
graphitech
 
SenchaCon 2016: Add Magic to Your Ext JS Apps with D3 Visualizations - Vitaly...
SenchaCon 2016: Add Magic to Your Ext JS Apps with D3 Visualizations - Vitaly...SenchaCon 2016: Add Magic to Your Ext JS Apps with D3 Visualizations - Vitaly...
SenchaCon 2016: Add Magic to Your Ext JS Apps with D3 Visualizations - Vitaly...
Sencha
 
Primitives
PrimitivesPrimitives

Similar to Introduction to programming class 13 (20)

CS 354 Graphics Math
CS 354 Graphics MathCS 354 Graphics Math
CS 354 Graphics Math
 
3D Design with OpenSCAD
3D Design with OpenSCAD3D Design with OpenSCAD
3D Design with OpenSCAD
 
Computer graphics
Computer graphics   Computer graphics
Computer graphics
 
Computer graphics
Computer graphics   Computer graphics
Computer graphics
 
Basics of Computer graphics lab
Basics of Computer graphics labBasics of Computer graphics lab
Basics of Computer graphics lab
 
Computer graphics lab manual
Computer graphics lab manualComputer graphics lab manual
Computer graphics lab manual
 
Creating masterpieces with raphael
Creating masterpieces with raphaelCreating masterpieces with raphael
Creating masterpieces with raphael
 
COMPAPPABCA49085rFunrAP__Practical Number 9 & 10.docx
COMPAPPABCA49085rFunrAP__Practical Number 9 & 10.docxCOMPAPPABCA49085rFunrAP__Practical Number 9 & 10.docx
COMPAPPABCA49085rFunrAP__Practical Number 9 & 10.docx
 
2Bytesprog2 course_2014_c9_graph
2Bytesprog2 course_2014_c9_graph2Bytesprog2 course_2014_c9_graph
2Bytesprog2 course_2014_c9_graph
 
building_games_with_ruby_rubyconf
building_games_with_ruby_rubyconfbuilding_games_with_ruby_rubyconf
building_games_with_ruby_rubyconf
 
building_games_with_ruby_rubyconf
building_games_with_ruby_rubyconfbuilding_games_with_ruby_rubyconf
building_games_with_ruby_rubyconf
 
Fun with D3.js: Data Visualization Eye Candy with Streaming JSON
Fun with D3.js: Data Visualization Eye Candy with Streaming JSONFun with D3.js: Data Visualization Eye Candy with Streaming JSON
Fun with D3.js: Data Visualization Eye Candy with Streaming JSON
 
Building a Visualization Language
Building a Visualization LanguageBuilding a Visualization Language
Building a Visualization Language
 
CG OpenGL Shadows + Light + Texture -course 10
CG OpenGL Shadows + Light + Texture -course 10CG OpenGL Shadows + Light + Texture -course 10
CG OpenGL Shadows + Light + Texture -course 10
 
Cg my own programs
Cg my own programsCg my own programs
Cg my own programs
 
Line drawing algorithm and antialiasing techniques
Line drawing algorithm and antialiasing techniquesLine drawing algorithm and antialiasing techniques
Line drawing algorithm and antialiasing techniques
 
Processing and Processing.js
Processing and Processing.jsProcessing and Processing.js
Processing and Processing.js
 
Darkonoid
DarkonoidDarkonoid
Darkonoid
 
SenchaCon 2016: Add Magic to Your Ext JS Apps with D3 Visualizations - Vitaly...
SenchaCon 2016: Add Magic to Your Ext JS Apps with D3 Visualizations - Vitaly...SenchaCon 2016: Add Magic to Your Ext JS Apps with D3 Visualizations - Vitaly...
SenchaCon 2016: Add Magic to Your Ext JS Apps with D3 Visualizations - Vitaly...
 
Primitives
PrimitivesPrimitives
Primitives
 

More from Paul Brebner

The Impact of Hardware and Software Version Changes on Apache Kafka Performan...
The Impact of Hardware and Software Version Changes on Apache Kafka Performan...The Impact of Hardware and Software Version Changes on Apache Kafka Performan...
The Impact of Hardware and Software Version Changes on Apache Kafka Performan...
Paul Brebner
 
Apache ZooKeeper and Apache Curator: Meet the Dining Philosophers
Apache ZooKeeper and Apache Curator: Meet the Dining PhilosophersApache ZooKeeper and Apache Curator: Meet the Dining Philosophers
Apache ZooKeeper and Apache Curator: Meet the Dining Philosophers
Paul Brebner
 
Spinning your Drones with Cadence Workflows and Apache Kafka
Spinning your Drones with Cadence Workflows and Apache KafkaSpinning your Drones with Cadence Workflows and Apache Kafka
Spinning your Drones with Cadence Workflows and Apache Kafka
Paul Brebner
 
Change Data Capture (CDC) With Kafka Connect® and the Debezium PostgreSQL Sou...
Change Data Capture (CDC) With Kafka Connect® and the Debezium PostgreSQL Sou...Change Data Capture (CDC) With Kafka Connect® and the Debezium PostgreSQL Sou...
Change Data Capture (CDC) With Kafka Connect® and the Debezium PostgreSQL Sou...
Paul Brebner
 
Scaling Open Source Big Data Cloud Applications is Easy/Hard
Scaling Open Source Big Data Cloud Applications is Easy/HardScaling Open Source Big Data Cloud Applications is Easy/Hard
Scaling Open Source Big Data Cloud Applications is Easy/Hard
Paul Brebner
 
OPEN Talk: Scaling Open Source Big Data Cloud Applications is Easy/Hard
OPEN Talk: Scaling Open Source Big Data Cloud Applications is Easy/HardOPEN Talk: Scaling Open Source Big Data Cloud Applications is Easy/Hard
OPEN Talk: Scaling Open Source Big Data Cloud Applications is Easy/Hard
Paul Brebner
 
A Visual Introduction to Apache Kafka
A Visual Introduction to Apache KafkaA Visual Introduction to Apache Kafka
A Visual Introduction to Apache Kafka
Paul Brebner
 
Massively Scalable Real-time Geospatial Anomaly Detection with Apache Kafka a...
Massively Scalable Real-time Geospatial Anomaly Detection with Apache Kafka a...Massively Scalable Real-time Geospatial Anomaly Detection with Apache Kafka a...
Massively Scalable Real-time Geospatial Anomaly Detection with Apache Kafka a...
Paul Brebner
 
Building a real-time data processing pipeline using Apache Kafka, Kafka Conne...
Building a real-time data processing pipeline using Apache Kafka, Kafka Conne...Building a real-time data processing pipeline using Apache Kafka, Kafka Conne...
Building a real-time data processing pipeline using Apache Kafka, Kafka Conne...
Paul Brebner
 
Grid Middleware – Principles, Practice and Potential
Grid Middleware – Principles, Practice and PotentialGrid Middleware – Principles, Practice and Potential
Grid Middleware – Principles, Practice and Potential
Paul Brebner
 
Grid middleware is easy to install, configure, secure, debug and manage acros...
Grid middleware is easy to install, configure, secure, debug and manage acros...Grid middleware is easy to install, configure, secure, debug and manage acros...
Grid middleware is easy to install, configure, secure, debug and manage acros...
Paul Brebner
 
Massively Scalable Real-time Geospatial Data Processing with Apache Kafka and...
Massively Scalable Real-time Geospatial Data Processing with Apache Kafka and...Massively Scalable Real-time Geospatial Data Processing with Apache Kafka and...
Massively Scalable Real-time Geospatial Data Processing with Apache Kafka and...
Paul Brebner
 
Massively Scalable Real-time Geospatial Data Processing with Apache Kafka and...
Massively Scalable Real-time Geospatial Data Processing with Apache Kafka and...Massively Scalable Real-time Geospatial Data Processing with Apache Kafka and...
Massively Scalable Real-time Geospatial Data Processing with Apache Kafka and...
Paul Brebner
 
Melbourne Big Data Meetup Talk: Scaling a Real-Time Anomaly Detection Applica...
Melbourne Big Data Meetup Talk: Scaling a Real-Time Anomaly Detection Applica...Melbourne Big Data Meetup Talk: Scaling a Real-Time Anomaly Detection Applica...
Melbourne Big Data Meetup Talk: Scaling a Real-Time Anomaly Detection Applica...
Paul Brebner
 
Massively Scalable Real-time Geospatial Data Processing with Apache Kafka and...
Massively Scalable Real-time Geospatial Data Processing with Apache Kafka and...Massively Scalable Real-time Geospatial Data Processing with Apache Kafka and...
Massively Scalable Real-time Geospatial Data Processing with Apache Kafka and...
Paul Brebner
 
0b101000 years of computing: a personal timeline - decade "0", the 1980's
0b101000 years of computing: a personal timeline - decade "0", the 1980's0b101000 years of computing: a personal timeline - decade "0", the 1980's
0b101000 years of computing: a personal timeline - decade "0", the 1980's
Paul Brebner
 
ApacheCon Berlin 2019: Kongo:Building a Scalable Streaming IoT Application us...
ApacheCon Berlin 2019: Kongo:Building a Scalable Streaming IoT Application us...ApacheCon Berlin 2019: Kongo:Building a Scalable Streaming IoT Application us...
ApacheCon Berlin 2019: Kongo:Building a Scalable Streaming IoT Application us...
Paul Brebner
 
ApacheCon2019 Talk: Kafka, Cassandra and Kubernetes at Scale – Real-time Ano...
ApacheCon2019 Talk: Kafka, Cassandra and Kubernetesat Scale – Real-time Ano...ApacheCon2019 Talk: Kafka, Cassandra and Kubernetesat Scale – Real-time Ano...
ApacheCon2019 Talk: Kafka, Cassandra and Kubernetes at Scale – Real-time Ano...
Paul Brebner
 
ApacheCon2019 Talk: Improving the Observability of Cassandra, Kafka and Kuber...
ApacheCon2019 Talk: Improving the Observability of Cassandra, Kafka and Kuber...ApacheCon2019 Talk: Improving the Observability of Cassandra, Kafka and Kuber...
ApacheCon2019 Talk: Improving the Observability of Cassandra, Kafka and Kuber...
Paul Brebner
 
How to Improve the Observability of Apache Cassandra and Kafka applications...
How to Improve the Observability of Apache Cassandra and Kafka applications...How to Improve the Observability of Apache Cassandra and Kafka applications...
How to Improve the Observability of Apache Cassandra and Kafka applications...
Paul Brebner
 

More from Paul Brebner (20)

The Impact of Hardware and Software Version Changes on Apache Kafka Performan...
The Impact of Hardware and Software Version Changes on Apache Kafka Performan...The Impact of Hardware and Software Version Changes on Apache Kafka Performan...
The Impact of Hardware and Software Version Changes on Apache Kafka Performan...
 
Apache ZooKeeper and Apache Curator: Meet the Dining Philosophers
Apache ZooKeeper and Apache Curator: Meet the Dining PhilosophersApache ZooKeeper and Apache Curator: Meet the Dining Philosophers
Apache ZooKeeper and Apache Curator: Meet the Dining Philosophers
 
Spinning your Drones with Cadence Workflows and Apache Kafka
Spinning your Drones with Cadence Workflows and Apache KafkaSpinning your Drones with Cadence Workflows and Apache Kafka
Spinning your Drones with Cadence Workflows and Apache Kafka
 
Change Data Capture (CDC) With Kafka Connect® and the Debezium PostgreSQL Sou...
Change Data Capture (CDC) With Kafka Connect® and the Debezium PostgreSQL Sou...Change Data Capture (CDC) With Kafka Connect® and the Debezium PostgreSQL Sou...
Change Data Capture (CDC) With Kafka Connect® and the Debezium PostgreSQL Sou...
 
Scaling Open Source Big Data Cloud Applications is Easy/Hard
Scaling Open Source Big Data Cloud Applications is Easy/HardScaling Open Source Big Data Cloud Applications is Easy/Hard
Scaling Open Source Big Data Cloud Applications is Easy/Hard
 
OPEN Talk: Scaling Open Source Big Data Cloud Applications is Easy/Hard
OPEN Talk: Scaling Open Source Big Data Cloud Applications is Easy/HardOPEN Talk: Scaling Open Source Big Data Cloud Applications is Easy/Hard
OPEN Talk: Scaling Open Source Big Data Cloud Applications is Easy/Hard
 
A Visual Introduction to Apache Kafka
A Visual Introduction to Apache KafkaA Visual Introduction to Apache Kafka
A Visual Introduction to Apache Kafka
 
Massively Scalable Real-time Geospatial Anomaly Detection with Apache Kafka a...
Massively Scalable Real-time Geospatial Anomaly Detection with Apache Kafka a...Massively Scalable Real-time Geospatial Anomaly Detection with Apache Kafka a...
Massively Scalable Real-time Geospatial Anomaly Detection with Apache Kafka a...
 
Building a real-time data processing pipeline using Apache Kafka, Kafka Conne...
Building a real-time data processing pipeline using Apache Kafka, Kafka Conne...Building a real-time data processing pipeline using Apache Kafka, Kafka Conne...
Building a real-time data processing pipeline using Apache Kafka, Kafka Conne...
 
Grid Middleware – Principles, Practice and Potential
Grid Middleware – Principles, Practice and PotentialGrid Middleware – Principles, Practice and Potential
Grid Middleware – Principles, Practice and Potential
 
Grid middleware is easy to install, configure, secure, debug and manage acros...
Grid middleware is easy to install, configure, secure, debug and manage acros...Grid middleware is easy to install, configure, secure, debug and manage acros...
Grid middleware is easy to install, configure, secure, debug and manage acros...
 
Massively Scalable Real-time Geospatial Data Processing with Apache Kafka and...
Massively Scalable Real-time Geospatial Data Processing with Apache Kafka and...Massively Scalable Real-time Geospatial Data Processing with Apache Kafka and...
Massively Scalable Real-time Geospatial Data Processing with Apache Kafka and...
 
Massively Scalable Real-time Geospatial Data Processing with Apache Kafka and...
Massively Scalable Real-time Geospatial Data Processing with Apache Kafka and...Massively Scalable Real-time Geospatial Data Processing with Apache Kafka and...
Massively Scalable Real-time Geospatial Data Processing with Apache Kafka and...
 
Melbourne Big Data Meetup Talk: Scaling a Real-Time Anomaly Detection Applica...
Melbourne Big Data Meetup Talk: Scaling a Real-Time Anomaly Detection Applica...Melbourne Big Data Meetup Talk: Scaling a Real-Time Anomaly Detection Applica...
Melbourne Big Data Meetup Talk: Scaling a Real-Time Anomaly Detection Applica...
 
Massively Scalable Real-time Geospatial Data Processing with Apache Kafka and...
Massively Scalable Real-time Geospatial Data Processing with Apache Kafka and...Massively Scalable Real-time Geospatial Data Processing with Apache Kafka and...
Massively Scalable Real-time Geospatial Data Processing with Apache Kafka and...
 
0b101000 years of computing: a personal timeline - decade "0", the 1980's
0b101000 years of computing: a personal timeline - decade "0", the 1980's0b101000 years of computing: a personal timeline - decade "0", the 1980's
0b101000 years of computing: a personal timeline - decade "0", the 1980's
 
ApacheCon Berlin 2019: Kongo:Building a Scalable Streaming IoT Application us...
ApacheCon Berlin 2019: Kongo:Building a Scalable Streaming IoT Application us...ApacheCon Berlin 2019: Kongo:Building a Scalable Streaming IoT Application us...
ApacheCon Berlin 2019: Kongo:Building a Scalable Streaming IoT Application us...
 
ApacheCon2019 Talk: Kafka, Cassandra and Kubernetes at Scale – Real-time Ano...
ApacheCon2019 Talk: Kafka, Cassandra and Kubernetesat Scale – Real-time Ano...ApacheCon2019 Talk: Kafka, Cassandra and Kubernetesat Scale – Real-time Ano...
ApacheCon2019 Talk: Kafka, Cassandra and Kubernetes at Scale – Real-time Ano...
 
ApacheCon2019 Talk: Improving the Observability of Cassandra, Kafka and Kuber...
ApacheCon2019 Talk: Improving the Observability of Cassandra, Kafka and Kuber...ApacheCon2019 Talk: Improving the Observability of Cassandra, Kafka and Kuber...
ApacheCon2019 Talk: Improving the Observability of Cassandra, Kafka and Kuber...
 
How to Improve the Observability of Apache Cassandra and Kafka applications...
How to Improve the Observability of Apache Cassandra and Kafka applications...How to Improve the Observability of Apache Cassandra and Kafka applications...
How to Improve the Observability of Apache Cassandra and Kafka applications...
 

Recently uploaded

BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
Katrina Pritchard
 
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...
Diana Rendina
 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
Jyoti Chand
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
WaniBasim
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
adhitya5119
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
PECB
 
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
Himanshu Rai
 
Cognitive Development Adolescence Psychology
Cognitive Development Adolescence PsychologyCognitive Development Adolescence Psychology
Cognitive Development Adolescence Psychology
paigestewart1632
 
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
สมใจ จันสุกสี
 
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching AptitudeUGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
S. Raj Kumar
 
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
National Information Standards Organization (NISO)
 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
iammrhaywood
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Denish Jangid
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
Nguyen Thanh Tu Collection
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
amberjdewit93
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
Celine George
 
How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
HajraNaeem15
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Excellence Foundation for South Sudan
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience
Wahiba Chair Training & Consulting
 

Recently uploaded (20)

BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
 
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...
 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
 
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
 
Cognitive Development Adolescence Psychology
Cognitive Development Adolescence PsychologyCognitive Development Adolescence Psychology
Cognitive Development Adolescence Psychology
 
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
 
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching AptitudeUGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
 
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
 
How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
 
How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience How to Create a More Engaging and Human Online Learning Experience
How to Create a More Engaging and Human Online Learning Experience
 

Introduction to programming class 13

  • 3. 2d -> 3d • So far we’ve worked in 2d (x,y) dimensions – E.g. Line, rectangles, ellipses, etc. • How about 3d? (x,y,z)? – Spheres, Cubes, etc – Problem: Computer screen is 2d – But Video card can display 3d world on 2d screen • Tell Processing to use 3d void setup() { size(200, 200, P3D); // 3rd parameter }
  • 4. 3d co-ordinates and shapes • X dimension is horizontal (+ to the right) • Y dimension is vertical (+ down, - up) • Z dimension is in/out (+ towards you, - away) • 3d shapes are: – box(size) – sphere(size) – Custom using vertex() – Box and sphere only have 1 argument! Size • How do you draw them in a (x,y,z) location???
  • 5. Box (sketch_3dA) void setup() { size(200, 200, P3D); // go 3d! } void draw() { background(0); box(100); // where's my box? Try making it bigger }
  • 6. Translate – move the screen! • All 3d objects are drawn at (0,0,0) • To draw them somewhere else, move the screen with the translate(x,y,z) function void setup() { size(200, 200, P3D); // go 3d! } void draw() { background(0); translate(50, 0, 0); // move screen 50 across box(100); }
  • 7. Box (sketch_3dB) void setup() { size(500, 500, P3D); // go 3d! } void draw() { background(0); // translate(frameCount, 0, 0); // move in x direction only // translate(0, frameCount, 0); // move in y direction only // translate(0, 0, frameCount); // move in x direction only // translate(frameCount, frameCount, 0); // move in x and y // translate(frameCount, frameCount, frameCount); // x y and z // translate(frameCount, frameCount, -frameCount); // vanishing act translate(mouseX, mouseY, 0); // use mouse for x and y box(100); // where's my box? }
  • 8. Box + rotate (sketch_3dC) rotate(radians(degrees)) void setup() { size(500, 500, P3D); // go 3d! } void draw() { background(0); translate(frameCount, frameCount, 0); rotateX(radians(frameCount)); // let’s SPIN! rotateY(radians(frameCount)); rotateZ(radians(frameCount)); box(100); }
  • 9. Box + scale (sketch_3dD) scale(1, 1, 1) same size, scale(2, 2, 2) x2 size etc void setup() { size(500, 500, P3D); // go 3d! } void draw() { background(0); translate(frameCount, frameCount, 0); rotateX(radians(frameCount)); // let’s SPIN! rotateY(radians(frameCount)); rotateZ(radians(frameCount)); scale(frameCount, frameCount, frameCount); // explode! // scale(frameCount, frameCount/10, frameCount/10); // what does this do? box(100); }
  • 10. Add some colour 3dE void setup() { size(500, 500, P3D); // go 3d! } void draw() { background(0); fill( frameCount * 3 % 255, frameCount * 5 % 255, frameCount * 7 % 255); translate(frameCount, frameCount, 0); rotateX(radians(frameCount)); // let’s SPIN! rotateY(radians(frameCount)); rotateZ(radians(frameCount)); scale(frameCount, frameCount/10, frameCount/10); box(1); }
  • 11. Lights 3dF void setup() { size(500, 500, P3D); // go 3d! } void draw() { background(0); translate(width/2, height/2, 0); // move it to the centre rotateX(radians(frameCount)); // let’s SPIN! rotateY(radians(frameCount)); rotateZ(radians(frameCount)); if (mousePressed) lights(); // lights are turned off each frame, default box(100); // try sphere(); }
  • 12. Lights 3dG Other lights // ambient light just has a colour ambientLight(0,0,255); // RGB arguments for blue ambient // directional light has colour and direction directionalLight(0, 255, 0, 0, -1, 0); // RGB colour and direction (1,0,-1) for (x,y,z) // spotlight has colour, location, direction, angle, concentration spotLight(255, 0, 0, width/2, height/2, 400, 0, 0, -1, PI/4, 2);
  • 13. Lights 3dG void setup() { size(500, 500, P3D); // go 3d! } void draw() { background(0); translate(width/2, height/2, 0); // move it to the centre // directionalLight(0, 255, 0, 1, -1, -1); spotLight(255, 0, 0, mouseX-(width/2), mouseY-(height/2), 400, 0, 0, -1, PI/4, 100); // box(100); sphere(100); }
  • 14. More • Lights, camera, action • camera() sets where the viewer is • perspective() sets how far away you are • texture() add image to 3d objects • Try – Java Examples, Demos, Graphics, Planets