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

SCM Repository

[diderot] Annotation of /trunk/rtest/tests/convo3d0/convo3d0.diderot
ViewVC logotype

Annotation of /trunk/rtest/tests/convo3d0/convo3d0.diderot

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1188 - (view) (download)

1 : glk 1188
2 :    
3 :     int outSize = 50;
4 :    
5 :     field#0(3)[] F = tent ⊛ load("../../data/ring.nrrd");
6 :    
7 :     strand sample (int ui, int vi, int wi) {
8 :     real uu = lerp(-1.0, 1.0, -0.5, real(ui), real(outSize)-0.5);
9 :     real vv = lerp(-1.0, 1.0, -0.5, real(vi), real(outSize)-0.5);
10 :     real ww = lerp(-1.0, 1.0, -0.5, real(wi), real(outSize)-0.5);
11 :     vec3 pos = [uu, vv, ww];
12 :     output real val = -0.6;
13 :    
14 :     update {
15 :     val = F(pos) if (inside(pos,F)) else -0.6;
16 :     stabilize;
17 :     }
18 :     }
19 :    
20 :     initially [ sample(ui, vi, wi) | wi in 0..(outSize-1), vi in 0..(outSize-1), ui in 0..(outSize-1) ];

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