I have following two images:
And I rotate the left image (rotation point is its left edge) around y-axis at 30 degrees and the right image (rotation point is its right edge) around y-axis at -30 degrees to get following output:
Now I want the images to stay joined together just as they were prior to rotation but as you see a gap appears in between them so I thought I can do that by shifting the left image towards right & shifting the right image towards left till the two images meet each other. I thought the following formula should give me the correct translation value but it doesn't work and something is still missing.
translationValue = (widthOfImage - (cos(30) x widthOfImage))
I believe the above formula doesn't work because the depth of the image is not being taken into consideration. How to resolve this?
Due to nature of the problem I'm trying to solve I cannot change the rotation point of left image to be its right edge & rotation point of right image to be its left edge.