File: Test2.es

package info (click to toggle)
structure-synth 1.0.0-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 2,072 kB
  • ctags: 1,176
  • sloc: cpp: 7,070; python: 167; makefile: 66; lisp: 25
file content (28 lines) | stat: -rw-r--r-- 514 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#javascript


World.clear();
pos = new Vector3(1,1,1);

max = 100

k = 5

function GCD(nums)
{
   if(!nums.length) return 0;
       
	for(var r, a, i = nums.length - 1, GCDNum = nums[i]; i;)
   for(a = nums[--i]; r = a % GCDNum; a = GCDNum, GCDNum = r);
   return GCDNum;
}

for (x = 0; x < k; x++) {
for (y = 0; y < k; y++) {
for (z = 0; z < k; z++) {
       World.setColor(new Vector3(1,1,1),1);
Debug.Info(GCD(x,y,z));
	if (GCD(x,y,z)!=2) World.addSphere2(Vector3(x,y,z),0.2);
}
}
}