How could I calculate the correct distance from the runway to be able to fly a continuous downwind to final turn? I’m not even sure if this is a safe/allowed procedure at controlled airports so it is purely hypothetical. 

Assuming there are calm winds at the field, is there a way to calculate the distance your plane must be from the centerline (see “x”) of the runway while on downwind, so that once you start your turn to base and final thereafter, in a constant rate turn (assume 3 deg./sec.), that you will end up rolling out on the centerline of the runway? 

Speed changes (slows) by 27 knots from the beginning of the turn to the end of the turn. 

Essentially, if I wanted to execute an 180 degree turn at 3 deg. per second, while slowing the airplane from traffic pattern speed (90 kts) to final approach speed (63 kts), how far away would I need to be from the runway while on downwind before beginning the maneuver? The goal is to be able to use this on any plane given their own specific traffic pattern speed and final approach to landing speed.
Turning at 3 deg/sec, a 180-degree turn will take 60 seconds. If the entire turn is performed at 63 knots, the aircraft will travel 1.05 nautical on a half circle (assuming zero wind). The radius of the circle will be the circumference, 2.10 divided by 2*pi = 0.3342 nm. Therefore, x = 2*0.3342 = 0.6684 nm.
If starting at 90 knots and slowing down to 63 knots, the trajectory will not be a a semi-circle but rather a section of a spiral. The starting radius will be 0.4775 and the final radius 0.3342. In this case, x will be approximately 0.8117 nautical miles. To get an exact value for x, an integration must be performed.