Skip to content

Commit

Permalink
Custom particle size. Higher resolution.
Browse files Browse the repository at this point in the history
  • Loading branch information
sandofsky committed Feb 3, 2010
1 parent 4743f1d commit 316b688
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions data/twitter.config
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# This is a sample configuration file for code_swarm

# Frame width
Width=960
Width=1920

# Frame height
Height=540
Height=1080

# Input file
InputFile=/Volumes/Scratch/projects/twitter_code_swarm/twitter_log.xml
Expand Down Expand Up @@ -130,4 +130,4 @@ IsInputSorted=true

# OpenGL is experimental. Use at your own risk.
UseOpenGL=true
ShowUserName=false
ShowUserName=false
7 changes: 4 additions & 3 deletions src/code_swarm.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ public class code_swarm extends PApplet {
String MASK_FILE = "src/mask.png";
String SCREENSHOT_FILE;
int background;
int PARTICLE_SIZE = 2;

// Data storage
BlockingQueue<FileEvent> eventsQueue;
Expand Down Expand Up @@ -1417,7 +1418,7 @@ public int compareTo(FileNode fn) {
public void drawSharp() {
colorMode(RGB);
fill(nodeHue, life);
float w = 3;
float w = 3 * PARTICLE_SIZE;

if (life >= minBold) {
stroke(255, 128);
Expand All @@ -1433,7 +1434,7 @@ public void drawSharp() {
public void drawFuzzy() {
tint(nodeHue, life);

float w = 8 + (sqrt(touches) * 4);
float w = (8 + (sqrt(touches) * 4)) * PARTICLE_SIZE;
// not used float dubw = w * 2;
float halfw = w / 2;
if (life >= minBold) {
Expand All @@ -1451,7 +1452,7 @@ public void drawJelly() {
stroke(255);
else
stroke(nodeHue, life);
float w = sqrt(touches);
float w = sqrt(touches) * PARTICLE_SIZE;
ellipseMode(CENTER);
ellipse(mPosition.x, mPosition.y, w, w);
}
Expand Down

0 comments on commit 316b688

Please sign in to comment.