MCPcopy Create free account
hub / github.com/Meshcapade/difflocks / spline_strand

Function spline_strand

utils/strand_util.py:154–161  ·  view source on GitHub ↗
(strand, num_strand_points=100)

Source from the content-addressed store, hash-verified

152 return length, delta_length
153
154def spline_strand(strand, num_strand_points=100):
155 num_ori_points = strand.shape[0]
156 interp_spline = splines.CatmullRom(strand)
157 interp_idx = np.arange(num_strand_points) / (num_strand_points / (num_ori_points - 1))
158 interp_strand = interp_spline.evaluate(interp_idx)
159 assert interp_strand.shape[0] == num_strand_points, "Spline error."
160
161 return interp_strand
162
163
164def pad_strand(strand, num_strand_points=100):

Callers

nothing calls this directly

Calls 1

evaluateMethod · 0.80

Tested by

no test coverage detected