Muutke küpsiste eelistusi

E-raamat: Getting Started with p5.js: Making Interactive Graphics in JavaScript and Processing

  • Formaat: 246 pages
  • Ilmumisaeg: 12-Oct-2015
  • Kirjastus: O'Reilly Media
  • Keel: eng
  • ISBN-13: 9781457186752
  • Formaat - PDF+DRM
  • Hind: 8,18 €*
  • * hind on lõplik, st. muud allahindlused enam ei rakendu
  • Lisa ostukorvi
  • Lisa soovinimekirja
  • See e-raamat on mõeldud ainult isiklikuks kasutamiseks. E-raamatuid ei saa tagastada.
  • Formaat: 246 pages
  • Ilmumisaeg: 12-Oct-2015
  • Kirjastus: O'Reilly Media
  • Keel: eng
  • ISBN-13: 9781457186752

DRM piirangud

  • Kopeerimine (copy/paste):

    ei ole lubatud

  • Printimine:

    ei ole lubatud

  • Kasutamine:

    Digitaalõiguste kaitse (DRM)
    Kirjastus on väljastanud selle e-raamatu krüpteeritud kujul, mis tähendab, et selle lugemiseks peate installeerima spetsiaalse tarkvara. Samuti peate looma endale  Adobe ID Rohkem infot siin. E-raamatut saab lugeda 1 kasutaja ning alla laadida kuni 6'de seadmesse (kõik autoriseeritud sama Adobe ID-ga).

    Vajalik tarkvara
    Mobiilsetes seadmetes (telefon või tahvelarvuti) lugemiseks peate installeerima selle tasuta rakenduse: PocketBook Reader (iOS / Android)

    PC või Mac seadmes lugemiseks peate installima Adobe Digital Editionsi (Seeon tasuta rakendus spetsiaalselt e-raamatute lugemiseks. Seda ei tohi segamini ajada Adober Reader'iga, mis tõenäoliselt on juba teie arvutisse installeeritud )

    Seda e-raamatut ei saa lugeda Amazon Kindle's. 

Processing opened up the world of programming to artists, designers, educators, and beginners. The p5.js JavaScript implementation of Processing reinterprets it for today's web. This short book gently introduces the core concepts of computer programming and working with Processing. Written by the co-founders of the Processing project, Reas and Fry, along with Lauren McCarthy, one of the minds behind p5.js, Getting Started with Processing gets you in on the fun!

Preface xi
1 Hello
1(8)
Sketching and Prototyping
2(1)
Flexibility
3(1)
Giants
3(2)
Family Tree
5(1)
Join In
5(4)
2 Starting to Code
9(8)
Environment
9(1)
Download and File Setup
9(1)
Your First Program
10(3)
Example 2-1 Draw an Ellipse
11(1)
Example 2-2 Make Circles
12(1)
The Console
13(1)
Making a New Project
14(1)
Examples and Reference
15(2)
3 Draw
17(24)
The Canvas
18(1)
Example 3-1 Create a Canvas
18(1)
Example 3-2 Draw a Point
19(1)
Basic Shapes
19(6)
Example 3-3 Draw a Line
21(1)
Example 3-4 Draw Basic Shapes
21(1)
Example 3-5 Draw a Rectangle
22(1)
Example 3-6 Draw an Ellipse
22(1)
Example 3-7 Draw Part of an Ellipse
23(1)
Example 3-8 Draw with Degrees
24(1)
Example 3-9 Use angleMode
25(1)
Drawing Order
25(2)
Example 3-10 Control Your Drawing Order
26(1)
Example 3-11 Put It in Reverse
27(1)
Shape Properties
27(2)
Example 3-12 Set Stroke Weight
28(1)
Example 3-13 Set Stroke Attributes
28(1)
Color
29(4)
Example 3-14 Paint with Grays
31(1)
Example 3-15 Control Fill and Stroke
31(1)
Example 3-16 Draw with Color
32(1)
Example 3-17 Set Transparency
33(1)
Custom Shapes
33(3)
Example 3-18 Draw an Arrow
34(1)
Example 3-19 Close the Gap
34(1)
Example 3-20 Create Some Creatures
35(1)
Comments
36(2)
Robot 1 Draw
38(3)
4 Variables
41(18)
First Variables
41(2)
Example 4-1 Reuse the Same Values
41(1)
Example 4-2 Change Values
42(1)
Making Variables
43(1)
p5.js Variables
43(1)
Example 4-3 Adjust the Canvas, See What Follows
44(1)
A Little Math
44(2)
Example 4-4 Basic Arithmetic
45(1)
Repetition
46(8)
Example 4-5 Do the Same Thing Over and Over
47(1)
Example 4-6 Use a for Loop
47(2)
Example 4-7 Flex Your for Loop's Muscles
49(1)
Example 4-8 Fanning Out the Lines
50(1)
Example 4-9 Kinking the Lines
50(1)
Example 4-10 Embed One for Loop in Another
51(1)
Example 4-11 Rows and Columns
51(1)
Example 4-12 Pins and Lines
52(1)
Example 4-13 Halftone Dots
53(1)
Robot 2 Variables
54(5)
5 Response
59(30)
Once and Forever
59(2)
Example 5-1 The draw() Function
59(1)
Example 5-2 The setup() Function
60(1)
Example 5-3 setup(), Meet draw()
61(1)
Follow
61(7)
Example 5-4 Track the Mouse
62(1)
Example 5-5 The Dot Follows You
62(1)
Example 5-6 Draw Continuously
63(1)
Example 5-7 Set Thickness on the Fly
64(1)
Example 5-8 Easing Does It
65(2)
Example 5-9 Smooth Lines with Easing
67(1)
Click
68(4)
Example 5-10 Click the Mouse
68(2)
Example 5-11 Detect When Not Clicked
70(1)
Example 5-12 Multiple Mouse Buttons
71(1)
Location
72(6)
Example 5-13 Find the Cursor
73(1)
Example 5-14 The Bounds of a Circle
74(1)
Example 5-15 The Bounds of a Rectangle
75(3)
Type
78(3)
Example 5-16 Tap a Key
78(1)
Example 5-17 Draw Some Letters
79(1)
Example 5-18 Check for Specific Keys
79(1)
Example 5-19 Move with Arrow Keys
80(1)
Touch
81(1)
Example 5-20 Touch the Screen
81(1)
Example 5-21 Track the Finger
82(1)
Map
82(2)
Example 5-22 Map Values to a Range
82(1)
Example 5-23 Map with the map() Function
83(1)
Robot 3 Response
84(5)
6 Translate, Rotate, Scale
89(14)
Translate
89(2)
Example 6-1 Translating Location
90(1)
Example 6-2 Multiple Translations
91(1)
Rotate
91(5)
Example 6-3 Corner Rotation
92(1)
Example 6-4 Center Rotation
93(1)
Example 6-5 Translation, Then Rotation
93(1)
Example 6-6 Rotation, Then Translation
94(1)
Example 6-7 An Articulating Arm
95(1)
Scale
96(2)
Example 6-8 Scaling
97(1)
Example 6-9 Keeping Strokes Consistent
97(1)
Push and Pop
98(1)
Example 6-10 Isolating Transformations
98(1)
Robot 4 Translate, Rotate, Scale
99(4)
7 Media
103(18)
Images
104(6)
Example 7-1 Load an Image
104(1)
Example 7-2 Load More Images
105(1)
Example 7-3 Mousing Around with Images
106(2)
Example 7-4 Transparency with a GIF
108(1)
Example 7-5 Transparency with a PNG
108(1)
Example 7-6 Displaying an SVG Image
109(1)
Asynchronicity
110(2)
Example 7-7 Demonstrating Asynchronicity
110(1)
Example 7-8 Loading with a Callback
111(1)
Fonts
112(5)
Example 7-9 Drawing with Fonts
112(1)
Example 7-10 Use a Webfont
113(1)
Example 7-11 Load a Custom Font
114(1)
Example 7-12 Set the Text Stroke and Fill
115(1)
Example 7-13 Draw Text in a Box
116(1)
Example 7-13 Store Text in a Variable
116(1)
Robot 5 Media
117(4)
8 Motion
121(18)
Frames
121(1)
Example 8-1 See the Frame Rate
121(1)
Example 8-2 Set the Frame Rate
122(1)
Speed and Direction
122(4)
Example 8-3 Move a Shape
123(1)
Example 8-4 Wrap Around
124(1)
Example 8-5 Bounce Off the Wall
125(1)
Tweening
126(1)
Example 8-6 Calculate Tween Positions
126(1)
Random
127(3)
Example 8-7 Generate Random Values
128(1)
Example 8-8 Draw Randomly
128(1)
Example 8-9 Move Shapes Randomly
129(1)
Timers
130(1)
Example 8-10 Time Passes
130(1)
Example 8-11 Triggering Timed Events
130(1)
Circular
131(5)
Example 8-12 Sine Wave Values
133(1)
Example 8-13 Sine Wave Movement
133(1)
Example 8-14 Circular Motion
134(1)
Example 8-15 Spirals
135(1)
Robot 6 Motion
136(3)
9 Functions
139(14)
Function Basics
140(2)
Example 9-1 Roll the Dice
140(1)
Example 9-2 Another Way to Roll
141(1)
Make a Function
142(6)
Example 9-3 Draw the Owl
142(1)
Example 9-4 Two's Company
143(1)
Example 9-5 An Owl Function
144(2)
Example 9-6 Increasing the Surplus Population
146(1)
Example 9-7 Owls of Different Sizes
147(1)
Return Values
148(1)
Example 9-8 Return a Value
148(1)
Robot 7 Functions
149(4)
10 Objects
153(12)
Properties and Methods
153(1)
Define a Constructor
154(5)
Create Objects
159(3)
Example 10-1 Make an Object
159(1)
Example 10-2 Make Multiple Objects
160(2)
Robot 8 Objects
162(3)
11 Arrays
165(16)
From Variables to Arrays
165(3)
Example 11-1 Many Variables
165(1)
Example 11-2 Too Many Variables
166(1)
Example 11-3 Arrays, Not Variables
167(1)
Make an Array
168(3)
Example 11-4 Declare and Assign an Array
169(1)
Example 11-5 Assigning to an Array in One Go
170(1)
Example 11-6 Revisiting the First Example
170(1)
Repetition and Arrays
171(3)
Example 11-7 Filling an Array in a for Loop
171(1)
Example 11-8 Track Mouse Movements
172(2)
Arrays of Objects
174(3)
Example 11-9 Managing Many Objects
175(1)
Example 11-10 Sequences of Images
176(1)
Robot 9 Arrays
177(4)
12 Data
181(20)
Data Summary
181(1)
Tables
182(5)
Example 12-1 Read the Table
183(1)
Example 12-2 Draw the Table
184(1)
Example 12-3 29,740 Cities
185(2)
JSON
187(4)
Example 12-4 Read a JSON File
189(1)
Example 12-5 Visualize Data from a JSON File
189(2)
Network Data and APIs
191(5)
Example 12-6 Parsing the Weather Data
194(1)
Example 12-7 Chaining Methods
195(1)
Robot 10 Data
196(5)
13 Extend
201(10)
p5.sound
202(4)
Example 13-1 Play a Sample
202(1)
Example 13-2 Listen to a Mic
203(2)
Example 13-3 Create a Sine Wave
205(1)
p5.dom
206(5)
Example 13-4 Access the Webcam
207(1)
Example 13-5 Create a Slider
208(1)
Example 13-6 Create an Input Box
208(3)
A Coding Tips 211(4)
B Order of Operations 215(2)
C Variable Scope 217(4)
Index 221
Lauren McCarthy is an artist and programmer based in Brooklyn, NY. She is full-time faculty at NYU ITP, and recently a resident at CMU STUDIO for Creative Inquiry and Eyebeam. She holds an MFA from UCLA and a BS Computer Science and BS Art and Design from MIT. Her work explores the structures and systems of social interactions, identity, and self-representation, and the potential for technology to mediate, manipulate, and evolve these interactions. She is fascinated by the slightly uncomfortable moments when patterns are shifted, expectations are broken, and participants become aware of the system. Casey Reas is a professor in the Department of Design Media Arts at UCLA and a graduate of the MIT Media Laboratory. Reas' software has been featured in numerous solo and group exhibitions at museums and galleries in the United States, Europe, and Asia. With Ben Fry, he co-founded Processing in 2001. He is the co-author of Processing: A Programming Handbook for Visual Designers and Artists (2007) and Form+Code in Design, Art, and Architecture (2010). His work is archived at www.reas.com. Ben Fry is an award-winning media artist, and has a doctorate from the MIT Media Laboratory. He worked with Casey Reas to develop Processing, which won a Golden Nica from the Prix Ars Electronica in 2005.