If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register or Login
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Trig Problem: Rotating points in array

Hi guys,

I'm having a bit of trouble with a bit of trig in C#. I've written code similar to this in actionscript3 (flash), but it is giving me issues in C#. I am not receiving errors, but all the shapes I rotate are somewhat screwed up.

It is worth mentioning that Form1.rad is a constant I am using to convert degrees into radians and back. Math.pi/180

I know that the drawing code works correctly. If you comment out the rotation parts of the code, it displays my drawing just fine. What is annoying, is that if the rotation is something other than zero, the rotation works, but the shape is still flattened/scewed on one side.

Re: Trig Problem: Rotating points in array

This seems like it would be much more effective. However I don't understand this exactly. Do I the point that I am rotating in the first argument, and the degrees in the second? If that is the case, I don't see how I can get it to rotate around a specific point?

Re: Trig Problem: Rotating points in array

theta is a degree measured in radians. As for the second question, it knows because of the trigonometric functions. Not sure how else to explain it, if you know what the trig functions actually mean it makes sense.