Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html>
<head>
<title>Shiny Triangles</title>
<style type="text/css">
html, body {
width: 100%;
height: 100%;
margin: 0px;
ArrayList poop;
int distance =50;
boolean flag=true;
void setup()
{
size(500, 500);
smooth();
poop = new ArrayList();
for (int i=0;i<120;i++) {
PVector PD = new PVector(random(-150, 150), random(-150, 150));
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<style>
* {
margin: 0; padding: 0;
}
html, body {
height: 100%;
float dx = 32;
float dy = 28;
void drawSite(float x, float y) {
float weight = dx * 128 / (32 + dist(x, y, mouseX, mouseY));
if (weight > 1) {
strokeWeight(weight);
point(x, y);
}
}
@Cherrylights
Cherrylights / Bouncing Balls - Processing
Last active August 29, 2015 14:23
Bouncing Balls - Processing
Ball [] balls = new Ball [20];
Ball2 [] balls2 = new Ball2 [1];
PFont font;
PShape gbda;
void setup() {
size(970, 550);
smooth();
// noCursor();
font = loadFont("Helvetica-Bold-48.vlw");
@Cherrylights
Cherrylights / Bouncing Balls - Javascript
Last active August 29, 2015 14:23
Bouncing Balls - Javascript
<!DOCTYPE html>
<html>
<head>
<title>Circles</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<style>
* {
margin: 0; padding: 0;
}
html, body {
import processing.video.*;
import codeanticode.syphon.*;
import processing.serial.*;
Serial myPort;
PGraphics canvas;
SyphonServer server;
int videoWidth = 1280;
int videoHeight = 720;