# trimesh.path.curve

trimesh.path.curve.binomial(n)

Return all binomial coefficients for a given order.

For n > 5, scipy.special.binom is used, below we hardcode.

Parameters

n (int) – Order of binomial

Returns

binom – Binomial coefficients of a given order

Return type

(n + 1,) int

trimesh.path.curve.discretize_bezier(points, count=None, scale=1.0)
Parameters
• points ((order, dimension) float) – Control points of the bezier curve For a 2D cubic bezier, order=3, dimension=2

• count (int, or None) – Number of segments

• scale (float) – Scale of curve

Returns

discrete – Points forming a a polyline representation

Return type

(n, dimension) float

trimesh.path.curve.discretize_bspline(control, knots, count=None, scale=1.0)

Given a B-Splines control points and knot vector, return a sampled version of the curve.

Parameters
• control ((o, d) float) – Control points of the b- spline

• knots ((j,) float) – B-spline knots

• count (int) – Number of line segments to discretize the spline If not specified will be calculated as something reasonable

Returns

discrete – Points on a polyline version of the B-spline

Return type

(count, dimension) float
{"ft_lang_label":"__label__en","ft_lang_prob":0.5147584,"math_prob":0.9894419,"size":1159,"snap":"2021-43-2021-49","text_gpt3_token_len":310,"char_repetition_ratio":0.12294372,"word_repetition_ratio":0.03468208,"special_character_ratio":0.24849008,"punctuation_ratio":0.1627907,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9986628,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-10-27T03:17:17Z\",\"WARC-Record-ID\":\"<urn:uuid:67afd117-c798-4eee-a65d-362e33b9d6c0>\",\"Content-Length\":\"17821\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:3d121dca-5fda-495e-a385-d07cabed2827>\",\"WARC-Concurrent-To\":\"<urn:uuid:7ce333a4-d1a1-4452-8b4a-b4e22baf2d21>\",\"WARC-IP-Address\":\"104.21.29.63\",\"WARC-Target-URI\":\"https://trimsh.org/trimesh.path.curve.html\",\"WARC-Payload-Digest\":\"sha1:PAWHD7IJ5BILMDJUHQKKS47XGCNHMJUP\",\"WARC-Block-Digest\":\"sha1:3IMBRNHQF62YEAFJGLQ44RHX3YH7WAYH\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-43/CC-MAIN-2021-43_segments_1634323588053.38_warc_CC-MAIN-20211027022823-20211027052823-00171.warc.gz\"}"}