Funcions linials P63943


Statement
 

Graphic problem

pdf   zip

html

Feu un programa que generi un dibuix on cada punt es defineix com la superposició de tres plans (mòdul 256), un per a cada color primari.

Entrada

L’entrada consisteix en dos naturals estrictament positius m i n, seguits de sis enters rx, ry, gx, gy, bx, i by.

Sortida

Cal generar una imatge (m, n) on cada punt (x, y) tingui una intensitat de vermell definida per (rx · x + ry · y) mod256, intensitat de verd (gx · x + gy · y) mod256, i intensitat de blau (bx · x + by · y) mod256.

Public test cases
  • Input

    800
    800
    1
    1
    4
    0
    0
    4
    

    Output

    sample-1.png

     (800×800)

  • Input

    600
    400
    4
    -2
    -2
    2
    4
    -4
    

    Output

    sample-2.png

     (600×400)

  • Input

    256
    256
    1
    0
    0
    0
    0
    1
    

    Output

    sample-3.png

     (256×256)

  • Information
    Author
    Salvador Roura
    Language
    Catalan
    Official solutions
    Python
    User solutions
    Python