在我的代码中,我创建了一个点的二维散点图:
//Loop through all 13 objects
for (int playerEntity = 0; playerEntity < 13; playerEntity++) {
//Obtain X and Y Value Offset from Scatter Plot's origin for each object
int px = positionX[playerEntity] / 20;
int py = positionY[playerEntity] / 20;
//Establish X and Y origin in terms of the screen's pixels;
int originX = 500;
int originY = 1000;
//Plot the scatter plot point in respect to the origin
FillRGB(originX + px , originY + py);
}
如何围绕图形原点旋转点px和py一定程度?例如,如果我想围绕原点旋转图形的点px和py 48度,我该怎么办?有什么想法吗?