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

SCM Repository

[diderot] Annotation of /branches/pure-cfg/test/zslice-rgb.diderot
ViewVC logotype

Annotation of /branches/pure-cfg/test/zslice-rgb.diderot

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1669 - (view) (download)

1 : jhr 880 // to process output:
2 :     //
3 : jhr 1352 // unu reshape -i zslice-rgb.txt -s 3 200 200 | unu quantize -b 8 -o zslice-rgb.png
4 : glk 875
5 :     int imgRes = 200;
6 :     int dataRes = 110;
7 :    
8 : glk 1060 field#0(2)[3] RGB= load("../data/txf/2d-bow.nrrd") ⊛ tent;
9 : glk 875
10 :     strand RayCast (int ui, int vi)
11 :     {
12 : jhr 898 int u = ui;
13 :     int v = vi;
14 : glk 875 vec2 pos = [lerp(-1.0, 1.0, -0.5, real(ui), real(imgRes)-0.5),
15 :     lerp(-1.0, 1.0, -0.5, real(vi), real(imgRes)-0.5)];
16 :     output vec3 rgb = [0.0,0.0,0.0];
17 :    
18 :     update
19 : jhr 1669 {
20 :     // How to probe the per-component images
21 : glk 916 //rgb = [RR(pos),GG(pos),BB(pos)] if inside(pos,RR) else [0.0,0.0,0.0];
22 : glk 875
23 :     // How to probe the single RGB image
24 : lamonts 1398 rgb = RGB(pos) if inside(pos,RGB) else [0.0,0.0,0.0];
25 : jhr 1669 // rgb = [0.5,0.0,0.0] if inside(pos,RGB) else [0.0,0.0,0.0];
26 :     // rgb = [0.5 + pos[0], 0.0, 0.5 + pos[1]] if inside(pos,RGB) else [0.0,0.0,0.0];
27 : glk 875
28 :     stabilize;
29 :     }
30 :     }
31 :    
32 :     initially [ RayCast(ui, vi) | vi in 0..(imgRes-1), ui in 0..(imgRes-1) ];

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