The function of decomposing color into shades. - page 16

 
Реter Konow:

It's like you're not hearing it on purpose. How does this video prove that the algorithm is yours? How does it prove you didn't borrow it? If you had laid out your concept of colour, and explained the nuances of the solution...

But no.

Peter, I am not explaining you the concept of colour, simply because this question puts me in a stupor, as you would be put in a stupor by my question to you "Peter, prove that two times two is four".

 
Artyom Trishkin:

I am always silent here. I'm interested.

Out of the corner so to speak...

Nah. It's a bad habit to stand around corners. Come out, don't be embarrassed. Get involved. But only on the subject. All right?

 
Реter Konow:

Nah. It's a bad habit to stand around the corner. Come out, don't be embarrassed. Get involved. But only on the subject. All right?

No. There's plenty of other work to do. It's all planned out ahead of time. But I bookmarked the gradient function from Nikolai.

 
Nikolai Semko:

Peter, I'm not explaining the concept of colour to you, simply because the question confuses me, as it would confuse you if I asked you "Peter, prove that two times two is four".

(laughs) Okay. Don't be confused. ))) Yours, not yours, is your own business. But I have to say thank you. You've definitely helped me out. Now I have the opportunity to visualize my algorithm's work. Otherwise, I would have had to do everything myself ...)) So - merci.

 
Artyom Trishkin:

No. There's plenty of other work. I've got a lot of work to do. But the gradient function from Nikolai - stolen into my bookmarks.

Have you tried getting a job as an "annoying factor"? You have a talent for it.)

 
Реter Konow:

Have you tried getting a job as an "annoying factor"? You have a talent for it.)))

No problem. How much will you pay? Not only can I look around corners, but I can also cough in the right places for a fee.

 
Artyom Trishkin:

No problem. How much will you pay? Not only can I look around corners, but I can also cough in the right places for a fee.

Well, it's piecework.)) It all depends on the effect. You need to piss a man off, for example. You need to fuel the fire. Emotionally destabilizing. Can you do that?)

 
Реter Konow:

It's like you're not hearing it on purpose. How does this video prove that the algorithm is yours? How does it prove you didn't borrow it? If you had laid out your concept of colour, and explained the nuances of the solution...

But no.

I've already thrown you the code of a very simple function, which has the most practical value in this thread:

void Gradient(uint clr1,uint clr2,uint &arr[],uint size)
  {
   if(size==0) return;
   ArrayResize(arr,size);
   rgb c1,c2;
   c1.clr=clr1;
   c2.clr=clr2;
   double R1=c1.c[2],G1=c1.c[1],B1=c1.c[0];
   double R2=c2.c[2],G2=c2.c[1],B2=c2.c[0];
   double deltaR=(R2-R1)/(size-1);
   double deltaG=(G2-G1)/(size-1);
   double deltaB=(B2-B1)/(size-1);
   for(uint i=0;i<size;i++)
     {
      R1+=deltaR; c1.c[2]=uchar (R1+0.4999);
      G1+=deltaG; c1.c[1]=uchar (G1+0.4999);
      B1+=deltaB; c1.c[0]=uchar (B1+0.4999);
      arr[i]=c1.clr;
     }
  }

there are two colours (R1,G1,B1) and (R2,G2,B2)

The task is to create an array of N (size) colours, smoothly flowing from one colour to another.

What is so complicated?

Each colour R,G and B with each step changes on own delta.

For example for red colour the delta is equal

deltaR=(R2-R1)/(size-1);

Everything. That is the whole concept.

It feels like you fundamentally don't want to understand code that's not written in your style.

 
Nikolai Semko:

I've already dumped you the code of a very simple function, which has the most practical value in this branch:

there are two colours (R1,G1,B1) and (R2,G2,B2)

The task is to create an array of N (size) colours, smoothly flowing from one colour to another.

What is so hard?

Each colour R,G and B with each step changes on own delta.

For example for red colour the delta is equal

Everything. That is the whole concept.

I get the feeling that you don't want to understand code that isn't written in your style.

Tell me more about the delta. Why. How. Then I'll know you made it up yourself.

 
Реter Konow:

Well, it's piecework.)) It all depends on the effect. You need to piss a man off, for example. You need to fuel the fire. Emotionally destabilizing. Can you do that?)

No. I'm the opposite of an anti-troll. Okay, I'll be breathing over your shoulder on a pro-bono basis.