Filling the area within the three lines with color

1 回表示 (過去 30 日間)
Berke Ogulcan Parlak
Berke Ogulcan Parlak 2019 年 10 月 21 日
回答済み: Berke Ogulcan Parlak 2019 年 10 月 21 日
close all
clear all
clc
a=2; %a link length
b=5; %b link length
P1=[0,0];
axis([-2,7,-2,3]);
theta=pi/2;
alfa=asin(a*sin(theta)/b);
P2=a*[cos(theta),sin(theta)];
P3=[(a*cos(theta)+b*cos(alfa)),0];
crank=line([P1(1),P2(1)],[P1(2),P2(2)]);
slider=line([P2(1),P3(1)],[P2(2),P3(2)]);
ground=line([P1(1),P3(1)],[P1(2),P3(2)]);
1.png
How do I fill the area inside the Crank-Slider-Ground lines with color?

回答 (1 件)

Berke Ogulcan Parlak
Berke Ogulcan Parlak 2019 年 10 月 21 日
Thank you, but in the case of 90 <theta <270, I can't get results. (F.e. Theta = 100 deg)
100.png

カテゴリ

Help Center および File ExchangeAssembly についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by