Drag the background!
P5 porting demo

Userid: p5misc
Type: Normal account.
Joined: 10 Jul 2021
Country: Unknown

Uploads
owned by this user
Drop
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Drag an image file onto the canvas to see it displayed.
Alpha Mask
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
ask * @description Loads a "mask" for an image to specify the transparency in * different part...
Brightness
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
This program adjusts the brightness of a part * of the image by calculating the distance of eac...
Saturation
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Saturation is the strength or purity of the color and * represents the amount of gray in propor...
Hue
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Hue is the color reflected from or transmitted through an * object and is typically referred to...
paint erase picture
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
An example of how to simulate coloring image with the copy() method.
Convolution
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Applies a convolution matrix to a portion of an image. Move mouse to apply filter to different p...
Blur
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
A low-pass filter that blurs an image. This program analyzes every pixel in an image and blends ...
Pointillism
1 run ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
By Dan Shiffman. Mouse horizontal location controls size of * dots. Creates a simple pointillis...
Create Image
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
The createImage() function provides a fresh buffer of pixels to * play with. This example creat...
Transparency
1 run ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Move the pointer left and right across the image to change its * position. This program overlay...
Relativity
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Each color is perceived in relation to other colors. The top * and bottom bars each contain the...
Background Image
3 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
This example presents the fastest way to load a * background image. To load an image as the bac...
Load and Display...
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Images can be loaded and displayed to the screen at their * actual size or any other size.
Logical Operators
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
The logical operators for AND (&&) and OR (||) are used to * combine simple relational statemen...
Conditionals 2
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
We extend the language of conditionals from the previous * example by adding the keyword "else"...
Conditionals 1
1 run ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Conditions are like questions. * They allow a program to decide to take one action if * the an...
Embedded Iteration
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Embedding "for" structures allows repetition in two dimensions.
Iteration
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Iteration with a "for" structure to construct repetitive forms.
Array Objects
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Demonstrates the syntax for creating an array of custom objects.
Color Variables
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
This example creates variables for colors * that may be referred to in the program by a name, r...
Linear Gradient
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
The lerpColor() function is useful for interpolating between two colors.
Array
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
An array is a list of data. Each piece of data in an array * is identified by an index number r...
Arctangent
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Move the mouse to change the direction of the eyes.<br>The atan2() function computes the angle f...
Random Chords
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Accumulates random chords of a circle. Each chord in translucent * so they accumulate to give t...
Noise3D
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Using 3D noise to create simple animated texture.
Noise2D
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Create a 2D noise with different parameters.
Noise Wave
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Using Perlin Noise to generate a wave-like pattern. * Original by Daniel Shiffman.
Noise1D
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Using 1D Perlin Noise to assign location.
Random
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Random numbers create the basis of this image. * Each time the program is loaded the result is ...
Double Random
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Using two random() calls and the point() * function to create an irregular sawtooth line. * Or...
Linear Interpolation
1 run ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Move the mouse across the screen and the symbol will follow. * Between drawing each frame of th...
PolarToCartesian
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Convert a polar coordinate (r,theta) * to cartesian (x,y): x = rcos(theta) y = rsin(theta) * O...
Radial Gradient
1 run ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Draws a series of concentric circles to create a gradient * from one color to another.
Additive Wave
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Create a more complex wave by adding two waves together. * Original by Daniel Shiffman
Sine Wave
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Render a simple sine wave. * Original by Daniel Shiffman.
Sine Cosine
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Linear movement with sin() and cos(). * Numbers between 0 and PI*2 (TWO_PI which angles roughly...
Sine
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Smoothly scaling size with the sin() function.
Distance 2D
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Move the mouse across the image to obscure * and reveal the matrix. Measures the distance from ...
Distance 1D
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Move the mouse left and right to control * the speed and direction of the moving shapes.
Operator Precedence
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
If you don't explicitly state the order in which an * expression is evaluated, they are evaluat...
Increment Decrement
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Writing "a++" is equivalent to "a = a + 1". * Writing "a--" is equivalent to "a = a - 1".
Lerp Color
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Loop random shapes, * lerp color from red to blue.
Array 2D
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Demonstrates the syntax for creating a two-dimensional (2D) * array. Values in a 2D array are a...
Numbers
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Numbers can be written with or without decimals. An integer * (more commonly called an int) is ...
Parametric Equations
1 run ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
A parametric equation is where x and y * coordinates are both written in terms of another lett...
Video Canvas
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Load a video with multiple formats and draw it to the canvas.
Sound Effect
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Play a sound effect when the mouse is clicked inside the circle.
Delay
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Click the mouse to hear the p5.Delay process a SoundFile. * MouseX controls the p5.Delay Filte...
Sound Filter LowPass
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Apply a p5.LowPass filter to a p5.SoundFile. * Visualize the sound with FFT. * Map mouseX to...
Sound Measuring ...
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Analyze the amplitude of sound with * p5.Amplitude. is the magnitude of vibration. Sound is vib...
Pan Sound
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Click mouse to play the sound. Ball position follows mouse and correlates to panning of sound.
soundFormats
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Technically, due to patent issues, there is no single * sound format that is supported by all ...
Materials
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
There are five types of materials supported. * They respond to light differently. * Move your ...
Convolution Reverb
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
The p5.Convolver can recreate the sound of actual * spaces using convolution. Convolution takes...
Video Canvas
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Load a video with multiple formats and draw it to the canvas
Preload SoundFile
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Call loadSound() during preload() to ensure that the * sound is completely loaded before setup(...
Textures
1 run ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Images and videos are supported for texture.
video Pixels
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Load a video, manipulate its pixels and draw to canvas.
Slider
3 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Move the sliders to control the R, G, B values of the background.
Kaleidoscope
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
A kaleidoscope is an optical instrument with two or more reflecting surfaces tilted to each othe...
Modifying the DOM
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Create DOM elements and modify their properties every time * draw() is called
Input and Button
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Input text and click the button to see it affect the the canvas
piano simulator
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Play a song. * You will need to include the * <a href="http://p5js.org/reference/#/libraries/p...
create an elemen...
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
create an element, pass in a pointer
weather
1 run ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
This example grabs JSON weather data from www.metaweather.com
Load and Play Sound
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Load sound during preload(). Play a sound when canvas is clicked.
Play Mode
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
In 'sustain' mode, the sound will overlap with itself. * In 'restart' mode it will stop and the...
Variable Scope
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Variables have a global or function "scope". For example, * variables declared within either th...
Shape Primitives
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
The basic shape primitive functions are triangle(), * rect(), quad(), ellipse(), and arc(). Squ...
True and False
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
A Boolean variable has only two possible values: true or false. * It is common to use Booleans ...
Variables
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Variables are used for storing values. In this example, change * the values of variables to aff...
3D Primitives
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Placing mathematically 3D objects in synthetic space. * The box() and sphere() functions take a...
Bezier
1 run ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
The first two parameters for the bezier() function specify the * first point in the curve and t...
Triangle Strip
1 run ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Generate a closed ring using the * vertex() function and beginShape(TRIANGLE_STRIP) mode. The o...
Star
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
The star() function created for this example is capable of * drawing a wide range of different ...
Regular Polygon
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
What is your favorite? Pentagon? Hexagon? Heptagon? No? * What about the icosagon? The polygon(...
Pie Chart
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Uses the arc() function to generate a pie chart from the data * stored in an array.
Points and Lines
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Points and lines can be used to draw basic geometry. * Change the value of the variable 'd' to ...
SmokeParticles
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
description a port of Dan Shiffman's SmokeParticleSystem example originally * for Processing. C...
Create Graphics
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Creates and returns a new p5.Renderer object. Use this * class if you need to draw into an off-...
Recursion
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
A demonstration of recursion, which means functions call themselves. * Notice how the drawCircl...
Functions
1 run ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
The drawTarget() function makes it easy to draw many distinct *targets. Each call to drawTarget...
Redraw
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
The redraw() function makes draw() execute once. In this example, * draw() is executed once eve...
Loop
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
The code inside the draw() function runs continuously from top * to bottom until the program is...
No Loop
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
The noLoop() function causes draw() to only execute once. * Without calling noLoop(), the code ...
Setup and Draw
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
The code inside the draw() function runs continuously from top * to bottom until the program is...
Width and Height
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
The 'width' and 'height' variables contain the * width and height of the display window as def...
Coordinates
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
All shapes drawn to the screen have a position that is * specified as a coordinate. All coordin...
Map
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Use the map() function to take any number and scale it to a * new number that is more useful fo...
Forces
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Demonstration of multiple force acting on bodies
Continous Lines
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Click and drag the mouse to draw a line.
Orbit Control
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Orbit control allows you to drag and move around the world.
Mouse Functions
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Click on the box and drag it across the screen.
Mouse Press
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Move the mouse to position the shape. * Press the mouse button to invert the color.
Mouse 2D
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Moving the mouse changes the position and * size of each box.
Mouse 1D
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Move the mouse left and right to * shift the balance. The "mouseX" variable is used * to cont...
Keyboard
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Click on the image to give it focus and * press the letter keys to create forms in time and spa...
Easing
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Move the mouse across the screen and the symbol * will follow. Between drawing each frame of th...
Constrain
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Move the mouse across the screen to move * the circle. The program constrains the circle to its...
Clock
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
The current time can be read with the second(), * minute(), and hour() functions. In this examp...
Ray Casting
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Original example by Jonathan Watson. Detecting the position of the mouse in 3D space with ray ca...
Storing Input
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Move the mouse across the screen to * change the position of the circles. The positions * of t...
Multiple Lights
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
All types of lights could be used in one sketch.
Sine Cosine in 3D
2 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Sine, cosine and push / pop could be applied in 3D as well
Geometries
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
There are six 3D primitives in p5 now.
moving Arm
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
This example uses transform matrices to create * an arm. The angle of each segment is controlle...
rotate
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Rotating a square around the Z axis. * To get the results you expect, send the rotate function ...
Scale
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Paramenters for the scale() function are values * specified as decimal percentages. For example...
Translate
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
The translate() function allows objects to be * moved to any location within the window. The fi...
Pulses
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Software drawing instruments can follow a rhythm or abide by * rules independent of drawn gestu...
Mouse Signals
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Move and click the mouse to generate signals. * The top row is the signal from "mouseX", the mi...
black to white
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Roll over the colored squares in the center of the image to change the color of the outside rect...
Particle System
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
This is a basic Particle System
Simple Draw
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Touch to draw on the screen using mouseX, mouseY, pmouseX, and pmouseY values.
flocking
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Demonstration of <a href="http://www.red3d.com/cwr/">Craig Reynolds' "Flocking" behavior</a>.<b...
animate
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
The circle moves.
colour change circle
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
The circle changes color when you click on it.
Interactivity 1
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
The circle changes color when you click on it.
shapes
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
This examples includes a circle, square, triangle, and a flower
tilted 3d box
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Use mobile to tilt a box
mobile Shake Ball
1 run ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Create a Ball class, instantiate multiple objects, move it around the screen, and bounce when to...
Acceleration Color
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Use deviceMoved() to detect when the device is rotated. The background RGB color values are mapp...
Amplitude Modulation
1 run ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Amplitude Modulation involves two oscillators, referred * to as the carrier and the modulator, ...
Sound Noise Drum...
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
White Noise is a random audio signal with equal energy * at every part of the frequency spectrum
Frequency Modulation
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Frequency Modulation is a powerful form of synthesis. * In its simplest form, FM involves two o...
Record Save Audio
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Record a sound, play it back and save * it as a .wav file to the client's computer. * We need ...
soud Filter BandPass
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Apply a p5.BandPass filter to white noise. * Visualize the sound with FFT. * Map mouseX to t...
Sound Mic Threshold
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Trigger an event (draw a rectangle) when the Audio Input * volume surpasses a threshold
Sound Frequency ...
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Visualize the frequency spectrum of live audio input.
Sound Mic Input
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Get audio input from your computer's microphone. * Make noise to float the ellipse. Note: p5.Au...
Sound Oscillator...
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Control an Oscillator and view the waveform using FFT. * MouseX is mapped to frequency, mouseY ...
Sound Note Envelope
1 run ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
An Envelope is a series of fades, defined * as time / value pairs. In this example, the envelo...
Patterns
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Move the cursor over the image to draw with a software tool * which responds to the speed of th...
Video Capture
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Capture video from the webcam and display * on the canvas as well with invert filter. Note that...
Acceleration Bal...
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Move an ellipse around based on accelerationX and accelerationY values, and bounces when touch t...
Brownian Motion
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Recording random movement as a continuous line. * Port of original example from the Processing ...
Stepping Feet Il...
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Stepping feet illusion is a very famous psychological experiment * Both the bricks will appear ...
Bubble Sort
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Sorts the randomly distributed bars * according to their height in ascending order * while si...
Koch Curve
1 run ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Renders a simple fractal, the Koch snowflake. Each recursive level is drawn in sequence
The Mandelbrot Set
1 run ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Simple rendering of the Mandelbrot set.
Recursive Tree
1 run ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Renders a simple tree-like structure via recursion. * The branching angle is calculated as a fu...
Penrose Tiles
1 run ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
This is a port by David Blitz of the "Penrose Tile" example from processing.org/examples
Snowflakes
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Particle system simulating the motion of falling snowflakes. * Uses an array of objects to hold...
Chain
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
One mass is attached to the mouse position and the other is attached the position of the other m...
Soft Body
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Softbody dynamics simulation using curveVertex() and curveTightness().
Follow 1
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
A line segment is pushed and pulled by the cursor. * Based on code from Keith Peters.
Springs
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Move the mouse over one of the circles and click to re-position. * When you release the mouse, ...
Spring
1 run ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Click, drag, and release the horizontal bar to start the spring.
L-Systems
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
This sketch creates an automated drawing based on a Lindenmayer * or (L-) system. L-systems are...
Spirograph
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
This sketch uses simple transformations to create a * Spirograph-like effect with interlocking ...
Multiple Particl...
1 run ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Click the mouse to generate a burst of particles at mouse location. Each burst is one instance o...
Game of Life
1 run ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
A basic implementation of John Conway's Game of Life CA
Wolfram CA
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Simple demonstration of a Wolfram 1-dimensional cellular automata
Flocking
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Demonstration of Craig Reynolds' "Flocking" behavior. * See: http://www.red3d.com/cwr/ * Rules...
Particles
5 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
There is a light-weight JavaScript library named * particle.js which creates a very pleasing pa...
Follow 2
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
A two-segmented arm follows the cursor position. The relative * angle between the segments is c...
Instantiation
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Create a p5 instance, which keeps all variables * out of the global scope of your page.
Composite Objects
1 run ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
An object can include several other objects. * Creating such composite objects is a good way to...
Moving On Curves
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
In this example, the circles moves along the curve y = x^4. * Click the mouse to have it move t...
Morph
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Changing one shape into another by interpolating vertices from one to another.
Bouncy Bubbles
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
based on code from Keith Peters. Multiple-object collision..
Bounce
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
When the shape hits the edge of the window, it reverses its direction.
Motion Linear
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Changing a variable to create a moving line. * When the line moves off the edge of the window, ...
Non Orthogonal R...
1 run ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
This is a port by David Blitz of the "Reflection 1" example from processing.org/examples
Mixture
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Display a box with three different kinds of lights.
Directional
1 run ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Move the mouse to change the direction of the light. * Directional light comes from one directi...
Inheritance
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
A class can be defined using another class as a * foundation. In object-oriented programming te...
Follow 3
4 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
A segmented line follows the mouse. The relative angle from * each segment to the next is calcu...
Objects 2
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Ported from example by hbarragan. Move the cursor across the * image to change the speed and po...
Array of Objects
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Create a Jitter class, instantiate an array of objects * and move them around the screen.
Multiple Objects
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Create a Jitter class, instantiate multiple objects, * and move it around the screen.
Objects
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Create a Jitter class, instantiate an object, * and move it around the screen. Adapted from Get...
Reach 3
1 run ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
The arm follows the position of the ball by calculating the * angles with atan2(). Based on cod...
Reach 2
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
The arm follows the position of the mouse by calculating the * angles with atan2(). Based on co...
Reach 1
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
The arm follows the position of the mouse by calculating the * angles with atan2(). Based on co...
Wavemaker
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
his illustrates how waves (like water waves) emerge * from particles oscillating in place. Move...
Snake game
1 run ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
The famous snake game! Once you click run, click anywhere * inside the black area, and control ...
p5 drawing
0 runs ♦ 0 likes
Created: 2 Sep 2021
Modified: 17 Sep 2023
Generative painting program.
Particles P5
8 runs ♦ 0 likes
Created: 10 Jul 2021
Modified: 17 Sep 2023
Particles using P5 plain API
Particles P5 (AB)
5 runs ♦ 0 likes
Created: 10 Jul 2021
Modified: 17 Sep 2023
Particles using P5 (AB) API
The background is a program, showing the JavaScript graphics used on this site.
The globes light up when you log in.
 
Font:

Users retain ownership of user content.

Platforms      Stats      The name      Terms and conditions

Call for partners      Contact

Call for partners!
Ancient Brain is looking for a partner to co-write a JavaScript coding book for schools, to be used worldwide. This would be a course for students in learning to code from scratch. The book and course will be integrated into the Ancient Brain site. This is an opportunity for someone looking to develop a course and textbook to partner with a site to promote it. Read more.