How to plot a "Bean-shaped" object in MatLab please? (preferably a parametric equation)

1 view (last 30 days)
Please see the screenshot attached
(This is the general shape that I would like to create in MatLab please, but the shape or equation does not have to be exactly like this one)
If anyone can please help me understand how to create a similar-looking "bean-shaped" equation in MatLab, that would be amazing. Thank you for your help.
  • Preferably defined by parametric equations please (I usually define shapes in MatLab parametrically, such as drawing a "cardioid" or "limacon")
  • Preferably it is plotted using "surf" (but fsurf or another method also works)

Accepted Answer

Dyuman Joshi
Dyuman Joshi on 11 Oct 2023
Change the equation as per requirement -
a = 3.6;
f = @(x,y) (a*x+x.^2+y.^2).^2 - a^2*y;
fimplicit3(f)
Experiment with view to change the field of view.
  4 Comments
Charles
Charles on 12 Oct 2023
Oh, I see. That makes sense. Thank you for the clarification. You explained it well. Thank you.

Sign in to comment.

More Answers (1)

Image Analyst
Image Analyst on 12 Oct 2023

Products


Release

R2023a

Community Treasure Hunt

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

Start Hunting!