Kinematic motion

Back to Codes of Nature


Author: Zsófia Ruttkay Version: 1.0 Date: 25.2.2009

Motion is reminiscent of living creatures: animals wonder around, they escape from enemy or chase a prey, and even when they have nothing to do they often perform 'idle' motion - when do we see fully motionless people? Plants move too: growth is a very slow change of form, stems bow, flowers tremble, petals fly away ... Snow flakes dance, clouds develop and move ...

In this section we will set out to generate motion purely by controlling the speed and direction (path) of the motion. We will look at approaches to mimic organic motion, characterised by smoothness, irregularity and often with cycles. And consider behaviour of animals like chasing, searching or escaping. You will see that just by purely defining change of speed and motion path, we can produce illusion of organic motion.

Look at me, follow me - mouse-driven motion

../Sketches/CourseSketches/Mousedriven/Greenberg_11_10/Greenberg_11_10.jpg Mouse-driven circle

src: CourseSketches/Mousedriven/Greenberg_11_10/Greenberg_11_10.pde

mouseX, mouseY,
fading effect
../Sketches/CourseSketches/Mousedriven/rotLadybird/rotLadybird.jpg Rotate ladybirds towards mouse

src files: CourseSketches/Mousedriven/rotLadybird/

atan2(diry-y, dirx-x)
multiple files for a single sketch
../Sketches/CourseSketches/Mousedriven/rotscaleLadybird/rotscaleLadybird.jpg Rotate small ladybird towards mouse
src files: CourseSketches/Mousedriven/rotscaleLadybird/
Ladybird approaches mouse
src files: CourseSketches/Mousedriven/approachLadybird/

../Sketches/CourseSketches/Mousedriven/eyes/eyes.jpg Eyes looking at the mouse

src: CourseSketches/Mousedriven/eyes/eyes.pde

atan2(diry-y, dirx-x)
multiple files for a single sketch

Let it rain!

../Sketches/CourseSketches/Rains/Rain1/Rain1.jpg A single rain drop falling
src: CourseSketches/Rains/Rain0/Rain0.pde

From of drop changing on mouse click
src: CourseSketches/Rains/Rain1/Rain1.pde

switch()
wrap around screen
../Sketches/CourseSketches/Rains/Rain4/Rain4.jpg Non-vertical rain
src: CourseSketches/Rains/Rain2/Rain2.pde
A row of rain drops
src: CourseSketches/Rains/Rain3/Rain3.pde
A grid of rain drops
src: CourseSketches/Rains/Rain4/Rain4.pde
one and two dimensional array
../Sketches/CourseSketches/Rains/Rain5_2/Rain5_2.jpg Distribution randomized
src: CourseSketches/Rains/Rain5_1/Rain5_1.pde
Distribution and length of drops is randomized
src: CourseSketches/Rains/Rain5_2/Rain5_2.pde
Also initial speed is randomized
src: CourseSketches/Rains/Rain5_3/Rain5_3.pde
MouseX location controls how heavy it rains
src: CourseSketches/Rains/Rain6/Rain6.pde
random()
../Sketches/CourseSketches/Rains/rings_1/rings_1.jpg
Rings caused by a drop Concentric circles flow out and vanish, on mouse click.
src: CourseSketches/Rains/rings_1/rings_1.pde
setting transparency
frameCount(), %,
../Sketches/CourseSketches/Rains/rings2/rings2.jpg
Rings caused by a drop Concentric circles flow out and vanish, on mouse click.
src: CourseSketches/Rains/rings2/rings2.pde
setting transparency
frameCount(), %,

Changing speed, nonlinear path

../Sketches/CourseSketches/Speedchange/Mod31_06/Mod31_06.jpg Easing out when close to mouse
src: CourseSketches/Speedchange/Mod31_06/Mod31_06.pde

Easing out at resting stops towards mouse
src: CourseSketches/Speedchange/Mod31_06_2/Mod31_06_2.pde

dist()
distance proportional easing
../Sketches/CourseSketches/Speedchange/Mod32_01/Mod32_01.jpg Sinusoid motion
src: CourseSketches/Speedchange/Mod32_01/Mod32_01.pde

Sinusoid motion horizontally - a flower ?
src: CourseSketches/Speedchange/Mod32_01_2/Mod32_01_2.pde

sin(angle)*radius
../Sketches/CourseSketches/Speedchange/Mod32_07/Mod32_07.jpg Swaying motion of tails (grass)
Experiment with changing the increment for the angle.
src: CourseSketches/Speedchange/Mod32_07/Mod32_07.pde
sin(angle+phase)
../Sketches/CourseSketches/Speedchange/Mod32_04/Mod32_04.jpg Pulsing change of shape
Experiment with changing the increment for the angle.
src: CourseSketches/Speedchange/Mod32_04/Mod32_04.pde
sin(angle+phase)

Random motion

../Sketches/CourseSketches/Speedchange/Mod32_06/Mod32_06.jpg Random path and random orientation
src: CourseSketches/Speedchange/Mod32_06/Mod32_06.pde

../Sketches/CourseSketches/Speedchange/Mod32_08/Mod32_08.jpg Lines pulsing - with noise
src: CourseSketches/Speedchange/Mod32_08/Mod32_08.pde

../Sketches/CourseSketches/Randomwalks/Randomwalk1D/Randomwalk1D.jpg Random walk 1D
src: CourseSketches/Randomwalks/Randomwalk1D/Randomwalk1D.pde

../Sketches/CourseSketches/Randomwalks/Randomwalk2D/Randomwalk2D.jpg Random walk 2D
src: CourseSketches/Randomwalks/Randomwalk2D/Randomwalk2D.pde

../Sketches/CourseSketches/Randomwalks/walkLadybird/walkLadybird.jpg Ladybird random walk
src: CourseSketches/Randomwalks/walkLadybird/walkLadybird.pde

On-line learning resources

Design Programming course slides by Rob Saunders

Further links