필터 지우기
필터 지우기

How to create line connects between two semi circles?

조회 수: 5 (최근 30일)
sila
sila 2024년 5월 12일
답변: Star Strider 2024년 5월 15일
% Define parameters of the arc.
xCenter = 2;
yCenter = 1;
radius = -5;
% Define the angle theta as going from 30 to 150 degrees in 100 steps.
theta = linspace(10, 170, 100);
% Define x and y using "Degrees" version of sin and cos.
x = radius * cosd(theta) + xCenter;
y = radius * sind(theta) + yCenter;
% Now plot the points.
plot(x, y, 'b-', 'LineWidth', 2);
axis equal;
grid on;
I figured out how to make the down semi circle and the upper one but I couldn't know how to make the connecting line of the two semi circles to get the tooth profile as I am doing try and error to make development of arc tooth
  댓글 수: 2
John D'Errico
John D'Errico 2024년 5월 13일
A little confusing, as there are actually 4 semicircles I see in that drawing. And in fact, they are not even semi-circles, but just partial circular arcs as you are creating them.
I THINK what you are asking is how to choose the parameters of those 4 semi-circles to take on the shape you want, and then to draw a line that connects the end points of those circle fragments to connect smoothly between them. But that is not at all clear from your question, and I probably have it wrong.
sila
sila 2024년 5월 13일
Yes that what i meant i want to write a code that have a relation of them to be able to choose the best 4 arcs and the line connects them also

댓글을 달려면 로그인하십시오.

답변 (2개)

Image Analyst
Image Analyst 2024년 5월 12일
You can use line to draw a line below the lower semi circle.

Star Strider
Star Strider 2024년 5월 15일
I finally got this to work yesterday —
If you’re interested, I’ll post my code
.

카테고리

Help CenterFile Exchange에서 Graphics에 대해 자세히 알아보기

제품


릴리스

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by