The MATLAB Shape Generator is a versatile project designed to help students, developers, and enthusiasts visualize and understand geometric shapes in both 2D and 3D.
With user-friendly input prompts, this project allows anyone to generate shapes like circles, triangles, cubes, spheres, and more, while automatically saving high-quality PNG images for reports, presentations, or portfolio showcases.
This project combines MATLAB programming, geometry, and visualization skills into a single, easy-to-use package.
- Line
- Circle
- Ellipse
- Square
- Rectangle
- Triangle
- Parabola
- Hyperbola
- Regular Polygon
- Star
- Sector
- Annulus (Ring)
- Trapezium
- Rhombus
- Custom Polygon
- Sphere
- Cube
- Cuboid
- Cylinder
- Cone
- Hemisphere
- Ellipsoid
- Pyramid (Square base)
- Triangular Prism
- Torus (Donut)
- Tetrahedron
- Octahedron
- Dodecahedron
- Icosahedron
- 3D Surface Plot
- User-friendly input prompts for parameters such as side length, radius, height, and number of sides.
- Automatic PNG image generation for each shape, saved in the same folder for easy sharing and visualization.
- Ideal for learning geometry, MATLAB programming, and visualization techniques.
- Open VS Code and navigate to the
MATLAB-Codesfolder. - Go to the folder containing the shape you want to generate (
2D_Shapesor3D_Shapes). - Open any
.mscript (e.g.,2_Circle.mor4_Cylinder.m). - Run the script in MATLAB.
- Follow the on-screen prompts to input the required parameters.
- The shape will be displayed, and optionally, a
.pngimage will be saved in the same folder.
Ritesh β IIT Patna | Electrical & Electronics Engineering
This project is licensed under the MIT License. See the LICENSE file for details.
- Ensure that MATLABβs current folder is set to the project folder to avoid path errors.
- Each
.mscript is self-contained and can run independently without external dependencies. - PNG images are automatically saved, making it easy to include them in presentations, reports, or portfolios.
- This project is perfect for students, developers, and hobbyists looking to learn geometry, programming, and visualization techniques using MATLAB.