{"id":30968250,"url":"https://github.com/muppetsg2/shapes-generator","last_synced_at":"2025-10-08T05:58:59.257Z","repository":{"id":258005334,"uuid":"824062176","full_name":"Muppetsg2/Shapes-Generator","owner":"Muppetsg2","description":"This project is a console-based Shape Generator program written in C++. It allows the user to create and save a variety of 3D shapes.","archived":false,"fork":false,"pushed_at":"2025-05-03T22:04:02.000Z","size":516,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-03T23:18:15.524Z","etag":null,"topics":["3d","3d-shapes","console-application","cpp","generator","shapes","shapes-generator"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Muppetsg2.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-07-04T09:34:56.000Z","updated_at":"2025-05-03T22:04:06.000Z","dependencies_parsed_at":"2025-04-14T15:31:36.037Z","dependency_job_id":"b4e08c4d-fe80-4895-a271-22873da8a87a","html_url":"https://github.com/Muppetsg2/Shapes-Generator","commit_stats":null,"previous_names":["muppetsg2/shapes-generator"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/Muppetsg2/Shapes-Generator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Muppetsg2%2FShapes-Generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Muppetsg2%2FShapes-Generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Muppetsg2%2FShapes-Generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Muppetsg2%2FShapes-Generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Muppetsg2","download_url":"https://codeload.github.com/Muppetsg2/Shapes-Generator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Muppetsg2%2FShapes-Generator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274732681,"owners_count":25339353,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-11T02:00:13.660Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["3d","3d-shapes","console-application","cpp","generator","shapes","shapes-generator"],"created_at":"2025-09-12T00:54:02.060Z","updated_at":"2025-10-08T05:58:54.210Z","avatar_url":"https://github.com/Muppetsg2.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align='center'\u003e\n   \u003cimg src=\"git_images/icon.png\" alt=\"Logo\" width=\"150\" align=\"center\"/\u003e\n   \n  \u003cdiv id=\"toc\"\u003e\n    \u003cul style=\"list-style: none;\"\u003e\n      \u003csummary\u003e\n        \u003ch1\u003eShapes Generator 1.3.0\u003c/h1\u003e\n      \u003c/summary\u003e\n    \u003c/ul\u003e\n  \u003c/div\u003e\n\u003c/div\u003e\n\n## 📌 Description\n\nThis project is a console-based **Shape Generator** written in **C++**. It allows users to create and save various **3D shapes** such as:\n\n🔴 Sphere | 🔷 IcoSphere | ▭ Plane | 🧊 Cube | 🛢 Cylinder | ⬢ Hexagon | 🍦 Cone | 🔼 Tetrahedron | 🔺 Pyramid | 🍩 Torus\n\nThe program dynamically generates the shape based on user input and exports the shape data to a file.\n\u003e 🧭 Note: All shapes use the counterclockwise order for listing vertices, which ensures consistency and simplifies rendering in most 3D engines.\n\n\u003e 🔺 Note: Each shape is constructed using triangles.\n\n🛠 **Technologies used:**\n- **GLM** (OpenGL Mathematics) for vector operations\n- **FMT** for formatted output\n\n## 📋 Table of Contents\n\n- [✨ Features](#-features)\n- [📦 Dependencies](#-dependencies)\n- [⚙️ How to Build](#%EF%B8%8F-how-to-build)\n   - [🖥️ Windows](#%EF%B8%8F-windows)\n   - [🐧 Linux](#-linux)\n   - [🍏 MacOS](#-macos)\n- [▶️ Usage](#%EF%B8%8F-usage)\n- [🧾 Configuration](#-configuration)\n- [📜 Example Output](#-example-output)\n- [🛠 Troubleshooting](#-troubleshooting)\n- [👨‍💻 Authors](#-authors)\n- [📜 License](#-license)\n\n## ✨ Features\n\n✅ **Interactive User Input**\n   - Configure shapes through console input.\n   - Choose from **ten** different shapes:\n     1.  🔴 Sphere\n     2.  🔷 IcoSphere\n     3.  ▭ Plane\n     4.  🧊 Cube\n     5.  🛢 Cylinder\n     6.  ⬢ Hexagon\n     7.  🍦 Cone\n     8.  🔼 Tetrahedron\n     9.  🔺 Pyramid\n     10. 🍩 Torus\n\n✅ **ESC Key Support**: Press **ESC** anytime to exit the program.\n\u003cbr/\u003e\n✅ **File Output**: Generated shapes are saved in `shape.txt` or `shape.obj` for later use.\n\u003cbr/\u003e\n✅ **Error Handling**: Provides feedback for invalid inputs and applies sensible defaults.\n\n## 📦 Dependencies\n\n- **C++20** or later\n- **CMake 3.21** or later\n- **GLM** Library (OpenGL Mathematics)\n- **FMT** Library (Formatted console output)\n\n## ⚙️ How to Build\n\n### 🖥️ Windows\n\n1. **Clone the repository:**\n\n   ```bash\n   \u003e git clone https://github.com/Muppetsg2/Shapes-Generator.git\n   \u003e cd Shapes-Generator\n   ```\n\n2. **Open the folder in Visual Studio** (supports CMake natively).\n3. CMake will **configure** the project and **download** dependencies automatically via `CPM.cmake`.\n4. **Press ▶️** to build and run the app.\n\n### 🐧 Linux\n\n1. **Clone the repository:**\n\n   ```bash\n   \u003e git clone https://github.com/Muppetsg2/Shapes-Generator.git\n   \u003e cd Shapes-Generator\n   ```\n\n2. **Install CMake and a compiler** (if not installed):\n\n   ```bash\n   \u003e sudo apt install cmake g++ ninja-build\n   ```\n\n3. **Build the project**:\n\n   ```bash\n   \u003e cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release\n   \u003e cmake --build build\n   ```\n\n4. **Run the app**:\n\n   ```bash\n   \u003e ./build/bin/Shapes-Generator\n   ```\n\n### 🍏 MacOS\n\n1. **Clone the repository:**\n\n   ```bash\n   \u003e git clone https://github.com/Muppetsg2/Shapes-Generator.git\n   \u003e cd Shapes-Generator\n   ```\n\n2. **Install dependencies (CMake, Ninja, compiler)** (if not installed):\n\n   ```bash\n   \u003e brew install cmake ninja\n   ```\n\n3. **Build the project with app bundle**:\n\n   ```bash\n   \u003e cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release\n   \u003e cmake --build build\n   ```\n\n4. **Run the app**:\n\n   ```bash\n   \u003e open build/bin/Shapes-Generator.app\n   ```\n\n## ▶️ Usage\n\n1. **Launch the program** - ASCII art and a menu will appear.\n2. **Select a shape** by entering a number (1-10).\n3. **Enter the required shape parameters**, if applicable.\n4. **The shape is generated**.\n5. **Select the file format** for saving.\n6. **The file path** will be displayed in the console.\n7. **Exit anytime** by pressing the **ESC** key.\n\n## 🧾 Configuration\n\nThe application allows you to configure the default output path and filename using the `shapes.config` file.\n\n**Example contents** of `shapes.config`:\n\n   ```bash\n   generateTangents: true\n   saveDir: C:\\my\\custom\\output\\\n   fileName: my_shape\n   ```\n\n- **generateTangents**: Tells the generator whether to compute and include tangent and bitangent \\\nvectors for each vertex (useful for normal mapping and advanced shading).\n- **saveDir**: Sets the directory where shape files will be saved.\n- **fileName**: Sets the base name of the output file (e.g., `my_shape.txt`, `my_shape.obj`).\n\n\u003e 💡 If the config file is missing or malformed, defaults will be used.\\\n:information_source: The path will be different depending on your operating system. Here is an example of the path for Windows\n\n## 📜 Example Output\n\nWhen generating a **Sphere**, the output will look like this:\n```mathematica\n[OK] Start Generating Sphere...\n[OK] Sphere Generated Successfully!\n\n[INFO] Shape successfully generated in 4.51e-05s!\n\n──────────────────────────────────────────────────\n[FILE] Select the save format:\n 1) std::vector  - Vertices \u0026 Indices (struct)\n 2) C array      - Vertices \u0026 Indices (struct)\n 3) std::vector  - Only Vertices (struct)\n 4) C array      - Only Vertices (struct)\n 5) std::vector  - Vertices \u0026 Indices (float)\n 6) C array      - Vertices \u0026 Indices (float)\n 7) std::vector  - Only Vertices (float)\n 8) C array      - Only Vertices (float)\n 9) Save as OBJ file\n ──────────────────────────────────────────────────\nEnter your choice (1 - 9): 1\n\n[OK] Start Saving Sphere to file...\n[SAVED] Shape saved successfully in 0.0013585s!\n[PATH] File path: C:\\my\\custom\\output\\my_shape.txt\n\nPress Enter to exit...\n```\n\n\u003e :information_source: This example is shown on a Windows system. It may vary on other systems.\n\n## 🛠 Troubleshooting\n\n❌ **Issues? Try this:**\n- Ensure **all dependencies** are installed.\n- Check **console messages** for errors.\n- Verify you're using **C++20** or later.\n\n\u003e :information_source: If you cannot see or understand the error, [open an issue](https://github.com/Muppetsg2/Shapes-Generator/issues).\n\n## 👨‍💻 Authors\n\n📌 **Marceli Antosik (Muppetsg2)**\n\n## 📜 License\n\nThis project is **open-source** under the **MIT License**.\n\n📖 **MIT License Overview:**\n- ✅ Free to use, modify, and distribute.\n- ✅ Can be used in **commercial** and **non-commercial** projects.\n- ❗ Must include original license and copyright.\n\nSee the [LICENSE](./LICENSE) file for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuppetsg2%2Fshapes-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmuppetsg2%2Fshapes-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuppetsg2%2Fshapes-generator/lists"}