Skip to main content
Public

Share visualization

Loading preview…

p5-starter

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

p5-starter

0
AAlark Joshi
Last edited Jan 26, 2024
Created on Jan 26, 2024

This example demonstrates a simple animated pattern of five pink rectangles, each with a random width, stacked vertically on a gray background. The sketch runs at five frames per second, causing the rectangle widths to change with every frame. It uses the p5.js library, specifically the `createCanvas`, `background`, `fill`, `rect`, and `random` functions within the `setup` and `draw` loop. The code does not load any external data; it generates all visual variation procedurally.

AI-generated description

Amazing first demo for P5. P5 is the best!!!

Full course playlist: YouTube: Constructing Visualization 2024.

Comments

Sign in to join the discussion.

MIT Licensed