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

SCM Repository

[diderot] Annotation of /branches/ein16/test/atan2-test.diderot
ViewVC logotype

Annotation of /branches/ein16/test/atan2-test.diderot

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3682 - (view) (download)

1 : jhr 1671 // atan2-test.diderot
2 :     //
3 :     // synthetic test of atan2 function
4 :     //
5 :     // To process the output:
6 :     // unu reshape -i atan2-test.txt -s 513 513 | unu quantize -b 8 -o atan2-test.png
7 :     //
8 :    
9 :     strand Pixel (int r, int c) {
10 :     output real v = 0.0;
11 :     update {
12 :     real x = lerp(-1.0, 1.0, -256.0, real(c), 256.0);
13 :     real y = lerp(-1.0, 1.0, -256.0, real(r), 256.0);
14 :     v = atan2 (y, x);
15 :     stabilize;
16 :     }
17 :     }
18 :    
19 :     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