So I have an array of points (x,y) values, that represent the pixels of the image. The first value is 0,0, and the rest of the values are relative to the first.
Ex: 0,0 1,0 -2,2 1,1 would produce 4 pixels like this:
__xx
___x
x___
where the top left 'x' is the first point. the second sequence just means 1 point to the right, and 0 points down... works the same for negatives.
What I'm now trying to do is convert my original array, to all the permutations of rotating the rest of the pixels 360 degrees about the anchor point (0,0). So I woule have a 90 degree rotate left and right, a 180 degree rotate, and the odd angles in between (those are the tricky ones)
Ideally it would obviously have to round to solid pixel dimensions, so there would only be ~10 or so for this (total estimation)
I'm guessing it's gonna have to do with some trig, but mine is a little rusty.
Anyone have any ideas?
Ex: 0,0 1,0 -2,2 1,1 would produce 4 pixels like this:
__xx
___x
x___
where the top left 'x' is the first point. the second sequence just means 1 point to the right, and 0 points down... works the same for negatives.
What I'm now trying to do is convert my original array, to all the permutations of rotating the rest of the pixels 360 degrees about the anchor point (0,0). So I woule have a 90 degree rotate left and right, a 180 degree rotate, and the odd angles in between (those are the tricky ones)
Ideally it would obviously have to round to solid pixel dimensions, so there would only be ~10 or so for this (total estimation)
I'm guessing it's gonna have to do with some trig, but mine is a little rusty.
Anyone have any ideas?