{"id":15735163,"url":"https://github.com/aventhis/3dviewer","last_synced_at":"2026-06-19T18:31:21.241Z","repository":{"id":256727082,"uuid":"856228949","full_name":"aventhis/3DViewer","owner":"aventhis","description":"A 3D viewer application that allows loading, visualizing, and manipulating 3D models from .obj files. It supports basic affine transformations like translation, rotation, and scaling for interactive exploration of 3D objects.","archived":false,"fork":false,"pushed_at":"2024-09-12T08:44:28.000Z","size":11397,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-31T03:47:08.641Z","etag":null,"topics":["3d-viewer","c","cpp"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aventhis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2024-09-12T08:05:16.000Z","updated_at":"2024-09-13T10:44:57.000Z","dependencies_parsed_at":"2024-09-12T19:24:03.428Z","dependency_job_id":null,"html_url":"https://github.com/aventhis/3DViewer","commit_stats":null,"previous_names":["aventhis/3dviewer_on_c","aventhis/3dviewer"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aventhis/3DViewer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aventhis%2F3DViewer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aventhis%2F3DViewer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aventhis%2F3DViewer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aventhis%2F3DViewer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aventhis","download_url":"https://codeload.github.com/aventhis/3DViewer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aventhis%2F3DViewer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":277103489,"owners_count":25761398,"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-26T02:00:09.010Z","response_time":78,"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-viewer","c","cpp"],"created_at":"2024-10-04T01:10:27.256Z","updated_at":"2025-09-26T16:02:21.585Z","avatar_url":"https://github.com/aventhis.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# s21_3DViewer\n\n## Introduction\n\nThe `s21_3DViewer` project is a custom implementation of a 3D object viewer developed in C. This project allows users to load and visualize 3D models in `.obj` format, providing basic manipulations like zooming, rotating, and moving the object. The goal of the project is to enhance knowledge in 3D graphics, algorithms, and user interface design.\n\n### Overview of 3D Viewer Features\n\n| No. | Feature              | Description                                         |\n| --- | -------------------- | --------------------------------------------------- |\n| 1   | **Zoom**             | Allows users to zoom in and out on the 3D object    |\n| 2   | **Rotation**         | Users can rotate the object around the X, Y, and Z axes |\n| 3   | **Movement**         | Enables movement of the object within the viewer's window |\n| 4   | **Load OBJ**         | Supports loading 3D models in the `.obj` file format |\n| 5   | **Wireframe Mode**    | Displays the object in wireframe view               |\n| 6   | **Surface Mode**     | Renders the object with surfaces                    |\n| 7   | **File Export**      | Exports the 3D model image as a screenshot          |\n\n## Part 1. Implementation of the `s21_3DViewer` Features\n\nThe core functionality of the 3D viewer includes loading `.obj` files, rendering objects, and providing interactive features like zoom, rotation, and movement. The following principles were followed during the development:\n\n- Developed in C, adhering to the C11 standard using the gcc compiler.\n- OpenGL and GLU libraries were used for rendering 3D objects.\n- The source code follows Google Style guidelines for clean and readable code.\n- The project is structured as a static library, `s21_3DViewer.a`, with its corresponding header file `s21_3DViewer.h`.\n- The program processes `.obj` files and parses their vertices, edges, and surfaces.\n- The viewer supports switching between wireframe and surface rendering modes.\n- Allows for real-time interaction such as zooming and rotating.\n- Unit tests were developed to validate the functionality using the Check library.\n- The project includes a Makefile for building the viewer and running tests.\n\n## Part 2. Additional Features - Settings\n\n- The program allows users to customize the type of projection (parallel and central);\n- It allows customization of the type (solid, dashed), color, and thickness of edges, as well as the display style (none, circle, square), color, and size of vertices;\n- Users can select the background color;\n- All settings are saved between program restarts.\n\n## Part 3. Additional Features - Recording\n\n- The program allows saving the rendered images in bmp and jpeg formats;\n- A special button allows recording short screencasts (animations) of user-applied affine transformations of the loaded object in gif format (640x480, 10fps, 5s).\n\n## Makefile Targets\n\nThe build of the program is managed by a Makefile with the standard set of targets for GNU programs:\n\n- **make all**: This target compiles all source files and builds the terminal version of the 3D viewer using the `ncurses` library.\n- **make clean**: This target removes all generated object files and executables, cleaning up the build environment.\n- **make install**: This target installs the 3D viewer to a specified directory.\n- **make uninstall**: This target removes the installed 3D viewer from the system.\n- **make dvi**: This target builds documentation for the project.\n- **make dist**: This target packages the project for distribution.\n- **make tests**: This target runs unit tests to validate the functionality of the program.\n- **make gcov_report**: This target generates a code coverage report in HTML format using `gcov` for the 3D viewer's logic.\n\n## Project Build\n\nTo build the project, follow these steps:\n\n1. Clone the repository and navigate to the project folder:\n\n    ```bash\n    git clone \u003crepository_url\u003e\n    cd \u003cproject_folder\u003e\n    ```\n\n2. Build the project:\n\n    ```bash\n    make all\n    ```\n\n\n## Screenshots and GIFs\n\nHere are some visuals showcasing the 3D Viewer project in action, demonstrating various object renderings and features of the interface:\n\n### Screenshots\n\n| Initial Model Load | Elephant Model | Skull Object View |\n|-------------------|-------------------|-------------------|\n| ![Initial View](src/screenshot/Screenshot1.png) | ![Custom Object](src/screenshot/Screenshot2.png) | ![Skull Object](src/screenshot/Screenshot4.png) |\n\n| Garilla Model |\n|----------------|\n| ![Elephant Model](src/screenshot/Screenshot5.png) |\n\n\n### GIF Example\n\nHere is a GIF showing object manipulation:\n\n![Bison Pose Gif](src/screenshot/bison_pose.gif)\n\nThis format beautifully demonstrates the interaction capabilities and control of 3D models within the viewer.\n\n## Conclusion\n\nThe `s21_3DViewer` project demonstrates a basic 3D viewer in C with additional features such as customizable settings and recording capabilities. The structured programming principles and comprehensive testing ensure robustness and maintainability.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faventhis%2F3dviewer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faventhis%2F3dviewer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faventhis%2F3dviewer/lists"}