Skip to content
Browse files

Add textured ground

  • Loading branch information...
1 parent 1083e78 commit d862007ed9026d3e046db007ecbbfcce7650d1f8 @cibomahto cibomahto committed
Showing with 24 additions and 9 deletions.
  1. +22 −4 BlinkeyDomeSimulator.pde
  2. +0 −3 BlinkyLights.pde → BlinkeyLights.pde
  3. +2 −2 Dome.pde
  4. BIN Lost Lake.jpg
View
26 BlinkeyDomeSimulator.pde
@@ -34,14 +34,15 @@ int animationStep = 0;
void updateLights() {
// Blink the lights
for (int i = 0; i < blinkeyLights.size(); i++) {
- if (animationStep == i) {
+ if (animationStep == i%10) {
blinkeyLights.get(i).setColor(color(255, 255, 255));
}
else {
- blinkeyLights.get(i).setColor(color(0, 0, 255));
+ blinkeyLights.get(i).setColor(color(0, 0, 0));
}
}
- animationStep = (animationStep+1)%blinkeyLights.size();
+ //animationStep = (animationStep+1)%blinkeyLights.size();
+ animationStep = (animationStep + 1)%10;
}
void draw() {
@@ -50,8 +51,25 @@ void draw() {
background(0);
lights();
+ stroke(92,51);
+ fill(92,51);
+ pushMatrix();
+ translate(0,0.5,0);
+ PImage a = loadImage("Lost Lake.jpg");
+ beginShape();
+ texture(a);
+ textureMode(NORMALIZED);
+
+ //box(DOME_RADIUS*10*4, 1, DOME_RADIUS*10*4);
+ float bound = DOME_RADIUS*10*4;
+ vertex(-bound, 0, -bound, 0,0);
+ vertex(bound, 0, -bound, 1,0);
+ vertex(bound, 0, bound, 1,1);
+ vertex(-bound, 0, bound, 0,1);
+ endShape();
+ popMatrix();
+
dome.draw();
-
blinkeyLights.draw();
}
View
3 BlinkyLights.pde → BlinkeyLights.pde
@@ -18,9 +18,6 @@ class BlinkeyLights {
float y = radius_ * cos(inclination);
blinkeyLights.add(new BlinkeyLight(x, y, z));
-
- // print("inc= " + inclination + ", azi=" + azimuth + "\n");
- print(x + ", " + y + ", " + z + "\n");
}
}
}
View
4 Dome.pde
@@ -13,8 +13,8 @@ class Dome {
}
void draw() {
- stroke(255,100,100);
- fill(200,50,50);
+ stroke(255,100,100,50);
+ fill(200,50,50,0);
for (float phi = 0.0; phi < HALF_PI; phi += factor) {
beginShape(QUAD_STRIP);
View
BIN Lost Lake.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d862007

Please sign in to comment.
Something went wrong with that request. Please try again.