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

SCM Repository

[diderot] View of /branches/lamont/test/atan2-test.diderot
ViewVC logotype

View of /branches/lamont/test/atan2-test.diderot

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2081 - (download) (annotate)
Mon Nov 5 23:26:06 2012 UTC (6 years, 8 months ago) by lamonts
File size: 481 byte(s)
Creating new developmented branch based on vis12
// atan2-test.diderot
//
// synthetic test of atan2 function
//
// To process the output:
//    unu reshape -i atan2-test.txt -s 513 513 | unu quantize -b 8 -o atan2-test.png
//

strand Pixel (int r, int c) {
    output real v = 0.0;
    update {
        real x = lerp(-1.0, 1.0, -256.0, real(c), 256.0);
        real y = lerp(-1.0, 1.0, -256.0, real(r), 256.0);
        v = atan2 (y, x);
        stabilize;
    }
}

initially [ Pixel(r, c) | r in -256 .. 256, c in -256 .. 256 ];

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