MCPcopy Create free account
hub / github.com/Apress/python-for-matlab-development / circle

Function circle

pythran/fem/main.py:97–102  ·  view source on GitHub ↗
(N, R)

Source from the content-addressed store, hash-verified

95 # https://rufat.be/triangle/examples.html
96 # effective: qpa0.1
97 def circle(N, R):
98 i = np.arange(N)
99 theta = i * 2 * np.pi / N
100 pts = np.stack([np.cos(theta), np.sin(theta)], axis=1) * R
101 seg = np.stack([i, i + 1], axis=1) % N
102 return pts, seg
103
104 pts0, seg0 = circle(30, 1.4)
105 pts1, seg1 = circle(16, 0.6)

Callers 1

torus_modelFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected