Generate cylinder with custom axis

버전 1.1.0.0 (2.46 KB) 작성자: Álvaro Romero Calvo
Forms the unit cylinder given a symmetry axis and a generator curve
다운로드 수: 722
업데이트 날짜: 2017/8/6

라이선스 보기

This contribution improves an existing Matlab function, CYLINDER, by adding the possibility of defining a custom symmetry axis.
CYLINDER2 Generate cylinder with custom axis

[X,Y,Z] = CYLINDER2(R,D,N) forms the unit cylinder based on the symmetry axis D and the generator curve in the vector R. Vector R contains the radius at equally spaced points along the unit height of the cylinder. D is a vector that defines the direction of the symmetry axis. The cylinder has N points around the circumference.

[X,Y,Z] = CYLINDER2 default to R = [1 1], D = [0,0,1] and N = 20

[X,Y,Z] = CYLINDER2(R) default to D = [0,0,1] and N = 20

[X,Y,Z] = CYLINDER2(R,D) default to N = 20

SURF(X,Y,Z) displays the cylinder.

Omitting output arguments causes the cylinder to be displayed with a SURF command and no outputs to be returned.

CYLINDER2(AX,...) plots into AX instead of GCA.

Álvaro Romero Calvo 08-05-17
Partially based on MATLAB function cylinder by Clay M. Thompson
(4-24-91, CBM 8-21-92. Copyright 1984-2002 The MathWorks, Inc)

인용 양식

Álvaro Romero Calvo (2025). Generate cylinder with custom axis (https://kr.mathworks.com/matlabcentral/fileexchange/64007-generate-cylinder-with-custom-axis), MATLAB Central File Exchange. 검색 날짜: .

MATLAB 릴리스 호환 정보
개발 환경: R2006a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Labels and Annotations에 대해 자세히 알아보기
도움

도움 준 파일: Rotate surf input matrices

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.1.0.0

Minor error with narginchk corrected.

1.0.0.0