Original Post
Hi, So far, I've been using my Vector3D class for storing both "geometric" vectors *and* RGB colors. This class neatly implements such operations as plus and minus. It also defines the dot product through multiplication, ie. a*b = a.x*b.x + a.y*b.y + a.z*.z This is all basic for geometric vectors. But for colors, the dot product seems rather "artifical". There are often times when we have two colors, and we want to get a frequency-to-frequency multiplication of them. In practical terms, this would be: a*b = Vector3D( a.x*b.x, a.y*b.y, a.z*b.z ) However, the multiplication is already reserved for dot product, so I'm currently defining a following operation: Vector3D ComponentMul( Vector3D& a, Vector3D& b ) { return Vector3D(a.x*b.x, a.y*b.y, a.z*b.z); } But recently I thought that I could, perhaps, store color information in a Spectrum class. This would not necessarily even have to be plain RGB! I thought RGB would be a realistic choice though. Then, for the spectrum class, we could define the multiplication as convenient for spectra (frequency-to-frequency): a*b = SpectrumRGB( a.r*b.r, a.g*b.g, a.b*b.b ); Now my Only Question here is: 1.) Does this kind of multiplication on spectrums have any kind of "theoretical background", ie. is it a common operation to multiply two spectra this way? - Mikko