Hi Fahim,
The rules of optics are the same for your Nikon DSLR and any rangefinder, even a Leica! DOF is narrow and precarious with wider apertures and longer focal length. Swinging a lens from one point of focus, therefore will be wrong after recomposing if the target one chooses is on the same flat plane as the intended final composition. Let's do this by imagining.
In short, imagine a large sphere with it's surface the plane of focus of a tiny camera lens in the center. Any angle the lens is swung to will maintain the focus of any object anywhere on that curved surface.
With any camera, the plane of focus, (after adjustment), is a fixed distance orthogonal to a line coming out of the axis of the lens. If the camera is shifted a tad without changing the angle one is pointing the camera, the plane will shift to that side but plane of focus and the DOF will remain the same! Everything in the center that was in focus should remain in focus with a well corrected lens.
So where's the problem? It's when the camera is pointed at a new angle. The plane of focus is now moved away from its original position. If one had focused on the top of a building and now we reframe on the center of the structure, the distance from the camera to the new center is much shorter. This means the plane of focus is now thrown behind the front of the building!
With a rangefinder, I presume you refer to a Mamiya 7, Leica or similar. Here we have to align the lighter, often green/yellow tinted floating) image of the subject with the larger bright clear image in the viewfinder. Using a wider lens, such as 50mm at say f8, focus on the top of a person's head and they are across the street, recomposing might matter little.
We only escaped from problems here because the lens is stopped down and therefore depth of focus is deeper and buffers recomposing change and anyway shorter lenses have deeper focus anyway.
Now if we do this with the lens open to f4.0, for example, the DOF is markedly decreased. At 2.0 it would be much thinner and at 1.2, just mm! Then should we choose a longer lens the situation is even worse.
To maintain focus when one arcs the camera from one position to another, one has to focus on a target the same distance from the camera: For example, I might choose a high contrast object, (such as a spoon), on a table at the
same distance from the camera but a different angle from my proposed target, the eyes of a person in less than perfect light. Swinging the camera beck to the face to recompose will result in perfect focus!
The Canon 5D, suffers unreliable focus in poor light. However, with my technic of using a target in the arc from the front of the lens, focus is almost always perfect.
I hope this helps even without formulae or diagrams.
Asher