diff options
| author | orbiter <orbiter@6c8d7289-2bf4-0310-a012-ef5d649a1542> | 2008-05-07 23:42:14 +0000 |
|---|---|---|
| committer | orbiter <orbiter@6c8d7289-2bf4-0310-a012-ef5d649a1542> | 2008-05-07 23:42:14 +0000 |
| commit | 719f5defb1db0a521098eac0df46614ac7052ca6 (patch) | |
| tree | 5d1273fde19b528476d28550625877a9572d3afe /htroot/processing | |
| parent | 58830e9b2881a49e968fc458eae21a1a0ef12475 (diff) | |
updated some grafics at new terminal_p
git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@4774 6c8d7289-2bf4-0310-a012-ef5d649a1542
Diffstat (limited to 'htroot/processing')
| -rwxr-xr-x | htroot/processing/domaingraph/domaingraph.pde | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/htroot/processing/domaingraph/domaingraph.pde b/htroot/processing/domaingraph/domaingraph.pde index e79f083e7..5c38a76d9 100755 --- a/htroot/processing/domaingraph/domaingraph.pde +++ b/htroot/processing/domaingraph/domaingraph.pde @@ -13,8 +13,8 @@ import processing.net.*; final float NODE_SIZE = 6; final float EDGE_LENGTH = 50; -final float EDGE_STRENGTH = 0.01; -final float SPACER_STRENGTH = 10; +final float EDGE_STRENGTH = 0.001; +final float SPACER_STRENGTH = 500; ParticleSystem physics; Smoother3D centroid; @@ -162,6 +162,22 @@ void keyPressed() { return; } + if ( key == 'd' ) { + HashSet hs = new HashSet(); + for (int i = 0; i < physics.numberOfParticles(); ++i ) { + hs.add(physics.getParticle(i)); + } + for (int i = 0; i < physics.numberOfSprings(); ++i ) { + hs.remove(physics.getSpring(i).getOneEnd()); + hs.remove(physics.getSpring(i).getTheOtherEnd()); + } + Iterator i = hs.iterator(); + while (i.hasNext()) { + ((Particle) i.next()).kill(); + } + return; + } + if ( key == ' ' ) { Particle p = physics.makeParticle(); addRelation(p, physics.getParticle( (int) random( 0, physics.numberOfParticles()-1) )); |
