How can we make the lights on the inside column curve.
Our first step will be to make the start of the for loop, (the bottom) start slightly larger, and the end (the top) of the for loop to finish slightly smaller.In our for loop, we have the current ring we are on and divide it by the total amount of rings to get a 0 to 1 value that we can use.
We can then lerp with the 0 to 1 value between the original radius and a 1.3 times larger version of that radius.
That gives us this growing in radius rings as we go higher in ring position column.
To begin this, we actually just add a simple exponent to the alpha in lerp. We don't have to think about the math too hard because the highest number will be 1. 1 to the power of say something like 50 will still be 1. Therefore, this will cause our change to not be linear anymore...
We can now adjust the exponent value to change where the curve happens
And then we can try to create the roof of the carousel by making the final goal radius to be larger.
Let's add some mirror tiles!
We already have the data for the lights, so we can just re use that logic but with a smaller radius.
let's see what size we need to make them at the bottom
There we are!
Now let's just set these as our lerp values for scale and use a slightly different power function with 5 instead of 9.
Now let's just set these as our lerp values for scale and use a slightly different power function with 5 instead of 9.
The lighting and mirrored tiles are really magical. Complex and beautiful :)
ReplyDelete