Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
06/10/10 06:15
Read: times


 
#176577 - You need more levels.
Responding to: ???'s previous message
Chico Magalhães said:
Andy, nice would be solving my problem...
What is bothering me is the color "jumping" every 5 increments red sudenly ligths off.

Of course you get jumping. That is because an index formed by merging of the R, G and B steps into a combined integer must produce jumps. You don't animate from one color to the other by stepping an index one step up or down. You do it by computing how much to increase or decrease R, G and B. If you really do have an indexed solution, you then scan through your index table to find the index that is closest to the wanted full-color value. A GIF image can have at most 256 colors. But each color can be defined as a full RGB triplet. The program that converts a full-color image to GIF will have to create a color palette that spans the full color space. You have been given an example of such a palette earlier in this thread. It's the HTML color palette available by almost all web browsers. The program that converts a full-color image to GIF then takes each and every full-color pixel and matches against the available palette to find the closest match. As an improvement, the program then computes the error and feeds this error to neighbour pixels. The same can be done when animating a color - step the animation fast enough and feed the error to the next time slice. If you step time at 200-500Hz, then you can modulate between two or three indexed colors to create an average.

An index (0..124) is a onedimensional value. It just can not span a two-dimensional (color circle) or three-dimensional (color-cube or color-cone) color space without folding. And this folding, where you cut the two or three dimensions into ribbons and place after each other do give the effect you see. You can reduce the effect by using a space-filling curve. Draw a line in zig-zag over the color circle/cube/cone and make sure that the zig-zag starts and ends at the same place. That is the only way that you will get a small (as small as you can get with as little as 125 steps) color change between each and every neighbour lookup value for the index.

But the video you like is nice because it has smooth toning. You have explicitly said that you are not interested in smooth toning. And without smooth toning you will not (!!!) get the nice effect from the video. To match the video, you need support for thousands of color combinations. You would get close with Eriks alternative with 32 levels for each color channel. 5 levels/channel (which is 4 non-black levels) is not even close to managing what you want (but claim that you do not want).

Chico Magalhães said:
I know I cant get that smoothness in transitions, what I need is the color sequence/table.

But you do know wrong. You can not (once more N.O.T.) get that smoothness with a PWM solution only having 5 steps. An analog solution with 5 steps could produce more tonality by applying oversampling and PWM. But you can't overlay PWM on a PWM solution - or at least it would be very stupid to try such a thing since any PWM solution supporting that would from the beginning have supported a higher resolution.

