GameMaker [SOLVED] Calculate curve and apply to noise grid.

Gzebra

Member
Hi guys. :)

I'm currently working on map generation. I have a simplex noise grid that I use for randomizing planet temperature, I'd like to apply a curve to this grid to simulate poles and equator of my planet. I've tried using dcos() but it results in far to big ice caps and wide equator.
Code:
heatNoise[i,p]=clamp(landNoise[p,i]+(dcos((p/height)*360)),0,1)

Code:
heatNoise[i,p]=clamp(0.5+(dcos((p/height)*360)),0,1)


What I need is something more like this:



There are other ways I can archive the desired effect, but I've already build a large chunk of my map generation around this concept, so if anybody can help, I would be very grateful.
Maybe a pointer to a tutorial on making sexy curves? :D
 
Last edited:
D

dannyjenn

Guest
I believe the formula you're looking for is some variant of power(-cos(x),n), where the n is odd. (Try 7.) Bigger numbers put more space between the caps and equator, while smaller numbers put less space between them.
 

Gzebra

Member
I believe the formula you're looking for is some variant of power(-cos(x),n), where the n is odd. (Try 7.) Bigger numbers put more space between the caps and equator, while smaller numbers put less space between them.
Thank you! I'll try and fiddle around with that a bit :)
 

Gzebra

Member
I believe the formula you're looking for is some variant of power(-cos(x),n), where the n is odd. (Try 7.) Bigger numbers put more space between the caps and equator, while smaller numbers put less space between them.
Works perfectly!
Code:
heatNoise[i,p]=clamp(landNoise[p,i]+power((dcos((p/height)*360)),9),0,1)
Thank you very much! :D
 
Top