Skip to content

Instantly share code, notes, and snippets.

@lisawilliams lisawilliams/gist:5000732
Last active Dec 14, 2015

What would you like to do?
This is the (Processing) code for my #WhenIOwnTheGlobe offering. It involves a giant laser pointer and LOLCats.
// I couldn't quite get processing.js to run for this one, which is why it's an animated gif
//<script type="text/javascript" src="processing.min_.js">
//<script type="text/processing" data-processing-target="processing-canvas">
float step = 0.0f;
// The next line is needed if running in JavaScript Mode with Processing.js
// @pjs preload="bosglobe.jpg";
PImage bg;
int y;
void setup() {
size(460, 336);
bg = loadImage("bosglobe.jpg");
void draw() {
fill( 255, 0, 0 );
// reset step value so it starts from the begining
if ( step >= 1.0f ) {
step = 0.0f;
float x = bezierPoint(85, 10, 190, 320, step);
float y = bezierPoint(20, 300, 190, 180, step);
ellipse(x, y, 9, 9);
// Change this to adjust the speed
step += 0.01f;
//<canvas id="processing-canvas"> </canvas>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.