About
Hello world!
Contents
CodeBlock
demo_python.py
10import pytool
11import numpy as np
12import matplotlib.pyplot as plt
13
14# =====================generate Ellipse=====================
15a = 6 # major axis
16b = 2 # minor axis
17x0 = 10 # center x0
18y0 = 10 # center y0
19N = 1000 # number of points
20
21# angle for rotating ellipse data
22theta = np.pi * 30 / 180
23
24x, y = pytool.ellipse_surface(a, b, x0, y0, N, 'rand')
25
26x = x - np.mean(x)
27y = y - np.mean(y)