I’m writing peace of software that is able to uniformly scale set of vertices. To do that I have a buffer where I keep my vertices untouchable. When I need to resize them, I create copy of that buffer and multiply that copy by scaling matrix one time. And that -is repeated each time if I need to scale something! So I don’t want to make copy each time before scaling and I want to scale based on previous scale result.
I will describe my problem. Let say I have value 1 and I want it to become 100, so I will multiply it by 100 ONE time. But what if I need to achieve that same result (100) in some other arbitrary number of multiplications and get evenly distributed numbers. For example: number of steps = 4. So after each multiplication result must be increased by 100/4=25 (to produce 1,25,50,75,100 as a result). Multiplication sequence will look like this: 1*25*2*1.5*1.33. You will notice that this sequence will be different all the time depending on a number of steps! More than that if you want to go in opposite direction (to get this 100,75,50,25, 1), multiplication sequence is following: 100*0.75*0.666*0.5*0.04. What is the formula or algorithm for generating that sequences by taking known start value(x) and value(e), number of steps(n) and direction (from smaller to greater or from greater to smaller)? Any ideas how to solve this?
Besides, it’s very interesting that we get two different sequences depending on direction. I think this is why time goes in one direction for us ;)