Introduction
I am currently working on a simulation project. I want to simulate temperature variations like on earth as seen in this photo:
Problem
I am doing everything in C# and Unity but my question is more mathematical than actual coding.
In order to create a gradient, as seen in the image above, i though to divide the height of the 2D map into “Temperature Areas” but i would like something more dynamic and that is the reason why i am asking.
Question:
I though to create a function which does like this:
and by using the factor in the vertical axis (y) i could determine temperature gradient (something similar)
How could i do that triangular function?
The only way to do this from my knowledge is to convolute two square signals into a triangle but that is not even close for what i want.
I would like a dynamic math function
My attempt:
(width is the width of the map i.e 100)
Thanks for the interest in this question.