Quantcast
Channel: Reprap Forum - Firmware - Marlin
Viewing all articles
Browse latest Browse all 12089

Re: Diamond Hotend M163 - Set Mix Factor

$
0
0
Ok nobody knows LOL.

So I've done a math to get the convertion from RGB to M163 mix factor and also from CMY to M163.

RGB to M163 mix
===============
Example: RGB (240, 186, 173)

Rv = R/256 = 0,9375
Gv = G/256 = 0,7265625
Bv = B/256 = 0,67578125

Tv = Rv+Gv+Bv = 2,33984375
Tf = 100 / Tv = 42,73

Rp = Rv * Tf = 40,05%
Gp = Gv * Tf = 31,04%
Bp = Bv * Tf = 28,87%

In Marlin:
M163 S0 P0.40
M163 S1 P0.31
M163 S2 P0.29 Rounded to 0.29 so the total sum will be 1 (100%)
M164 S5

Now the CMY to M163 Mix
=====================
Example: CMY (6, 27, 32)

Cv = C/100 = 0,06
Mv = M/100 = 0,27
Yv = Y/100 = 0,32

Tv = Cv+Mv+Yv = 0,65
Tf = 100 / Tv = 153,84...

Cp = Cv * Tf = 9,23%
Mp = Mv * Tf = 41,53%
Yp = Yv * Tf = 49,23%

In Marlin:
M163 S0 P0.09
M163 S1 P0.42 Rounded to 42 so the total sum will be 1 (100%).
M163 S2 P0.49
M164 S5

========

Now I have to test this thing...

Viewing all articles
Browse latest Browse all 12089

Trending Articles