How to maintain the overall length of a chain constant in variable transmission?

The uploaded file shows a normal driver and driven gear chain profile. How can we change the diameters of both the circles relative to each other. That means if the larger circle's diameter is reduced, then the smaller circle diameter should increase.
This should be in a simulated process.