// Demonstration and test of solving systems of equations. use Solver.frink symbolicMode[true] showApproximations[false] // Inverting the YCbCr equations. (Luminance/Chrominance.) // http://en.wikipedia.org/wiki/YCbCr ycbcr = new Solver[[ Y === 0.299 R + 0.587 G + 0.114 B, Cr === 0.500 R - 0.419 G - 0.081 B, Cb === -0.169 R - 0.331 G + 0.500 B], []] println["All solutions:"] println[join["\n", ycbcr.solveAll[]]] println[join["\n", ycbcr.solveFor["R"]]] println[join["\n", ycbcr.solveFor["G"]]] println[join["\n", ycbcr.solveFor["B"]]]