Skip to content

Commit 120efff

Browse files
Remove commented out code
1 parent ed9244b commit 120efff

File tree

1 file changed

+0
-46
lines changed

1 file changed

+0
-46
lines changed

parcels/uxgrid.py

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -157,49 +157,3 @@ def _lonlat_rad_to_xyz(
157157
z = np.sin(lat)
158158

159159
return x, y, z
160-
161-
162-
# def _barycentric_coordinates_cartesian(nodes, point, min_area=1e-8):
163-
# """
164-
# Compute the barycentric coordinates of a point P inside a convex polygon using area-based weights.
165-
# So that this method generalizes to n-sided polygons, we use the Waschpress points as the generalized
166-
# barycentric coordinates, which is only valid for convex polygons.
167-
168-
# Parameters
169-
# ----------
170-
# nodes : numpy.ndarray
171-
# Cartesian coordinates (x,y,z) of each corner node of a face
172-
# point : numpy.ndarray
173-
# Cartesian coordinates (x,y,z) of the point
174-
175-
# Returns
176-
# -------
177-
# numpy.ndarray
178-
# Barycentric coordinates corresponding to each vertex.
179-
180-
# """
181-
# n = len(nodes)
182-
# sum_wi = 0
183-
# w = []
184-
185-
# for i in range(0, n):
186-
# vim1 = nodes[i - 1]
187-
# vi = nodes[i]
188-
# vi1 = nodes[(i + 1) % n]
189-
# a0 = _triangle_area_cartesian(vim1, vi, vi1)
190-
# a1 = max(_triangle_area_cartesian(point, vim1, vi), min_area)
191-
# a2 = max(_triangle_area_cartesian(point, vi, vi1), min_area)
192-
# sum_wi += a0 / (a1 * a2)
193-
# w.append(a0 / (a1 * a2))
194-
195-
# barycentric_coords = [w_i / sum_wi for w_i in w]
196-
197-
# return barycentric_coords
198-
199-
200-
# def _triangle_area_cartesian(A, B, C):
201-
# """Compute the area of a triangle given by three points."""
202-
# d1 = B - A
203-
# d2 = C - A
204-
# d3 = np.cross(d1, d2)
205-
# return 0.5 * np.linalg.norm(d3)

0 commit comments

Comments
 (0)