summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/asymptote/examples/penimage.asy
blob: 2aef9f9ebe2fa123661a38f59e80307616663bee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
size(200);

import palette;

int n=256;
real ninv=2pi/n;
pen[][] v=new pen[n][n];

for(int i=0; i < n; ++i)
  for(int j=0; j < n; ++j)
    v[i][j]=rgb(0.5*(1+sin(i*ninv)),0.5*(1+cos(j*ninv)),0);

image(v,(0,0),(1,1));