thick_line(x,y,thic​kness)

バージョン 1.2.0.0 (2.74 KB) 作成者: Robert
Generates the edge coordinates of a thick line corresponding to an input line
ダウンロード: 436
更新 2015/5/11

ライセンスの表示

This function returns the coordinates that outline the thick line surrounding an input line at a fixed distance. For an intuitive sense, think of tracing a thin, pencil-drawn line with a thick marker.
The input line is defined by ordered x and y coordinates. The output coordinates are all a specified distance from the closest part of the specified input line. The output is formatted to be used with the patch command.
Each vertex is surrounded by a circle (approximated by a many-sided polygon), and the line segments with rectangle. The polygons are joined with polybool('union',...) from the mapping toolbox.
For example:
cla
axis([0,10,0,10])
axis equal
[x,y] = ginput();
plot(x, y, '*-')
[x_out, y_out] = thick_line(x, y, 0.5);
p_obj = patch(x_out, y_out, [0.7, 0.1, 0.1]);
set(p_obj, 'FaceAlpha', 0.5)

引用

Robert (2025). thick_line(x,y,thickness) (https://www.mathworks.com/matlabcentral/fileexchange/50816-thick_line-x-y-thickness), MATLAB Central File Exchange. に取得済み.

MATLAB リリースの互換性
作成: R2013a
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux
カテゴリ
Help Center および MATLAB AnswersROI-Based Processing についてさらに検索
タグ タグを追加
謝辞

ヒントを得たファイル: 2D Line Curvature and Normals

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
バージョン 公開済み リリース ノート
1.2.0.0

Made note of poly2fv method for displaying thick-lines from lines that intersect themselves

1.1.0.0

Added image to submission

1.0.0.0