Plot 2D Spring

버전 1.0.1 (3.79 KB) 작성자: Xue-She Wang
Easily generate coordinates of 2D springs for plotting and animation.
다운로드 수: 229
업데이트 2018/11/21

--------------------------------- Tutorial ---------------------------------

'Spring.m' is a class file which generates coordinates of a 2D spring for plotting. A new spring instance can be created by passing 'spring radius' and 'number of coils'. For example:
```
spr = Spring(5, 10);
```
creates a spring instance `spr` with radius of 5 and coils number of 10. This instance gives coordinates of a spring connecting two arbitrary points by passing the coordinates of the two points into 'spr.getSpr(point1, point2)'. For example:
```
[x, y] = spr.getSpr([-1, 5], [4, 2]);
```
returns the coordinates of the spring connecting point (-1, 5) and point (4, 2), and then you could simply visualize the spring by using:
```
plot(x, y);
```
More details can be found in the demo files.

--------------------------------- Demo Files ---------------------------------

--- demo_StaticSpring.m ---

This demo file plots a simple static spring connecting two arbitrary points.

--- demo_MovingSpring.m ---

This demo file makes an animation of three moving points connectted by two different springs.

인용 양식

Xue-She Wang (2026). Plot 2D Spring (https://github.com/wangxueshe/Plot-2D-Spring-in-Matlab), GitHub. 검색 날짜: .

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

GitHub 디폴트 브랜치를 사용하는 버전은 다운로드할 수 없음

버전 게시됨 릴리스 정보
1.0.1

Picture updated.

1.0.0

이 GitHub 애드온의 문제를 보거나 보고하려면 GitHub 리포지토리로 가십시오.
이 GitHub 애드온의 문제를 보거나 보고하려면 GitHub 리포지토리로 가십시오.