From 719f5defb1db0a521098eac0df46614ac7052ca6 Mon Sep 17 00:00:00 2001 From: orbiter Date: Wed, 7 May 2008 23:42:14 +0000 Subject: [PATCH] updated some grafics at new terminal_p git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@4774 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- htroot/processing/domaingraph/domaingraph.pde | 20 +++++++++++++++++-- htroot/terminal_p.html | 10 +++++----- source/de/anomic/plasma/plasmaGrafics.java | 2 +- 3 files changed, 24 insertions(+), 8 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) )); diff --git a/htroot/terminal_p.html b/htroot/terminal_p.html index 90d494f2e..d586398dd 100755 --- a/htroot/terminal_p.html +++ b/htroot/terminal_p.html @@ -7,7 +7,7 @@ - +