This is my first post on this forum and sure not the last one. I hope to contribute to the forum soon.
I got a question about blend() in combination with rotated images. I wrote this script but i am yet unable to multiply different images rotated and stacked upon each other. Also i'd like to multiply these images with the background, and at a later time with other circles on top.
Is it even possible to rotate a blend ?
And is this the right way to accomplish this ?
Thanks in advance.
Code:
PImage b;
// Radius/Shape nitialization
float xCenter = 350;
float yCenter = 350;
float radius = 100;
float xOffset = -20;
float yOffset = -60;
float nrSteps = 10;
float degreeValue = 0;
float circleX;
float circleY;
void setup() {
size(700, 700);
background(255);
b = loadImage("http://www.muhneer.nl/files/preview/fff_pic.jpg");
noLoop();
}
void draw() {
println(nrSteps);
drawCircle();
}
void drawCircle() {
for (int i = 1; i <= nrSteps; i = i+1) {
degreeValue = 360/nrSteps;
circleX = round(xCenter + (cos(radians(degreeValue*i))*radius));
circleY = round(yCenter + (sin(radians(degreeValue*i))*radius));
item(circleX, circleY, degreeValue*i);
}
}
void item(float x, float y, float angle) {
pushMatrix();
translate(x, y);
rotate(radians(angle));
//b.blend(b, 0, 0, 76, 76, 10, 10, 76, 76, MULTIPLY);
image(b, xOffset, yOffset);
//rect(0, 0, 150, 120);
//blend(b, 0, 0, 150, 120, 10, 10, 150, 120, MULTIPLY);
point(0, 0);
popMatrix();
}