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

SCM Repository

[diderot] Annotation of /tests/lamont-tests/test-sphere2.diderot
ViewVC logotype

Annotation of /tests/lamont-tests/test-sphere2.diderot

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4640 - (view) (download)

1 : glk 4640 #version 2
2 :    
3 :     const int N = 8;
4 :     input real queryRadius = 1.25;
5 :    
6 :     strand S (real x, real y)
7 :     {
8 :     vec2 pos = [x, y];
9 :     output int numNeighbors = 0;
10 :    
11 :     update {
12 :     S[] neighbors = sphere (queryRadius);
13 :     print(pos, ": ", { s.pos | s in neighbors }, "\n");
14 :     numNeighbors = length (neighbors);
15 :     stabilize;
16 :     }
17 :    
18 :     }
19 :    
20 :     create_array { S(x, y) | x in 0..N-1, y in 0..N-1 }

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