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

SCM Repository

[diderot] View of /branches/charisee/ertest/vispaper/tensor-field-ops/tensor-field-ops.diderot
ViewVC logotype

View of /branches/charisee/ertest/vispaper/tensor-field-ops/tensor-field-ops.diderot

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2925 - (download) (annotate)
Tue Mar 3 22:00:11 2015 UTC (4 years, 7 months ago) by cchiw
File size: 823 byte(s)
example of inner prod
/*

../../../bin/diderotc iso3d.diderot \
&& ./iso3d \
&& unu crop -i iso3d.txt -min 0 0 -max 1 M | \
   unu jhisto -b 600 600 -min -1.2 -1.2 -max 1.2 1.2 -t float | \
   unu 1op log1p | \
   unu quantize -b 8 -o iso3d.png \
&& open iso3d.png

*/

field#2(2)[] V= bspln3 ⊛ load("parab0.nrrd");
field#2(2)[] U= bspln3 ⊛ load("parab1.nrrd");

field#1(2)[2] G = ∇V-[1,0];
//field#1(2)[] F = |∇V-[1,0]|;
field#1(2)[] F = |G|;



int grid = 30;
int stepsMax = 10;
real epsilon = 0.000001;

strand RootFind(real xi,real xj) {
   output vec2 x = [xi,xj];
   int steps = 0;
   tensor[] y=|∇F(x)|;
   
   update {
        x=[y,6];
        stabilize;
   }
}

initially { RootFind(lerp(-2, 2, -0.5, ui, grid-0.5),
                     lerp(-2, 2, -0.5, vi, grid-0.5))
            |  vi in 0..(grid-1), ui in 0..(grid-1) };

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