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

SCM Repository

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

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

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

revision 1895, Mon May 28 06:10:46 2012 UTC revision 1897, Fri Jun 1 21:11:10 2012 UTC
# Line 5  Line 5 
5  input int maxiter = 1000;  input int maxiter = 1000;
6    
7  // Strand definition  // Strand definition
8  strand mandel(int crIdx, int ciIdx) {  strand mandel(vec2 c) {
    vec2 c = [lerp(-2.0, 2.0, 1.0, real(crIdx), real(reso)),  
              lerp(-2.0, 2.0, 1.0, real(ciIdx), real(reso))];  
9     vec2 z = [0.0, 0.0];     vec2 z = [0.0, 0.0];
10     int iter = 0;     int iter = 0;
11     output vec3 rgb = [0.0, 0.0, 0.0];     output vec3 rgb = [0.0, 0.0, 0.0];
# Line 22  Line 20 
20           stabilize;           stabilize;
21        }        }
22        if (iter > maxiter) {        if (iter > maxiter) {
23             // no escape yet, seems to be in set, so color black
24           rgb = [0.0, 0.0, 0.0];           rgb = [0.0, 0.0, 0.0];
25           stabilize;           stabilize;
26        }        }
# Line 29  Line 28 
28  }  }
29    
30  // Strand initialization  // Strand initialization
31  initially [ mandel(crIdx, ciIdx) | ciIdx in 1..reso, crIdx in 1..reso ];  initially [ mandel([lerp(-2.0, 2.0, 1.0, real(crIdx), real(reso)),
32                        lerp(-2.0, 2.0, 1.0, real(ciIdx), real(reso))])
33                | ciIdx in 1..reso, crIdx in 1..reso ];

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

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