Error with fill(float)

edited September 2015 in Questions about Code

I am getting an error stating fill(int) is expecting an int.

I am trying to leverage the fill(float gray) method and I have changed my colorMode(RGB, 1.0).

// ©Jon Pellant 2015

// globals
float span = 4.0;

void setup() {
  //
  size (400, 400);
  colorMode(RGB, 1.0);
  for (int i = 0; i < width; i++) {
    for (int j = 0; j < height; j++) {
      // draw a point
      fill(ImprovedPerlinNoise.noise(span/i, span/j, 0)); // ImprovedPerlinNoise returns double
      point (i,j);
    }
  } 
}

! It appears that the code interpreter is not working on my post.

Tagged:

Answers

Sign In or Register to comment.