p5.js Coding Tutorial | Distorted Reflections (scale function) @pattvira
p5.js Coding Tutorial | Distorted Reflections (scale function)  @pattvira
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)
p5.js Coding Tutorial | Distorted Reflections (scale function)p5.js Coding Tutorial | Oscillating Hexagons (Inspired by Bees and Bombs)p5.js Coding Tutorial | Sleep Tracker (Data Visualization)Arduino 101 | Physical Computing for Beginnersp5.js Coding Tutorial | Array of Bouncing Balls (OOP / mousePressed)Creative Coding Math: Collision DetectionIm building an app for my reading habitp5.js Coding Tutorial | Holiday Greetings Cardp5.js Coding Tutorial | Drawing with Webcam (createCapture function)p5.js Coding Tutorial | Mouse - Grid InteractionTurning Textures into Art (showing my process... πŸ‘€)p5.js Coding Tutorial | Binary Piano 🎡
Patt Vira |

p5.js Coding Tutorial | Distorted Reflections (scale function)

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER