Uploaded July 2025 | Updated November 2026, 54 minutes ago
LET'S CONNECT
β¨ Sign up for my newsletter at pattvira.com
β¨ Instagram: instagram.com/pattvira
β¨ Twitter: twitter.com/pattvira
--
Links:
π p5.js editor: editor.p5js.org
π Distorted Reflections Code:
- With imageMode(CORNER) - the default one/same as in video: editor.p5js.org/pattvira/sketches/v3sTra1Y6
- With imageMode(CENTER): editor.p5js.org/pattvira/sketches/EvBa8nBLsT
π Introduction to Creative Coding Playlist: youtube.com/playlist?list=PL0beHPVMklwgMz4Z-mNp4_udo9mjBk7pn&si=XhvQaojd6cIrxvdn
References:
π @TraceLoops: instagram.com/p/CstkkmvoCc3
π p5.js scale function: p5js.org/reference/p5/scale
π p5.js get function: p5js.org/reference/p5.Image/get
Timestamps:
0:00 Intro
0:32 Explain how scale() works
7:19 Upload and resize image
9:51 Slice image into regions and store inside a 2d array
13:27 Use scale() to create the distorted effect
17:30 Create an option to toggle between modes
19:13 Surprised mode! (Make it interactive)
LET'S CONNECT
β¨ Sign up for my newsletter at pattvira.com
β¨ Instagram: instagram.com/pattvira
β¨ Twitter: twitter.com/pattvira
--
Links:
π p5.js editor: editor.p5js.org
π Distorted Reflections Code:
- With imageMode(CORNER) - the default one/same as in video: editor.p5js.org/pattvira/sketches/v3sTra1Y6
- With imageMode(CENTER): editor.p5js.org/pattvira/sketches/EvBa8nBLsT
π Introduction to Creative Coding Playlist: youtube.com/playlist?list=PL0beHPVMklwgMz4Z-mNp4_udo9mjBk7pn&si=XhvQaojd6cIrxvdn
References:
π @TraceLoops: instagram.com/p/CstkkmvoCc3
π p5.js scale function: p5js.org/reference/p5/scale
π p5.js get function: p5js.org/reference/p5.Image/get
Timestamps:
0:00 Intro
0:32 Explain how scale() works
7:19 Upload and resize image
9:51 Slice image into regions and store inside a 2d array
13:27 Use scale() to create the distorted effect
17:30 Create an option to toggle between modes
19:13 Surprised mode! (Make it interactive)










