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

Function circle

code/rod_fem/pure_python/make_mesh.py:368–373  ·  view source on GitHub ↗
(N, R)

Source from the content-addressed store, hash-verified

366 # https://rufat.be/triangle/examples.html
367 # effective: qpa0.1
368 def circle(N, R):
369 i = np.arange(N)
370 theta = i * 2 * np.pi / N
371 pts = np.stack([np.cos(theta), np.sin(theta)], axis=1) * R
372 seg = np.stack([i, i + 1], axis=1) % N
373 return pts, seg
374
375 pts0, seg0 = circle(30, 1.4)
376 pts1, seg1 = circle(16, 0.6)

Callers 1

torus_modelFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected