Project 6

My clock is made up of a few planets that orbit each other. One representing the hours, another the minutes, and the last representing seconds.

sketchDownload

//dvargas David vargas
var starX=[] //x position of stars
var starY=[]//y position of stars
var starB=[]//brightness value of stars
var hourV = {x:0,y:0,diam:50,c:'orange'} //array w/values for orange (hours) circle
var minuteV = {x:0,y:0,diam:30,c:'lightgreen'}//array w/ values for green (minutes) circle
var secondV = {x:0,y:0,diam:10,c:'lightblue'} //array w/ values for blue (seconds) circle
var orbitV ={hX:300,hY:300,mX:0,mY:0,sX:0,sY:0,hD:180,mD:150,sD:75} //array w/ values for 'orbit rings'
var noiseOffset=0 //perlin noise offset



function setup() {
    createCanvas(600, 600);
    background(255);
    for (var i=0;i<80;i++){ //creates random stars
        starX[i]=random(0,width)
        starY[i]=random(0,height)
    }

}

function draw() {
  background(0);
  var theTime=currentTime() //the time represented by a value between 0 & 12

  for(var i=0;

Leave a Reply