This sounds as a duplicate of How to scale cut plane d translation with rotation?
As @Evgeni_Popov mentioned there, the question here is more about maths and our kings @JohnK and @Cedric might have a look shortly. But keep in mind it is a vacation period in some parts of the world so patience is key