SCM Repository
[diderot] Annotation of /branches/vis12/bugs/bug001.diderot
Annotation of /branches/vis12/bugs/bug001.diderot
Parent Directory
|
Revision Log
Revision 2146 -
(view)
(download)
1 : |
glk |
2146 |
|
2 : |
|
|
|
3 : |
|
|
// Global definitions
|
4 : |
|
|
input int reso = 2000;
|
5 : |
|
|
// BUG: maxiter isn't used in the program below,
|
6 : |
|
|
// bug that is no reason to not allow setting it
|
7 : |
|
|
// in the command-line interface; removing large
|
8 : |
|
|
// chunks of code is standard when trying to isolate
|
9 : |
|
|
// a bug, and changing the command-line interface
|
10 : |
|
|
// even though all the inputs are the same is a
|
11 : |
|
|
// bad surprise.
|
12 : |
|
|
input int maxiter = 1000;
|
13 : |
|
|
input vec2 center = [0,0];
|
14 : |
|
|
input real fov = 2;
|
15 : |
|
|
// Strand definition
|
16 : |
|
|
strand mandel(vec2 c) {
|
17 : |
|
|
vec2 z = c;
|
18 : |
|
|
int iter = 0;
|
19 : |
|
|
output vec3 rgb = [0, 0, 0];
|
20 : |
|
|
update {
|
21 : |
|
|
print(c, "\n");
|
22 : |
|
|
stabilize;
|
23 : |
|
|
}
|
24 : |
|
|
}
|
25 : |
|
|
// Strand initialization
|
26 : |
|
|
initially [ mandel([lerp(center[0]-fov, center[0]+fov,
|
27 : |
|
|
1, realIdx, reso),
|
28 : |
|
|
lerp(center[1]-fov, center[1]+fov,
|
29 : |
|
|
1, compIdx, reso)])
|
30 : |
|
|
| compIdx in 1..reso, realIdx in 1..reso ];
|