grazing goat problem, how much of the area can the goat graze ?

12 ビュー (過去 30 日間)
pauli relanderi
pauli relanderi 2021 年 10 月 16 日
編集済み: DGM 2021 年 10 月 16 日
Hello !
Im just wondering does anyone know how would i go about solving this in matlab
How much of the fields area can it reach to eat ?
when
r is 0.8 %goats leash
R is 1 %the big circler radius
ive tried calculations i found online and got nowhere
This is what ive gotten
clear all
clc
r=0.8
R=1
d=R
alfa=acos(r./(2.*R))
A=(r.^2-(2.*R.^2)).*alfa+R.^2.*pi-R.^2.*sin(2*alfa)
Buts this gets me answer of 0.8318 which is too much it should be around 2-3, atleast i think it should
  1 件のコメント
Star Strider
Star Strider 2021 年 10 月 16 日
What is the problem statement, and the goat’s constraints (other than the leash length)?

サインインしてコメントする。

採用された回答

DGM
DGM 2021 年 10 月 16 日
編集済み: DGM 2021 年 10 月 16 日
Your answer is reasonable. As a point of verification:
rf = 1;
rg = 0.8;
% intersection point locations
% could also use circcirc()
xint = (2*rf^2 - rg^2)/(2*rf);
yint = sqrt(rf^2 - xint^2);
% sector areas
secareaf = rf^2 * asin(yint/rf);
secareag = rg^2 * asin(yint/rg);
% sum of triangle areas
triarea = yint*(xint + sqrt(rg^2 - rf^2 + xint^2));
% total area
totalarea = secareaf + secareag - triarea
totalarea = 0.8318
Furthermore, it's helpful to check things visually. Consider the simplified case where rf = 1 and rg = 1.
Given that the area of either circle = pi, then visually we know Aintersection < pi/2 ~ 1.5708
and considering the inscribed triangles, we know Aintersection > sqrt(3)/2 ~ 0.8660
Running the above code for this second case gives a result of 1.2284, which is indeed within those boundaries. Looking back at the original problem with the smaller rg, we should expect Aintersection to be correspondingly smaller than 1.2, even if the geometry becomes less obvious.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCartesian Coordinate System Conversion についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by