Code P_1_2_3_01

Grundlegende Prinzipien –  P.1 Farbe –  P.1.2 Farbpaletten –  P.1.2.3 Farbpaletten aus Regeln –  P_1_2_3_01

Pages


  • 194 - 195

  • 196 - 197

Comments

  • 2010-06-16 @ 10:30 am   |  Comment by cheese nucleus

    hello!

     

    i downloaded the P_1_2_3 _01 code examples, but i just can't run them. whenever i click "run" processing gives the error message "Duplicate P_1_2_3_01.savePDF" and "boolean savePDF = false" is highlighted in the code window. any help would be very much appreciated, beacause i`m a complete processing noob.

     

    cheese nucleus

  • 2010-06-17 @ 1:17 pm   |  Comment by Hartmut Bohnacker

    hi, thanks for the hint.. there seems to be something wrong with the zip. I'm trying to fix this as soon as possible. for now, please try downloading the complete code package.

  • 2012-05-14 @ 11:41 pm   |  Comment by Doeke Wartena

    In the code there is this loop:

    1. for (int gridX=0; gridX< tileCountX; gridX++) {   
    2. for (int gridY=0; gridY< tileCountY; gridY++) {

     

     

    close before that the current tile count get's calculated

    1. int currentTileCountX = (int) map(mouseX, 0,width, 1,tileCountX);
    2.  
    1. int currentTileCountY = (int) map(mouseY, 0,height, 1,tileCountY);

     

    I think using a loop like this make more sence (else a lot get's drawn outside the screen):

    1. for (int gridX=0; gridX< currentTileCountX; gridX++) {   
    2. for (int gridY=0; gridY< currentTileCountY; gridY++) {

     

    But then this line must be different:

    1.  
    1. int index = counter % currentTileCountX; 
    2.  

     

    But i can't figure out what it could be to get nice effect the sketch has with the standard code. So if someone could post a nice solution.

     

    I did like this attemp (there's a left motion and a right motion in it)

    1. for (int gridX=0; gridX< currentTileCountX; gridX++) {         
    2. counter += currentTileCountY % (gridY+1);     
    3. for (int gridY=0; gridY< currentTileCountY; gridY++) {

     

    if someone could post a nice solution then that would be great.

     

     

     

  • 2020-03-10 @ 12:36 pm   |  Comment by Pablo

    Hello !

    Quick question : Why are the arrays of color component values  ( hueValues[],  saturationValues[] and brightnessValues[]) the size of "tileCountX" if at the end you are using a max 3 values of each one ( because of the modulo operator )  ??

     

     

  • 2020-11-03 @ 9:50 am   |  Comment by Manuela

    Hi, could you please explain why the counter value always starts at 50:  i.e. the first rectangle always has the counter 50, regardless of where the mouse goes. If maximum number of rectangls, I get the counter from 50 to 498. I would have expected it to start from 0. Thanks a lot!

Leave a Comment

   (required)

  

Please enable JavaScript to post a comment.

(.zip, max. 1MB)  

Proof that you are human!
Please paste the snippet below in an empty Processing sketch!
What number does the Processing console show?

randomSeed(11218);
println(int(random(100000)));

  (required)