Help me to create a formula with input of several variables.

Post » Sat May 26, 2012 5:16 am

Please help me or better teach me. What I want to achieve is something like this:


http://i.imgur.com/NHoKL.png

This is a daily period. Variables are for day time and night time standard values and then there are two peaks for sunrise and sunset and some duration for these.

Day peak = 1
Night peak = 0.5
Sunrise peak = 3
Sunset peak = 2
sunrise start = in seconds
sunrise stop = in seconds
sunset start = in seconds
sunset stop = in seconds

I can do this with programming but I want to do it with pure math.

It is probably something like:
a sin (bx + c) + d sin (tx + h)

but more complicated since it should get these variables incorporated. Range will be in seconds: (0.........86400)...

PS. This is for a mod.
User avatar
Mark
 
Posts: 3341
Joined: Wed May 23, 2007 11:59 am

Post » Sat May 26, 2012 9:51 am

One function to rule them all?
User avatar
Richard
 
Posts: 3371
Joined: Sat Oct 13, 2007 2:50 pm

Post » Sat May 26, 2012 6:34 am

Maybe I'm just not experienced enough, or maybe its because I'm sick, but its not really clear to me what kind of function you want

EDIT: I have had good encounters with http://www.physicsforums.com; go to their mathematics section
User avatar
Eduardo Rosas
 
Posts: 3381
Joined: Thu Oct 18, 2007 3:15 pm

Post » Sat May 26, 2012 12:44 pm

A function that draws that graph based on those 8 variables. It is complicated isn't it? :D
User avatar
Bek Rideout
 
Posts: 3401
Joined: Fri Mar 02, 2007 7:00 pm


Return to Othor Games