Reputation: 25
I want to plot an elliptic curve over a finite field using sage mathematical interface with the following commands:
p=2^255-19;
F=Finite Field(p);
C=Elliptic Curve(F,[0,486662,0,1,0]);
plot(C, aspect_ratio = 1);
However due to the size of the curve this generates the error:
'OverflowError: range() result has too many items'.
How can i resolve this problem, or is there any other method to plot this curve?
Upvotes: 1
Views: 621
Reputation: 4402
Think about this result:
sage: len(C.points())
<same error>
Your elliptic curve just has too many points for Python to deal with, much less to plot. What I would suggest is to start by getting a few points and then using the group law to generate a sample of points and plot that. I don't know if you'll be able to do that with "out of the box" behavior or if you'll have to imitate the code in sage/schemes/elliptic_curves/ell_finite_field.py in _points_via_group_structure(self)
as in the traceback. Good luck!
Upvotes: 2