Download presentation
Presentation is loading. Please wait.
1
Processing Environment
Menu Toolbar (run, stop, new, open, save, export) Tabs Text editor (this is where you type code) Message area (feedback, errors) Text output (print commands)
2
Transferring sketches
Processing export functions Prepares your sketch for execution with Java Not for transferring to the home system To bring a sketch home Find your .pde file Try to open another and see where this one is Transfer using a SSH FTP program WinSCP for windows Command line sftp for MacOS
3
Other Drawing Functions
triangle(x1, y1, x2, y2, x3, y3); quad(x1, y1, x2, y2, x3, y3, x4, y4); curve(x1, y1, x2, y2, x3, y3, x4, y4); arc(x, y, width, height, start, stop);
4
Really Hard Drawing Functions
arc(x, y, width, height, start, stop); curve(x1, y1, x2, y2, x3, y3, x4, y4); Catmull-Rom splines bezier(x1, y1, x2, y2, x3, y3, x4, y4); Bezier curves Popular in many drawing programs As connected Bezier segments But few create them “by the numbers”
5
Arc stuff size(400, 200) ; background(0) ; stroke(0,0,255) ; fill(255,255,0) ; int x = 50 ; int y = 50 ; arc(x, y, 100, 100, 0, PI/3) ; x = x ; arc(x, y, 100, 100, PI/3, 2*PI/3) ; arc(x, y, 100, 100, 2*PI/3, PI) ; arc(x, y, 100, 100, 2/3*PI, PI) ;
6
Bezier and curve stuff int offset = 50 ; size(300,300) ; background(0) ; fill(0,255,0) ; ellipse( 50, 50,10,10) ; ellipse(250, 50,10,10) ; fill(0,127,0) ; ellipse( 50+offset, 250, 10, 10) ; ellipse(250-offset, 250, 10, 10) ; noFill() ; strokeWeight(5) ; stroke(255,0,0) ; bezier( 50, 50, 50+offset, 250, 250-offset, 250, 250, 50) ; stroke(0,0,255) ; curve( 50, 50, 50+offset, 250, 250-offset, 250, 250, 50) ;
7
Drawing Modes rectMode(α) CENTER CORNER CORNERS ellipseMode(α) RADIUS
8
Using modes size(400,400) ; fill(255,0,0,50) ; rectMode(CENTER) ; rect(200,200,100,100) ; fill(0,255,0,50) ; rectMode(CORNER) ; fill(0,0,255,50) ; rectMode(CORNERS) ;
9
My first somewhat buggy Java applet
Color Models colorMode(RGB, 255); // processing’s default color model // used almost exclusively in // computer science applications colorMode(HSB, 360, 100, 100); // hue, saturation, value(brightness) // used predominately in art, available // in most graphics and animation packages My first somewhat buggy Java applet
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.