Rotating a gradient
BlitzPlus Forums/BlitzPlus Programming/Rotating a gradient
| ||
Howdy Blitzers! Does anyone know how to rotate a gradient? where xg# and yg# contain the value of the gradient (-1 to 1) Thanks Mr Brine |
| ||
In the code Archive there is a Source to freely position the 4 Corner Points of an image, so you could rotate them around the center... |
| ||
This might work.xr# = (xg# * Cos(a#)) - (yg# * Sin(a#)) xr# = (yg# * Cos(a#)) + (xg# * Sin(a#)) Where a# is the angle of rotation. I'm not very good at trigonometry but that's apparently the formula to rotate a point, and I'm guessing a point is the same as a gradient. |