>function F () ... global C; for v=-127:127; for u=-127:127; cBlue = (1 + 2*(u/127.0) - (v/127.0)) / 3; cRed = (1 + 2*(v/127.0) - (u/127.0)) / 3; cGreen = (1 - (u/127.0) - (v/127.0)) / 3; if ( cRed < 0.0 || cRed > 1.0 || cGreen < 0.0 || cGreen > 1.0 || cBlue < 0.0 || cBlue > 1.0) then cRed = 0.0; cGreen = 0.0; cBlue = 0.0; endif; C[v+128,u+128]=rgb(cRed,cGreen,cBlue); end; end; endfunction
>C = ones(255,255); >F() >plot2d(none,-127,127,-127,127); ... plotrgb(C):