How to remove or exclude the intersecting part from two intersecting or overlaping spheres using Matlab?

4 ビュー (過去 30 日間)
Hi everyone,
i have two spheres of radii R1 and R2 with centers C1 and C2 intersecting each others. i want to exclude the intersecting part. How to remove it to get new object like peanut. i used following code to get interseting spheres.
  3 件のコメント
darova
darova 2020 年 4 月 2 日
Thank you for sharing your thoughts with us!
M.S. Khan
M.S. Khan 2020 年 4 月 2 日
Thanks Mr. John for your kind feedback and guidance. Warm regards!

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

採用された回答

darova
darova 2020 年 4 月 1 日
Here is what i invented
ix1 = (xc1-x2).^2+(yc1-y2).^2+(zc1-z2).^2 < R2^2;
ix2 = (xc2-x1).^2+(yc2-y1).^2+(zc2-z1).^2 < R1^2;
scatter3(xc1(ix1),yc1(ix1),zc1(ix1),20,'r','fill')
scatter3(xc2(ix2),yc2(ix2),zc2(ix2),20,'r','fill')
Of course i prepared explanations and result picture
  10 件のコメント
M.S. Khan
M.S. Khan 2020 年 4 月 3 日
Thanks sir. if you dont mind, i will keep in touch to learn from you Matlab skills. Regards and obliged for your kind guidance.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGraphics Object Programming についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by