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

SCM Repository

[diderot] View of /branches/fem/examples/d2s/simple_lerp/simple_lerp.diderot
ViewVC logotype

View of /branches/fem/examples/d2s/simple_lerp/simple_lerp.diderot

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3356 - (download) (annotate)
Fri Oct 30 21:27:50 2015 UTC (3 years, 8 months ago) by cchiw
File size: 741 byte(s)
overdue commit
input int imgResU;
input int imgResV;
input int physicalxo=0;
input int physicalxn=1;
input int physicalyo=0;
input int physicalyn=1;
input fem#0(2)[] m ;
field#0(2)[] F=toField(m) ;

strand sample (int ui, int vi) {
   real uu = lerp(physicalxo, physicalxn, -0.5, real(ui), real(imgResU)-0.5);
   real vv = lerp(physicalyo, physicalyn, -0.5, real(vi), real(imgResV)-0.5);

//real uu = lerp(physicalxo, physicalxn, 0, real(ui), real(imgResU-1));
//real vv = lerp(physicalyo, physicalyn, 0, real(vi), real(imgResV-1));

   vec2 pos = [uu, vv];
   output real out = -0.6; 

   update {
    out = F(pos) if (inside(pos,F)) else -0.6;
//out=99;
      stabilize;
   }
}

initially [ sample(ui, vi) |  vi in 0..(imgResV-1), ui in 0..(imgResU-1) ];

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