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

SCM Repository

[diderot] View of /branches/charisee/ertest/tests/n-ddro-k3/n-ddro-k3.diderot
ViewVC logotype

View of /branches/charisee/ertest/tests/n-ddro-k3/n-ddro-k3.diderot

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2870 - (download) (annotate)
Wed Feb 25 21:47:43 2015 UTC (4 years, 7 months ago) by cchiw
File size: 546 byte(s)
added sqrt,pow, and examples
field#3(2)[] f= load ("../../../data/ddro.nrrd") ⊛ bspln5;
int imgSize = 300;

strand fieldTest (int xi, int yi) {
    vec2 pos = [lerp(0.0, 1.0, -0.5, real(xi), real(imgSize)-0.5),
                lerp(0.0, 1.0, -0.5, real(yi), real(imgSize)-0.5)];

       // output tensor[2]C= ∇f(pos)/|∇f(pos)|; //vis version
      
        field#2(2)[2] n= ∇f/|∇f|;
        output tensor [2]  x= n(pos);
      


     update
        {

     
        stabilize;
    }
}
initially [ fieldTest(xi, yi) |  yi in 0..(imgSize-1), xi in 0..(imgSize-1)];


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