A D3 Gem Calculator Ported from C#