Jeroen
03-05-2011, 01:18 PM
Hi everyone,
I’m working on a shader and I need some help with a math formula, because I’m stuck.
This is what’s going on, visually.
I’ve got a sphere (sphere B) in my 3D scene parented on a master sphere on coordinates 0 0 0.
The coordinates of Sphere B are X = 8, Y = 6.
When I rotate my master sphere with a angle of 45 degrees (counter clockwise), the new position of sphere B becomes X = 1.414, Y = 4.899.
I’ve got three examples;
1) X = 8 --> X = 1.414
Y = 6 --> Y = 4.899
2) X = 1 --> X = 0
Y = 1 --> Y =1.414
3) X = -2 --> X = 4.243
Y = -8 --> Y = -7.071
I’m looking for a formula that gives me the new position of my sphere B without parenting it to another sphere on 0 0 0 which I rotate 45 degrees.
I’m working on a shader and I need some help with a math formula, because I’m stuck.
This is what’s going on, visually.
I’ve got a sphere (sphere B) in my 3D scene parented on a master sphere on coordinates 0 0 0.
The coordinates of Sphere B are X = 8, Y = 6.
When I rotate my master sphere with a angle of 45 degrees (counter clockwise), the new position of sphere B becomes X = 1.414, Y = 4.899.
I’ve got three examples;
1) X = 8 --> X = 1.414
Y = 6 --> Y = 4.899
2) X = 1 --> X = 0
Y = 1 --> Y =1.414
3) X = -2 --> X = 4.243
Y = -8 --> Y = -7.071
I’m looking for a formula that gives me the new position of my sphere B without parenting it to another sphere on 0 0 0 which I rotate 45 degrees.
