Permalink
Browse files

Disabled toroidal mode since it has bugs :(

  • Loading branch information...
1 parent 95de09f commit 839f65a5f139f8d4504363e84e2a9c9e3fe4aa80 @muraliavarma committed Feb 9, 2013
@@ -5,14 +5,14 @@ void drawGUI() {
drawText(90, "(3) Collisions: " + (collisionAvoidanceForce?"on":"off"));
drawText(110, "(4) Wandering: " + (wanderingForce?"on":"off"));
drawText(140, "(p) Trail Length: " + (backgroundAlpha == 0?"Full":(backgroundAlpha == 255?"None":"Half")));
- drawText(170, "(a/r) Mouse mode: " + (mouseMode == ATTRACT_MODE?"Attraction":"Repulsion"));
- drawText(200, "(e) Edge Behavior: " + (edgeBehavior == TOROIDAL_MODE?"Toroidal":"Reflect"));
- drawText(230, "(b) Boid Shape: " + (boidShape == CIRCLE_BOID?"Circle":"Triangle"));
- drawText(300, "(c) Clear paths");
- drawText(340, "(s) Scatter boids");
- drawText(400, "(Space) Simulation is " + (isLoop?"playing":"paused"));
+ drawText(160, "(a/r) Mouse mode: " + (mouseMode == ATTRACT_MODE?"Attraction":"Repulsion"));
+ // drawText(200, "(e) Edge Behavior: " + (edgeBehavior == TOROIDAL_MODE?"Toroidal":"Reflect"));
+ drawText(190, "(b) Boid Shape: " + (boidShape == CIRCLE_BOID?"Circle":"Triangle"));
+ drawText(230, "(c) Clear paths");
+ drawText(250, "(s) Scatter boids");
+ drawText(300, "(Space) Simulation is " + (isLoop?"playing":"paused"));
if (!isLoop) {
- drawText(430, "(.) Go to next timestep");
+ drawText(320, "(.) Go to next timestep");
}
}
@@ -59,14 +59,14 @@ void keyPressed() {
mouseMode = REPEL_MODE;
}
- if (key == 'e') {
- if (edgeBehavior == TOROIDAL_MODE) {
- edgeBehavior = REFLECT_MODE;
- }
- else {
- edgeBehavior = TOROIDAL_MODE;
- }
- }
+ // if (key == 'e') {
+ // if (edgeBehavior == TOROIDAL_MODE) {
+ // edgeBehavior = REFLECT_MODE;
+ // }
+ // else {
+ // edgeBehavior = TOROIDAL_MODE;
+ // }
+ // }
if (key == 'b') {
if (boidShape == TRIANGLE_BOID) {
Binary file not shown.
@@ -52,7 +52,7 @@
int NUM_CREATURES = 75;
boolean isLoop = true;
-int edgeBehavior = TOROIDAL_MODE;
+int edgeBehavior = REFLECT_MODE;
int mouseMode = ATTRACT_MODE;
int boidShape = TRIANGLE_BOID;
int backgroundAlpha = 10; //0 for full trail, 255 for no trail
@@ -337,14 +337,14 @@ public void drawGUI() {
drawText(90, "(3) Collisions: " + (collisionAvoidanceForce?"on":"off"));
drawText(110, "(4) Wandering: " + (wanderingForce?"on":"off"));
drawText(140, "(p) Trail Length: " + (backgroundAlpha == 0?"Full":(backgroundAlpha == 255?"None":"Half")));
- drawText(170, "(a/r) Mouse mode: " + (mouseMode == ATTRACT_MODE?"Attraction":"Repulsion"));
- drawText(200, "(e) Edge Behavior: " + (edgeBehavior == TOROIDAL_MODE?"Toroidal":"Reflect"));
- drawText(230, "(b) Boid Shape: " + (boidShape == CIRCLE_BOID?"Circle":"Triangle"));
- drawText(300, "(c) Clear paths");
- drawText(340, "(s) Scatter boids");
- drawText(400, "(Space) Simulation is " + (isLoop?"playing":"paused"));
+ drawText(160, "(a/r) Mouse mode: " + (mouseMode == ATTRACT_MODE?"Attraction":"Repulsion"));
+ // drawText(200, "(e) Edge Behavior: " + (edgeBehavior == TOROIDAL_MODE?"Toroidal":"Reflect"));
+ drawText(190, "(b) Boid Shape: " + (boidShape == CIRCLE_BOID?"Circle":"Triangle"));
+ drawText(230, "(c) Clear paths");
+ drawText(250, "(s) Scatter boids");
+ drawText(300, "(Space) Simulation is " + (isLoop?"playing":"paused"));
if (!isLoop) {
- drawText(430, "(.) Go to next timestep");
+ drawText(320, "(.) Go to next timestep");
}
}
@@ -412,14 +412,14 @@ else if (backgroundAlpha == 255) {
mouseMode = REPEL_MODE;
}
- if (key == 'e') {
- if (edgeBehavior == TOROIDAL_MODE) {
- edgeBehavior = REFLECT_MODE;
- }
- else {
- edgeBehavior = TOROIDAL_MODE;
- }
- }
+ // if (key == 'e') {
+ // if (edgeBehavior == TOROIDAL_MODE) {
+ // edgeBehavior = REFLECT_MODE;
+ // }
+ // else {
+ // edgeBehavior = TOROIDAL_MODE;
+ // }
+ // }
if (key == 'b') {
if (boidShape == TRIANGLE_BOID) {
@@ -37,7 +37,7 @@ final float MAX_VELOCITY = 0.001;
int NUM_CREATURES = 75;
boolean isLoop = true;
-int edgeBehavior = TOROIDAL_MODE;
+int edgeBehavior = REFLECT_MODE;
int mouseMode = ATTRACT_MODE;
int boidShape = TRIANGLE_BOID;
int backgroundAlpha = 10; //0 for full trail, 255 for no trail

0 comments on commit 839f65a

Please sign in to comment.