Using Perlin noise to generate a vector field that will be used to draw trails in a plane
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

perlin noise java original algorithm:

How it works

  1. Define a grid of vectors

Divide the plane in a grid of n x m squares and create a 2D vector (x,y) in each square. The angle of this vector will be given by a 3D Perlin noise algorithm, where the 3 dimensions are respectively: x coordinate, y coordinate and time. We will use these vectors to guide our particle's direction and velocity in the plane.

  1. Create and place particles in the plane

A set of particles are created and dropped on to the plane at a random point. Each particle object is described by three 2D vector attributes: position, velocity and acceleration. To move the particle, simply add the velocity vector to the position vector.

  1. Apply the forces on the gird to the particles

For every frame of the animation, each vector of the grid is applied as a force to the particles on that particular grid square. This will cause the particles to move in the direction of the vector flow field.

perlin noise java

perlin noise java