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

SCM Repository

[diderot] View of /branches/pure-cfg/test/ifbug.diderot
ViewVC logotype

View of /branches/pure-cfg/test/ifbug.diderot

Parent Directory Parent Directory | Revision Log Revision Log


Revision 666 - (download) (annotate)
Wed Mar 23 03:12:55 2011 UTC (8 years, 5 months ago) by glk
File size: 868 byte(s)
possible bug
input string dataFile = "../data/txs.nrrd";
real stepSz = 0.2;
vec3 eye = [25.0, 15.0, 10.0];
vec3 orig = [8.83877,2.5911,7.65275];
vec3 cVec = [-0.0151831,0.0278357,0.0];
vec3 rVec = [0.0074887,0.00408474,-0.0305383];

image(3)[] img = load (dataFile);

field#2(3)[] F = img ⊛ bspln3;

strand RayCast (int row, int col)
{
    vec3 pos = orig + real(row)*rVec + real(col)*cVec;
    vec3 dir = (pos - eye)/|pos - eye|;
    real t = 0.0;
    real transp = 1.0;
    output real gray = 0.0;

    update
    {
        pos = pos + stepSz*dir;
        if (inside (pos,F)) {
            real val = F@pos;
            gray = gray + val;
	}
        if (t > 20.0) {
            stabilize;
        }
        if (transp < 0.01) {
            transp = 0.0;
            stabilize;
        }
        t = t + stepSz;
    }
}

initially [ RayCast(r, c) | r in 0..199, c in 0..199 ];

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