Skip to content

Commit 52a0483

Browse files
committed
readme fixes
1 parent 414de99 commit 52a0483

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,8 @@ u = pygalmesh.Difference(s0, s1)
137137
a = np.sqrt(radius ** 2 - displacement ** 2)
138138
max_edge_size_at_feature_edges = 0.15
139139
n = int(2 * np.pi * a / max_edge_size_at_feature_edges)
140-
alpha = np.linspace(0.0, 2 * np.pi, n, endpoint=False)
141-
circ = a * np.column_stack([np.zeros(n), np.cos(alpha), np.sin(alpha)])
142-
circ.append(circ[0])
140+
alpha = np.linspace(0.0, 2 * np.pi, n + 1)
141+
circ = a * np.column_stack([np.zeros(n + 1), np.cos(alpha), np.sin(alpha)])
143142

144143
mesh = pygalmesh.generate_mesh(
145144
u,
@@ -317,7 +316,9 @@ class Schwarz(pygalmesh.DomainBase):
317316
super().__init__()
318317

319318
def eval(self, x):
320-
x2, y2, z2 = np.cos(x * 2 * np.pi)
319+
x2 = np.cos(x[0] * 2 * np.pi)
320+
y2 = np.cos(x[1] * 2 * np.pi)
321+
z2 = np.cos(x[2] * 2 * np.pi)
321322
return x2 + y2 + z2
322323

323324

0 commit comments

Comments
 (0)