@badawe .. hmm.. okay, so let's first make this simple a circle with a radius of 1, centered at (0.0f, 0.0f), anchor point at (0.5f, 0.5f) , meaning that the center of the circle and the anchor point are at the same point, which is (0.0f, 0.0f). Let's say your pendulum never goes above y=0.0f for simplicity's sake, so we're using only the bottom half of the circle. The center point(0.0f,0.0f) would be where your pendulum is swinging from.. the head of your pendulum, when it is at rest, x=0.0f, is y=-1.0f (pointing straight down) .. at x=1.0f , y=0.0f (pointing right) and when x=-1.0f, y =0.0f (pointing left).. the distance from the point on the circle to the origin is always 1.0f .. which means the radius is always 1.0f .. to find the value when the pendulum has swung to 42.71 degrees.. you need to find the value in radians first.. which is :
42.71 degrees = 0.745430124 radians
then cosine(0.745430124) = x = 0.734796222
and sine(0.745430124) = y = 0.678287927
so in your example, if we said the anchor point was at (4.0f, 3.0f), and the length to the point you wanted to rotate around this anchor point was 90.0f (which is 100.0f * 0.9f, your anchor point y-coord) away, then at 42.71 degrees from rest, the point would be at
x = cosine(0.745430124 radians) * (90.0f radius) = 66.13166
y = sine (0.745430124 radians) * (90.0f radius) = 61.0459134
now just add the anchor point to this x and y to get your new point ..
x = 66.12166 + 4.0f = 70.13166
y = 61.0459134 + 3.0f = 64.0459134
so with your pendulum swinging from a point at (4.0f,3.0f), at an angle of 41.71 degrees, the pendulum head's position is (70.13166f, 64.0459134) .
as a little double check, we can check that x^2 + y^2 = r^2 ..
66.12166 ^ 2 = 4372.07392
61.0459134 ^ 2 = 3726.60354
90.0 ^ 2 = 8100
4372.07392 + 3726.60354 = 8098.67746
so you can see, there is a slight rounding error, but 8098.67746 ~~ 8100
I hope that makes sense..
I just realized how much I suck at explaining things ;)
Mark