Elliptic Curves are used in public key cryptograpy to create relatively short encryption keys. They are in the form of \(y^2 = x^3 + ax + b\). This page outlines a plot for elliptic curve. The initial plot is \(y^2=x^3 - 3 x + 5\):
Elliptic curve |
Source code
The following outlines the Python code used:
import numpy as np import matplotlib.pyplot as plt import sys a = -3 b = 5 file1 ='1111' y, x = np.ogrid[-5:5:100j, -5:5:100j] plt.contour(x.ravel(), y.ravel(), pow(y, 2) - pow(x, 3) - x * a - b, [0]) plt.grid() plt.savefig(file1) plt.show() print ("Saving to ",file1)