Still Moving Designs © 2010 - 2017 • Contact: ra@rariora.org


»

Heading




Controls: Mouse tracking, click to restart.

Description: For a number of the problems that interest me, I needed to have a better understanding of how headings and vectors are calculated. This sketch helped me figure out how a virtual vehicle could "see" where it's going.

A "bouncer" vehicle is initialized with a random heading and velocity, and proceeds to simply bounce off the walls. The second vehicle is mouse-driven.

The indicator lines show the heading and its length denotes a relative value for velocity.

Code: Click here.