We are about to switch to a new forum software. Until then we have removed the registration on this forum.
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.
Answers
You'll get a better response if you format your code. Here's how:
http://forum.processing.org/two/discussion/8045/how-to-format-code-and-text
(done)
If
ImprovedPerlinNoise
returns a double, there it is.fill()
as any other processing's functions does not work with doubles. Try casting it to float, like:I guess I should have known that narrowing autoconversion must be explicit.