Results 1 to 3 of 3

Math Help - building a gamma function

  1. #1
    Newbie rock's Avatar
    Joined
    Dec 2012
    From
    Florida
    Posts
    3

    Question building a gamma function

    Arggh! I know this should be easy, but after spending 2 hours spinning my wheels, it's time to ask for assistance.

    Basically, I want to build a gamma curve covering a specific range of luminosities. (I can find the desired colors associated with those luminosities via my Interactive Color Wheel.)

    Input 1: luminosities (L) range from 32 to 73 = 41 range
    Input 2: 24 specific colors (c), from 2 to 26 (2 darkest, 26 brightest) = 24 range
    Linear: L = 32 + (41 * (c-2)/24)
    Goal: boost the dark end so that there are visible differences among the darker colors, but leaving the brightest unchanged

    I know that a gamma function is the solution, but I haven't been able to figure out the specific logarithmic and/or exponential magic to get there. (didn't realize I was this rusty )

    Thanks! -- Rich
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Newbie rock's Avatar
    Joined
    Dec 2012
    From
    Florida
    Posts
    3

    Re: building a gamma function

    It might be useful to see exactly what I am trying to do. Look at the small table at the top of the following page:

    * HoH: Server View

    What you see is incomplete (and incorrect) background coloring for the table cells. My goal is to be able to distinguish a server with just two characters from one with three from one with four, etc. "Beta" is darkest with two characters, and "Infinity" is brightest with 26 characters. (Character count shows when you hover mouse over server name.) Luminosity computed linearly does not achieve the goal.

    -- Rich
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie rock's Avatar
    Joined
    Dec 2012
    From
    Florida
    Posts
    3

    Re: building a gamma function

    Well, I slogged through it, and got something that works. I don't think it's gamma, but it does what I want.
    Code:
    Given:	minChar =  2
    	maxChar = 26, deltaCC = 24, max change in character count
    	minLumi = 32
    	maxLumi = 73, deltaL = 41, max change in luminosity
    	L = goal Luminosity, cc = character count
    linearDeltaL = (41 / 24) * (cc - 2)
    boost = exp(1 - ((cc -2 ) / 24))
    L = (linearDeltaL * boost) + 32
    
    cc				  hexColor
     2: L =  0.0 * 2.7  + 32 = 32, c = #092064
     3: L =  1.7 * 2.6  + 32 = 36, c = #0a2472
     4: L =  3.4 * 2.5  + 32 = 40, c = #0c2980
     5: L =  5.1 * 2.4  + 32 = 44, c = #0d2c8a
     6: L =  6.8 * 2.3  + 32 = 48, c = #0e3098
     7: L =  8.5 * 2.2  + 32 = 51, c = #01359f
     9: L = 12.0 * 2.0  + 32 = 56, c = #103cb3
    10: L = 13.7 * 1.95 + 32 = 59, c = #1133bb (background color)
    11: L = 15.4 * 1.87 + 32 = 61, c = #123dc1
    17: L = 25.6 * 1.45 + 32 = 69, c = #1445d9
    26: L = 41.0 * 1.0  + 32 = 73, c = #1549e7
    Here is the table:
    The wide top block and the "gone" box are the complement of the background color.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Building Logistics Function from Data set
    Posted in the Advanced Applied Math Forum
    Replies: 0
    Last Post: September 8th 2012, 09:32 PM
  2. Gamma function of -1/2 = ?
    Posted in the Calculus Forum
    Replies: 2
    Last Post: July 15th 2010, 04:45 AM
  3. [SOLVED] The error function and incomplete gamma function
    Posted in the Advanced Applied Math Forum
    Replies: 0
    Last Post: January 31st 2010, 03:24 PM
  4. gamma function
    Posted in the Number Theory Forum
    Replies: 2
    Last Post: December 1st 2009, 12:29 PM
  5. about gamma function
    Posted in the Calculus Forum
    Replies: 1
    Last Post: May 27th 2008, 10:16 PM

Search Tags


/mathhelpforum @mathhelpforum