Bill Allombert on Fri, 28 Mar 2025 10:56:01 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: question on converting general cubic equations to Weierstrass format


On Thu, Mar 27, 2025 at 08:35:33PM -0700, American Citizen wrote:
> Recent changes in GP-Pari has unfortunately rendered my code relating to
> cuboids (body/edge/face) non-functional as testing has found out today.

Which changes ? Are you sure it is not a variable ordering issue ?
Try using x and y instead of X and Y.

> For example, exploring body cuboids, I have the general cubic equation
> (where a,b is found from a Pythagorean ratio r, such as r = 3/4, i.e. a=3
> and b=4 where a is the numerator of r and b is the denominator of r.
> 
> B(a,b) = 0 * X^3 - 4*a*b * X^2*Y + 2*(a^2-b^2) * X*Y^2 + 0 * Y^3 + 0 * X^2*Z
> + 2*(b^2+2*a*b-a^2) * X*Y*Z + 0 * Y^2*Z + 0 * X*Z^2 + 0 * Y*Z^2 + 0 * Z^3

ellfromeqn expect an affine model, so you need to set Z to 1.
But this is not a genus-1 curve.
The Weierstrass form is [-2*a^2+4*b*a+2*b^2,0,0,0,0]

Cheers,
Bill.