{"id":18563598,"url":"https://github.com/ishanoshada/planet3d","last_synced_at":"2025-04-10T03:32:55.064Z","repository":{"id":209169619,"uuid":"723382867","full_name":"Ishanoshada/Planet3D","owner":"Ishanoshada","description":"A 3D visualization of the solar system with planets and moons","archived":false,"fork":false,"pushed_at":"2023-11-27T10:11:43.000Z","size":35,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-04-29T14:41:57.552Z","etag":null,"topics":["planet","pygame","pygame-application","python-packages","simulation","solar-system","visualization"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/Planet3D","language":"Python","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/Ishanoshada.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}},"created_at":"2023-11-25T13:49:35.000Z","updated_at":"2024-04-22T18:28:43.000Z","dependencies_parsed_at":"2024-11-06T22:23:06.780Z","dependency_job_id":null,"html_url":"https://github.com/Ishanoshada/Planet3D","commit_stats":null,"previous_names":["ishanoshada/planet3d"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ishanoshada%2FPlanet3D","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ishanoshada%2FPlanet3D/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ishanoshada%2FPlanet3D/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ishanoshada%2FPlanet3D/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ishanoshada","download_url":"https://codeload.github.com/Ishanoshada/Planet3D/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248151467,"owners_count":21056108,"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","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":["planet","pygame","pygame-application","python-packages","simulation","solar-system","visualization"],"created_at":"2024-11-06T22:13:00.338Z","updated_at":"2025-04-10T03:32:54.785Z","avatar_url":"https://github.com/Ishanoshada.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Planet3D: Solar System Visualization\n\n\n![ss](https://raw.githubusercontent.com/Ishanoshada/Ishanoshada/main/ss/7d42d195b24996b688b4e1641be0656e.png~tplv-jiivuhwl6u-resize_5000.awebp.webp)\n\n## Introduction\n\nPlanet3D is a Python library that provides a simple yet powerful framework for visualizing a solar system in a 3D space. It utilizes the Pygame and OpenGL libraries to render planets, moons, and their orbits, allowing users to explore the celestial bodies of our solar system in an interactive 3D environment.\n\n## Features\n\n- **Realistic Rendering:** Planet3D employs OpenGL to create realistic 3D representations of planets and moons, complete with orbital paths.\n\n- **Interactive Exploration:** Users can navigate through the solar system using keyboard controls, adjusting the viewpoint to observe planets and their orbits from different angles.\n\n- **Configurability:** Easily customize the solar system by adding planets, moons, rings, and adjusting their properties such as size, orbit radius, rotation speed, and colors.\n\n- **Fullscreen Mode:** Toggle between fullscreen and windowed modes for an immersive experience.\n\n## Installation\n\nPlanet3D can be installed using the following command:\n\n```bash\npip install Planet3D\n```\n\n## Getting Started\n\n### Importing Planet3D\n\n```python\nfrom Planet3D import Planet, generate_solar_system\n```\n\n### Creating Planets\n\n```python\n# Create planets with specified properties\nearth = Planet(name=\"Earth\", radius=0.6, orbit_radius=12.0, rotation_speed=0.9, color=(0.0, 0.5, 1.0))\nmars = Planet(name=\"Mars\", radius=0.4, orbit_radius=18.0, rotation_speed=0.8, color=(1.0, 0.0, 0.0))\n```\n\n### Adding Moons\n\n```python\n# Add moons to a planet\nearth.add_moon(name=\"Moon\", radius=0.3, orbit_radius=3.0, rotation_speed=1.0, color=(0.8, 0.8, 0.8))\n```\n\n### Configuring Rings\n\n```python\n# Add rings to a planet\nsaturn.add_ring(radius=5.0, width=0.2, color=(0.8, 0.8, 0.8), transparency=0.3)\n```\n\n### Generating the Solar System\n\n```python\n# Generate and display the solar system\nplanets = [earth, mars]\ngenerate_solar_system(planets)\n```\n\nTo use Planet3D, create instances of the `Planet` class for each celestial body you want to include in the solar system. Customize properties such as radius, orbit radius, rotation speed, and color. Add rings or moons if desired. Finally, use the `generate_solar_system` function to display the solar system.\n\nHere is a basic example:\n\n```python\nif __name__ == \"__main__\":\n    sun = Planet(name=\"Sun\", radius=5.0, orbit_radius=0.0, rotation_speed=0.0, color=(1.0, 0.8, 0.0))\n    mercury = Planet(name=\"Mercury\", radius=0.2, orbit_radius=5.0, rotation_speed=5.0, color=(0.7, 0.7, 0.7))\n    venus = Planet(name=\"Venus\", radius=0.5, orbit_radius=8.0, rotation_speed=3.0, color=(0.9, 0.7, 0.0))\n    earth = Planet(name=\"Earth\", radius=0.6, orbit_radius=12.0, rotation_speed=0.9, color=(0.0, 0.5, 1.0))\n    mars = Planet(name=\"Mars\", radius=0.4, orbit_radius=18.0, rotation_speed=0.8, color=(1.0, 0.0, 0.0))\n    jupiter = Planet(name=\"Jupiter\", radius=2.0, orbit_radius=50.0, rotation_speed=0.4, color=(0.8, 0.6, 0.4))\n    saturn = Planet(name=\"Saturn\", radius=1.8, orbit_radius=75.0, rotation_speed=0.3, color=(0.9, 0.6, 0.4))\n    uranus = Planet(name=\"Uranus\", radius=1.0, orbit_radius=110.0, rotation_speed=0.2, color=(0.5, 0.7, 0.8))\n    neptune = Planet(name=\"Neptune\", radius=1.0, orbit_radius=150.0, rotation_speed=0.15, color=(0.0, 0.0, 0.7))\n\n    saturn_rings_color = (0.8, 0.8, 0.8)\n    saturn.add_ring(radius=5.0, width=0.2, color=saturn_rings_color, transparency=0.3)\n\n    earth.add_moon(name=\"Moon\", radius=0.3, orbit_radius=3.0, rotation_speed=1.0, color=(0.8, 0.8, 0.8))\n\n    planets = [sun, mercury, venus, earth, mars, jupiter, saturn, uranus, neptune]\n\n    # To run in fullscreen mode, set fullscreen=True\n    generate_solar_system(planets, display=(1200, 800), fullscreen=True)\n\n```\n\nThis example demonstrates how to create a solar system with various planets and customization options.\n\n![ex](https://github.com/Ishanoshada/Ishanoshada/blob/main/ss/ple.png?raw=true)\n\n## Controls\n\n- **Left/Right Arrow:** Move left/right\n- **Up/Down Arrow:** Move up/down\n- **W/S:** Move forward/backward\n- **Z/X:** Move up/down faster\n\n## Fullscreen Mode\n\nTo run the visualization in fullscreen mode, simply pass `fullscreen=True` to the `generate_solar_system` function:\n\n```python\ngenerate_solar_system(planets, fullscreen=True)\n```\n\n## Acknowledgements\n\nPlanet3D utilizes the Pygame and OpenGL libraries to create an interactive 3D solar system visualization.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Contact\n\nFor questions or support, please contact [ishan.kodithuwakku@gmail.com].\n\n**Repository Views** ![Views](https://profile-counter.glitch.me/planet3D/count.svg)\n\nExplore the wonders of our solar system with Planet3D!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fishanoshada%2Fplanet3d","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fishanoshada%2Fplanet3d","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fishanoshada%2Fplanet3d/lists"}