Do you mean x =-320, y=-250 and z=120 (or maybe z=-120)? Otherwise I don’t understand. Also, is your z fixed and you want the other 2 points to rotate about it?

FWIW, you may find the information contained in my TR’s Other Shapes package useful, especially the script library numbered 2 in the description on the project page.

The verts i’ve given will form a triangle as shown in blue. If I rotate it by 45 degrees clockwise, then the result should be a figure as shown in red. Actually you can think of rotating points in a two-dimensional space since z is always 0 in the example.

The angle is in degrees. To rotate in an anti-clockwise direction you would use just the angle and not the negative version of it. Warning - the above formula is the standard 2d rotation and might not produce the result you are expecting. That is because the rotation is about the 2d origin (i.e. 0, 0). Anyway, give that a try.

Thanks for answering. Your values are nearly the same as the ones I got independently with Tarots formula (see above).

Still something is wrong.

My new triangle is distorted and it doesn’t look like just 45°, the rotation seems to be larger. I wonder what is wrong, since the formula seems to be correct

I confirm the rotation doesn’t change the angles or the lengths. However the scale difference between the abscissa and the ordinate does!
Here’s how the triangles show with an orthonormal system:

I buy it. The formula is correct. Excel does much to display the triangles distorted. One must closely watch out that the scale of x and y-axis is identical.