source 2015 Bernstein--Chuengsatiansup--Kohel--Lange "Twisted Hessian curves" parameter w assume w^2+w+1 = 0 parameter f assume f d^3 = 27 a parameter 3overd assume d 3overd = 3 compute R = a X1 X1^2 compute V = Y1 Y1^2 compute S = Z1 Z1^2 compute wS = w S compute wV = w V compute wSV = wS - wV compute F = R + S + V compute G = R + wSV - V compute H = R - S - wSV compute A = F F^2 compute B = A - f A compute C = G G^2 compute D = H H^2 compute wC = w C compute wD = w D compute wCD = wC - wD compute X3 = 3overd (B + C + D) compute Y3 = B + wCD - D compute Z3 = B - C - wCD