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

SCM Repository

[diderot] View of /branches/charisee/ertest/vispaper/volume-derivC2-x1/volume-derivC2-x1.diderot
ViewVC logotype

View of /branches/charisee/ertest/vispaper/volume-derivC2-x1/volume-derivC2-x1.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: 542 byte(s)
added sqrt,pow, and examples
field#3(2)[] f= load ("../../../data/ddro.nrrd") ⊛ bspln5;
field#2(2)[2] g = ∇f;
field#1(2)[2,2] H = ∇⊗∇f;
field#1(2)[] C=g•(((H•g)+(H•g))/2)/|g|;
field#0(2)[2] delC=∇C;

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] t=delC(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