SolidBodyMotion planetary rotation

 Register Blogs Members List Search Today's Posts Mark Forums Read

 December 27, 2019, 10:17 SolidBodyMotion planetary rotation #1 New Member   Andy Join Date: Dec 2019 Posts: 1 Rep Power: 0 Hello everybody, i hope everyone had a merry Christmas. I'm writing a thesis and I'm stuck at a new superimposed SolidBodyMotion for the IBS methode. I'm trying to write a rotation of an object, which is rotating around its own axis and around a global point. For example like the moon is rotating around it self and around the earth. I tried a lot of versions but nothing is working. Version 1: //Global Rotation const vector rotation2 = omega2_*t; const quaternion R2(rotation2.x(), rotation2.y(), rotation2.z()); const septernion TR2 ( septernion(origin2_)*R2*septernion(-origin2_) ); const vector rotation = omega_*t; //Rotation around own axis const quaternion R(rotation.x(), rotation.y(), rotation.z()); const septernion TR ( septernion(origin_)*R*TR2*septernion(-origin_) ); return TR; } I tried to rotate the object around the global central and add the calculated coordinates to the rotation around the own axis, but it does not work. Version 2: //calculation of the orbital coordinates const vector translation = vector ( radius_.x()*cos(omega_.x()*t), radius_.y()*sin(omega_.y()*t), 0*sin(omega_.z()*t) ); //addition of the orbital coordinates to the origin to move the origin on the orbit const quaternion R(rotation.x(), rotation.y(), rotation.z()); const septernion TR ( septernion(origin_ + translation)*R*septernion(-origin_) ); return TR; } I tried a lot more, but still had no success. I would be very thankfull for some tipps or a solution. Last edited by RoeschA; December 30, 2019 at 09:26.

 Tags ibs, rotation, solidbodymotion, superimposed