绘制此图的公式是什么?

问题描述

R G B正弦波的公式是什么?它们都以相同的开始,但是随着它们的前进会稍微偏移。

RGB wavelengths

解决方法

我完全遵循this页,并使用Paint来测量必要的变量

enter image description here

# For Blue
A =  0.5
B =  2*pi/0.328
C = -0.08
D =  0.5
Blue(x) = 0.5 * sin(2*pi/0.328 * (x - 0.08)) + 0.5

# For Green
A =  0.5
B =  2*pi/0.382
C = -0.095
D =  0.5
Green(x) = 0.5 * sin(2*pi/0.382 * (x - 0.095)) + 0.5

# For Red
A =  0.5
B =  2*pi/0.5
C = -0.12
D =  0.5
Red(x) = 0.5 * sin(2*pi/0.5 * (x - 0.12)) + 0.5

当我绘制此函数时,结果与您的图像非常相似 enter image description here