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

SCM Repository

[diderot] Diff of /branches/fem/test/mandel.diderot
ViewVC logotype

Diff of /branches/fem/test/mandel.diderot

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1897, Fri Jun 1 21:11:10 2012 UTC revision 1904, Sun Jun 3 02:40:45 2012 UTC
# Line 1  Line 1 
1    
2    
3  // ../bin/diderotc --exec mandel.diderot && ./mandel && unu quantize -b 8 -i rgb.nrrd -o mandel.png  // ../bin/diderotc --exec mandel.diderot && ./mandel && unu quantize -b 8 -i rgb.nrrd -o mandel.png
4    
5  // Global definitions  // Global definitions
6  input int reso = 800;  input int reso = 2000;
7  input int maxiter = 1000;  input int maxiter = 2000;
8    input vec2 center = [-1.2, -0.3]; // [0.0,0.0] for whole thing
9    input real fov = 0.15; // 2.0 for whole thing
10    
11  // Strand definition  // Strand definition
12  strand mandel(vec2 c) {  strand mandel(vec2 c) {
# Line 20  Line 24 
24           stabilize;           stabilize;
25        }        }
26        if (iter > maxiter) {        if (iter > maxiter) {
          // no escape yet, seems to be in set, so color black  
27           rgb = [0.0, 0.0, 0.0];           rgb = [0.0, 0.0, 0.0];
28           stabilize;           stabilize;
29        }        }
# Line 28  Line 31 
31  }  }
32    
33  // Strand initialization  // Strand initialization
34  initially [ mandel([lerp(-2.0, 2.0, 1.0, real(crIdx), real(reso)),  initially [ mandel([lerp(center[0]-fov, center[0]+fov,
35                      lerp(-2.0, 2.0, 1.0, real(ciIdx), real(reso))])                           1.0, real(crIdx), real(reso)),
36                        lerp(center[1]-fov, center[1]+fov,
37                             1.0, real(ciIdx), real(reso))])
38              | ciIdx in 1..reso, crIdx in 1..reso ];              | ciIdx in 1..reso, crIdx in 1..reso ];

Legend:
Removed from v.1897  
changed lines
  Added in v.1904

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