No announcement yet.

There's no purple in the rainbow?

  • Filter
  • Time
  • Show
Clear All
new posts

  • There's no purple in the rainbow?

    I tried to make a color-spectrum, but somehow i always get this disturbing gap between blue and red instead of violet and purple. Can anyone please help?
    Attached Files

  • #2
    i am not normal, no really.


    • #3
      i am not normal, no really.


      • #4
        well btw i got purple just not green lol
        i am not normal, no really.


        • #5
          thanks. but that was not quite my question. I've got more a "thechnical" avs problem here, I was wondering, why the colors merge correctly into each other, except from blue to red. Got any idea?


          • #6
            I saw violet in a preset(don't remember which), I don't know if it's a legitimate AVS color, but you could try it.

            I'm going to fiddle around with this some, and see what I cand do(if anything).

            Minor Fiddling around, nothing fancy.

            Grr, one step forward and two steps back. It's not really what you want, but channel shift placed beneath the ssc will give you violet Unfortunately, it only shifts the problem. Yellow and orange are now absent

            I'm off to tinker some more
            Last edited by Nolita; 29 November 2004, 08:47.


            • #7
              deleted/ incorrect info. will look for an example when I'm at home
              Jesus loves you [yes, you] so much, he even died for you so that you will not need to die, but live forever


              • #8
                I think I found some possible help. In Pak-9's AVS 4 SE pack, there's a preset called "Collaborations - Montana vs Pack-9 - Winterkitten." It contains a rainbow with sort of a purple mist swirling around it. There isn't a single color map in the whole darned thing, no invert either. There are however,
                7 superscopes, + several other elements/apes at work.

                Unless somebody more experienced has your answer, and can give it to you off the top of their head, I'm going to try and isolate, what makes the purple. I'm almost positive your scope needs more code. What I'm not sure of is whether or not you will need at least one more ssc to make the effect you want.


                • #9
                  Quick disclaimer, since I'm still very new, I don't know how much this will help, but it's from the preset I was telling you about.
                  • init
                    p=acos(-1); n=128;
                  • frame
                  • beat
                  • point
                    r=i*p-p*0.5; d=0.2;
                    x=af*sin(r)*d; y=-cos(r)*d+0.25;
                    red=c*0.75; green=0; blue=c*0.9;

                  That makes a purple arc.


                  • #10
                    - Don't use linesize=h for a fullscreen gradient since linesize is capped at 256, there for your gradient will "break" after that and most of the people do use taller window size than 256. Instead center the line at the y-axis and then just use a movement with y=0.

                    - If you use a numpoint value that depends on the screen size it is best to define it per frame, that way it will have enough points even if the user changes the resolution without reloading the preset (entering fullscreen for example).

                    - The AVS window goes from -1 to 1 on both x & y axis, so when you define x=(i-0.5)*3 it ranges from -1.5 to 1.5 and there for you're drawing stuff that's outside the screen.

                    Oh and here's a simple method for doing a rainbow gradient, but im too lazy to explain it.
                    (gah, fine, so i can't explain it satisfied? )
                    Attached Files
                    Texer Resources

                    Im retarded... err i mean retired!
                    Probably both...


                    • #11
                      thank you all for your efforts! I've got a free minute right now, so i can work through your tips! Hopefully i'll get it to work...
                      @ nolita: i remember this preset but infortunately the rainbow is rendered by a few sperated lines, so i cannot (or am to stupid to) use it.

                      Sorry, tug, for those "noobish mistakes".
                      Normally i do use just a single-line scope + y=0 movement and i keep (i-0.5)*2..., but since i was concentrated on the color code on this one i didn't pay attention to formality.

                      However, it's just what i was looking for. But you have to explain one thing: why do you add 2.07 / 4.14?? I changed the values in my code from $pi/2 and $pi to yours and voilá: it works!! Any idea??


                      I got it!!!
                      2.07 is roughly 2/3 * $pi (so 4.14 is 4/3 * $pi). So i just shifted the color phases by the wrong values. Damn! How stuuupid!!!


                      • #12
                        Guess I'm too late, but here it is anyway
                        Attached Files
                        Jesus loves you [yes, you] so much, he even died for you so that you will not need to die, but live forever


                        • #13
                          Thanks for this one too!
                          It also illustrates the "technical background of the color spectrum. (The three sinus-waves: red green and blue, and the amount their phases are shifted against each other).
                          Nice work!


                          • #14

                            I'm happy the violet question has been answerred. Only now I'm lost again. In Tuggummi's spectrum the following code is used for the color:

                            red=sin(ipi+2.07+t)*intes+bright ;
                            green=sin(ipi+4.18+t)*intes+bright ;

                            It introduces terms/variables to code that I hadn't seen before. intes+bright ; I have to ask, are there other terms that I would never think to include in code? Is there a place where I can find a list of these "unconventional" terms/variables? Mind you I'm not entirely sure variable is the right word. I searched and searched, even using words like tutorial, list, and variables.

                            BTW, just from a single color perspective, I'm trying a theory of any color being possible by converting hex to rbg. I have no idea if it will work though


                            • #15
                              Correct me if I'm wrong, don't you just have to use the hue saturation and lumenise(sp) color values then convert them into red green and blue?