List of 120 messages in thread
TopicAuthorDate
IRF640 noob test            01/01/70 00:00      
   Gate current            01/01/70 00:00      
   "empirical" learning...            01/01/70 00:00      
      read the material...            01/01/70 00:00      
         I believe he is using a MOSFET here            01/01/70 00:00      
            kit            01/01/70 00:00      
               It is DC output            01/01/70 00:00      
               POOF BOOM            01/01/70 00:00      
   what about this circuit?            01/01/70 00:00      
   IRFZ48N and a circuit, this one can fit?            01/01/70 00:00      
      A little bit easier link            01/01/70 00:00      
         Thanks Per            01/01/70 00:00      
            The longest road from a to b            01/01/70 00:00      
               The problem is...            01/01/70 00:00      
                  Sorry            01/01/70 00:00      
                     Hope, you will find the time...            01/01/70 00:00      
                        RGB Controller            01/01/70 00:00      
                           do you need it that bright            01/01/70 00:00      
                              Bar and some info            01/01/70 00:00      
                                 sure you can            01/01/70 00:00      
                                    Hard to adjust intensity by changing voltage            01/01/70 00:00      
                           Simple scheme...            01/01/70 00:00      
                              Very nice!            01/01/70 00:00      
                                 HC32 and not KTC32            01/01/70 00:00      
                                 Answers...            01/01/70 00:00      
                                    maybe another CI?            01/01/70 00:00      
                                       Yes most hc is ok            01/01/70 00:00      
                                          Same HCs to switch ULN2803?            01/01/70 00:00      
                                       Logic Level MOSFET            01/01/70 00:00      
                     you can - wth a caveat            01/01/70 00:00      
   Can I ask a color question?            01/01/70 00:00      
      Start a new thread            01/01/70 00:00      
         Interpolate in RGB or HSV but not in your tabulated index.            01/01/70 00:00      
            linear interpolations...            01/01/70 00:00      
               Standard interpolation            01/01/70 00:00      
                  that depends            01/01/70 00:00      
         right subject            01/01/70 00:00      
      your premises are wrong            01/01/70 00:00      
      If you answer a question...            01/01/70 00:00      
         Just tests, no MOSFETs yet...            01/01/70 00:00      
            The ULN2803 will ruin your colors!            01/01/70 00:00      
               when doing color            01/01/70 00:00      
               miss the point... the point is the color generation...            01/01/70 00:00      
                  Help with what?            01/01/70 00:00      
                  already answered            01/01/70 00:00      
                  Have you seen my link?            01/01/70 00:00      
                     Yes, but dont helps...            01/01/70 00:00      
                        as usual            01/01/70 00:00      
                           not "SPECIFIC, SPECIFIC, SPECIFIC"            01/01/70 00:00      
                              Use another look-up table...            01/01/70 00:00      
                                 Thats it!            01/01/70 00:00      
                                    Copy from a professional solution...            01/01/70 00:00      
                                       Youtube has some nice videos...            01/01/70 00:00      
                              you've got it wrong and what are you doing            01/01/70 00:00      
                                 I care Erik!            01/01/70 00:00      
                                    why are you "going through steps"?            01/01/70 00:00      
                                       Kai videos?            01/01/70 00:00      
                                          Already been told            01/01/70 00:00      
                                             HSV            01/01/70 00:00      
                                                Now I'm confused            01/01/70 00:00      
                                                   Still never telling what you do want            01/01/70 00:00      
                                                      you are going for an intensity ratio ...            01/01/70 00:00      
                                                      I see no contradiction...            01/01/70 00:00      
                                                         I think it was incrementing of the index that was the proble            01/01/70 00:00      
                                                            Chico, are you getting it            01/01/70 00:00      
                                                               Words            01/01/70 00:00      
                                                                  He should have enough information now...            01/01/70 00:00      
                                                                     that is often the problem ...            01/01/70 00:00      
                                                                        Words fail me...            01/01/70 00:00      
                                                                  How to add            01/01/70 00:00      
                                                                     You don't have paletted device so stop thinking about index            01/01/70 00:00      
                                                                        only 125 colors            01/01/70 00:00      
                                                                           Smooth? Sudden? This make no sense!            01/01/70 00:00      
                                                                              I'm tired from guessing, Chico...            01/01/70 00:00      
                                                                           So you haven't read what we have posted?            01/01/70 00:00      
                                                         Thats it Kai...            01/01/70 00:00      
                                                            place my 125 unchangeable colors in a nice sequence in this            01/01/70 00:00      
                                                               Lacks words for me!            01/01/70 00:00      
                                                                  You need more levels.            01/01/70 00:00      
                                                                  See previous suggestions!            01/01/70 00:00      
                                                            only 32 words            01/01/70 00:00      
                                                            what is "nice sequence"? and for what purpose?            01/01/70 00:00      
                                                            A Color Sequence            01/01/70 00:00      
                                                               Gives color jumps            01/01/70 00:00      
                                                                  Missing backslash in previous post            01/01/70 00:00      
                                                                  Look at the example cited earlier            01/01/70 00:00      
                                                                     not a good one            01/01/70 00:00      
                                                                        Starting point?            01/01/70 00:00      
                                                                           my thought is            01/01/70 00:00      
                                                                              Did I get you?            01/01/70 00:00      
                                                                                 sort of            01/01/70 00:00      
                                                                                    Thanks!            01/01/70 00:00      
                                                                                    You are so full of yourself...            01/01/70 00:00      
                                                                                       "web safe" colors available in standard VGA color palette            01/01/70 00:00      
                                                                                          right, you compensate for this by ...            01/01/70 00:00      
                                                                                             Note that candela hides the eyes spectral response            01/01/70 00:00      
                                                                                                true, and            01/01/70 00:00      
                                                                                                   But he doesn't want his solution to be better - just differe            01/01/70 00:00      
                                                                                                      I give up suggesting better and simpler ...            01/01/70 00:00      
                                                                                       with "binary weighing" he gets 32738 colors            01/01/70 00:00      
                                                                                          Number of colors            01/01/70 00:00      
                                                                                             for a LED sign: none            01/01/70 00:00      
                                                                                             Solve modulation first, then bother about constant-intensity            01/01/70 00:00      
                                                                                                not if you do as I suggested            01/01/70 00:00      
                                                                                                   You'll see a lot if slow-stepping changes            01/01/70 00:00      
                                                                                       How naive I was...            01/01/70 00:00      
                                                                                          I do not know, but ...            01/01/70 00:00      
                                                                                             I still say...            01/01/70 00:00      
                                                                                          Everything depends on needs - simplification often ok            01/01/70 00:00      
                                                                                             Gamma            01/01/70 00:00      
                                                                                             If I were Chico...            01/01/70 00:00      
                                                                     Another Color Sequence...            01/01/70 00:00      
                                                                        Yet another sequence...            01/01/70 00:00      
                                                                           another (better) approach            01/01/70 00:00      
                                                               Oops....Sawtooth File Deleted            01/01/70 00:00      
                                                                  On its way...            01/01/70 00:00      
                                                                     Received and RePosted            01/01/70 00:00      
                                                                        RE: wake up the cat            01/01/70 00:00      
                                                                           Walking the RGB cube as described earlier            01/01/70 00:00      
                                                                              the way to do it            01/01/70 00:00      

Back to Subject List