Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] View of /tests/lamont-tests/test-sphere2b.diderot
ViewVC logotype

View of /tests/lamont-tests/test-sphere2b.diderot

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4640 - (download) (annotate)
Tue Sep 27 20:54:47 2016 UTC (2 years, 8 months ago) by glk
File size: 428 byte(s)
initial result of svn export --username anonsvn --password=anonsvn https://svn.smlnj-gforge.cs.uchicago.edu/svn/diderot/branches/vis15/src/tests/
#version 2

input real queryRadius = 1.25;

strand S (real x, real y)
{
    vec2 pos = [x, y];
    output vec2 avgPos = [0, 0];

    update {
//	avgPos = mean { p.pos | p in sphere (queryRadius)};
	S[] neighbors = sphere (queryRadius);
	foreach (S p in neighbors) {
	    avgPos += p.pos;
	}
	if (length(neighbors) > 0) {
	    avgPos /= length(neighbors);
	}
	stabilize;
    }

}

create_array { S(x, y) | x in 0..9, y in 0..9 }

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0