Ccsadasd
Ccsadasd
INSTITUTE OF ENGINEERING
SAGARMATHA ENGINEERING COLLEGE
ON
YURENDRA LAMA(SEC079BEI015)
SUBMITTED TO:
SANEPA, LALITPUR
Creating this project has been a thrilling experience for me and my team members, and we would like to
thank those who have helped make it a success.
I would like to express my heartfelt gratitude to several individuals and groups who played a significant
role in the completion of this computer graphics project. First and foremost, I am deeply thankful to Er.
Sushant Bhattarai for his unwavering guidance, providing us the chance to demonstrate the project,
invaluable insights, and constant encouragement throughout this endeavor. His expertise and support
were instrumental in shaping the direction of this project.
I would also like to extend my appreciation to my dedicated team members, [NIL KUMAR KARKI,
DIBIGH RAI and YURENDRA LAMA], whose hard work, collaboration, and commitment were
essential in bringing this project to fruition.
Lastly, my sincere thanks to my dear friends and seniors for their support, feedback, and technical
assistance. Their contributions were invaluable in overcoming challenges and achieving our goals.
Without the support and contributions of these individuals and organizations, this project would not have
been possible. Thank you all for your dedication and support.
Of course, no project is completed without a few setbacks, and we'd like to thank the creators of the
graphics.h library for providing us with the resources to overcome the challenges. Without you, we
couldn't have succeeded!
ABSTRACT
The "Visualization of Earth and Moon Orbits using C Graphics" project aims to create an interactive
graphical representation of the revolution of Earth around the Sun and the Moon around the Earth. By
employing the graphics.h library in C/C++, this project offers an engaging and educational tool to
demonstrate celestial mechanics in a visually appealing manner.
The simulation is built around a central graphical window where the Sun, Earth, and Moon are depicted
as circles of varying sizes and colors. The program dynamically calculates the positions of the Earth and
Moon based on their respective orbits and angles, simulating their orbital motion using trigonometric
functions.
Users can observe the Earth's orbit around the Sun and the Moon's orbit around the Earth in real-time.
The speed of revolution and the size of orbits can be adjusted, allowing for customization and
experimentation. The graphical representation provides a clear visualization of the relative positions and
movements of these celestial bodies, enhancing understanding of astronomical concepts such as orbits,
rotation, and revolution.
This project serves as an educational tool for students and enthusiasts interested in astronomy and
computer graphics. It offers an intuitive way to explore and comprehend complex celestial phenomena,
fostering curiosity and appreciation for the wonders of the cosmos. Additionally, the project can be
extended to include more features such as planetary orbits, interactive controls, and informational
overlays to further enrich the learning experience.
Table of Contents
1.Introduction
4.User Interface
8.References
Sources of information and inspiration for the project
1.INTRODUCTION
The "Visualization of Earth and Moon Orbits using C Graphics" project is designed to provide an
interactive and visually appealing representation of the revolution of Earth around the Sun and the Moon
around the Earth. By utilizing the graphics.h library in C/C++, this project offers a platform to observe
celestial mechanics in action through dynamic graphical simulation.
The primary objective of this project is to create an educational tool that enhances understanding of
astronomical concepts, such as orbits, rotation, and revolution, by visually illustrating the relationships
between celestial bodies. Through an intuitive graphical interface, users can interact with and observe the
motions of the Earth and Moon in real-time.
The project encompasses the implementation of algorithms to calculate the positions of the Earth and
Moon based on their respective orbits and angles. These calculations enable the dynamic rendering of the
Earth and Moon within the graphical environment, allowing users to observe their orbital motion as they
navigate through space.
The visualization is presented within a graphical window, where the Sun, Earth, and Moon are depicted as
circles of varying sizes and colors. Users can customize the simulation by adjusting parameters such as
the speed of revolution and the size of orbits, providing a versatile platform for experimentation and
exploration.
Overall, the project serves as a valuable educational resource for students and enthusiasts interested in
astronomy and computer graphics. By combining scientific principles with interactive visualization, it
offers a captivating way to explore the wonders of the cosmos and deepen understanding of celestial
phenomena.
2. Visualization: Create a graphical representation that accurately depicts the relative positions and
movements of the Earth, Moon, and Sun within the solar system.
3. Real-time Simulation: Implement algorithms to dynamically calculate the positions of the Earth
and Moon based on their orbital parameters, allowing users to observe their motion in real-time.
4. Customization: Provide users with options to customize simulation parameters such as the speed
of revolution, orbit sizes, and graphical attributes, allowing for experimentation and exploration.
5. Intuitive Interface: Design a user-friendly graphical interface that enables easy interaction and
navigation, catering to users of all levels, including students and enthusiasts interested in
astronomy.
7. Extension and Further Learning: Lay the groundwork for potential extensions to include
additional features, such as planetary orbits, interactive controls, and informational overlays, to
deepen learning and exploration of celestial phenomena.
8. Documentation and Dissemination: Document the project thoroughly, including source code,
technical specifications, and user manuals, to facilitate dissemination and usage by educators,
students, and enthusiasts.
The system design for the "Visualization of Earth and Moon Orbits using C Graphics" project involves
planning the architecture, identifying key components, and outlining the algorithms used to create the
simulation. Here's an overview of the system design:
1. Architecture:
The project follows a simple architecture, consisting of a graphical user interface (GUI)
and underlying simulation logic.
The GUI is responsible for initializing the graphics environment, drawing the celestial
bodies, and handling user interaction.
The simulation logic calculates the positions of the Earth and Moon based on their orbits
and angles, updating them in real-time to simulate orbital motion.
2. Key Components:
Graphics Environment: Initializes the graphical window using the graphics.h library and
sets parameters such as window size and background color.
Celestial Bodies: Represented as circles drawn on the screen, including the Sun, Earth,
and Moon. Each has predefined attributes such as radius, color, and initial position.
User Interaction: Allows users to adjust parameters such as the speed of revolution and
orbit sizes. Inputs from the keyboard or graphical controls are processed to modify
simulation parameters.
Rendering: Updates the positions of the Earth and Moon on the screen in each frame to
create the animation effect. Refreshes the display to reflect changes in the simulation.
Animation Loop: Controls the flow of the simulation by continuously updating the
positions of the Earth and Moon and handling user inputs. Ensures smooth and
continuous motion of celestial bodies.
4.User Interface
The user interface (UI) for the "Visualization of Earth and Moon Orbits using C Graphics" project serves
as the means for users to interact with the simulation, customize parameters, and observe the orbital
motion of celestial bodies. Here's how the UI can be designed:
1. Graphical Window:
Upon running the program, a graphical window is opened to display the simulation.
The window should have a suitable size to accommodate the visualization of celestial
bodies and allow for smooth interaction.
2. Visualization:
The UI should visually represent the Sun, Earth, and Moon as filled circles of different
sizes and colors.
Each celestial body should be clearly distinguishable from the others, with the Sun being
larger than the Earth and the Moon.
3. User Controls:
Provide user controls to adjust simulation parameters, such as the speed of revolution and
orbit sizes.
These controls can be implemented using keyboard inputs or graphical buttons and
sliders.
Users should be able to increase or decrease the speed of revolution to observe changes in
the orbital motion.
4. Information Display:
Optionally, include an information panel to display relevant details about the simulation,
such as the current speed of revolution and orbit sizes.
This panel can provide additional context and insights into the celestial phenomena being
visualized.
5. Feedback Mechanism:
Implement feedback mechanisms to notify users of changes or actions taken within the
simulation.
For example, display messages or tooltips when users adjust parameters or interact with
controls.
6. Error Handling:
Include error handling mechanisms to alert users of any issues encountered during
runtime.
Provide informative error messages to guide users in resolving problems or seeking
assistance.
7. User Interaction:
Ensure that the UI is intuitive and easy to navigate, catering to users of all levels,
including students and enthusiasts interested in astronomy.
Design the interface to be responsive and interactive, allowing users to explore and
observe the simulation in real-time.
8. Customization Options:
Offer customization options to allow users to tailor the simulation to their preferences.
For example, provide the ability to adjust the colors of celestial bodies or toggle
additional features such as grid lines or labels.
By designing a user-friendly and informative interface, the project will enhance the overall user
experience and facilitate engagement with the simulation of Earth and Moon orbits.
5.Results and evaluation
After implementing the "Visualization of Earth and Moon Orbits using C Graphics" project, it's important
to evaluate its performance and effectiveness in achieving its objectives. Here's how results can be
presented and the project evaluated:
1. Visual Presentation:
Provide screenshots or videos demonstrating the simulation of Earth and Moon orbits
within the graphical environment.
Showcase the positions and movements of the Sun, Earth, and Moon over time,
highlighting the dynamic nature of the simulation.
2. Customization Options:
Evaluate the effectiveness of customization options such as adjusting the speed of
revolution and orbit sizes.
Demonstrate how users can interact with the simulation and customize parameters to
observe changes in orbital motion.
3. Smoothness and Performance:
Assess the smoothness and performance of the simulation by observing the fluidity of
motion and responsiveness of user interactions.
Evaluate whether the simulation runs smoothly without significant lag or stuttering, even
when adjusting parameters.
4. Accuracy and Realism:
Evaluate the accuracy and realism of the simulation in representing Earth and Moon
orbits.
Compare the simulated orbits with actual astronomical data to assess the fidelity of the
visualization.
5. Educational Value:
Assess the educational value of the simulation in enhancing understanding of celestial
mechanics.
Gather feedback from users, such as students or enthusiasts, on how effectively the
simulation helps them grasp concepts related to Earth and Moon orbits.
6. User Feedback:
Collect feedback from users regarding their experience with the simulation.
Ask users about the usability, intuitiveness, and effectiveness of the user interface and
customization options.
7. Performance Optimization:
Evaluate the performance optimization techniques implemented to ensure smooth
execution of the simulation.
Assess whether any additional optimizations are needed to enhance performance on
different hardware configurations.
8. Documentation Review:
Review the completeness and clarity of documentation, including code comments, user
manual, and technical specifications.
Ensure that documentation provides sufficient guidance for users to understand and
interact with the simulation.
9. Future Enhancements:
Identify potential areas for future enhancements, such as adding additional features,
improving visualization accuracy, or expanding educational content.
10. Overall Satisfaction:
Based on the above evaluation criteria, assess the overall satisfaction with the project in
achieving its objectives and providing an engaging and educational experience.
By conducting a comprehensive evaluation of the project's results, including visual presentation,
customization options, performance, educational value, and user feedback, it's possible to gauge its
effectiveness and identify areas for improvement or future development.
In conclusion, the "Visualization of Earth and Moon Orbits using C Graphics" project successfully
achieves its objectives of creating an interactive and visually engaging simulation of celestial mechanics.
Through the implementation of fundamental principles of computer graphics and astronomy, the project
provides a dynamic visualization of the Earth orbiting around the Sun and the Moon orbiting around the
Earth.
The project's key features include a user-friendly interface for adjusting simulation parameters, such as
the speed of revolution and orbit sizes, and real-time rendering of the Earth and Moon orbits. Users can
interact with the simulation to observe changes in orbital motion and gain a better understanding of
celestial phenomena.
Through thorough testing and evaluation, the project demonstrates smooth performance, accuracy in
representing Earth and Moon orbits, and educational value in enhancing understanding of celestial
mechanics. User feedback confirms the effectiveness of the simulation in providing an engaging and
informative experience for students and enthusiasts alike.
While the project serves as a valuable educational tool, there are opportunities for future enhancements,
such as incorporating additional features like planetary orbits or improving visualization accuracy.
Overall, the "Visualization of Earth and Moon Orbits using C Graphics" project contributes to the
exploration and appreciation of the wonders of the cosmos through interactive visualization and learning.
References
https://chat.openai.com/c/bea7357e-2ea3-4ac6-928f-42b6a9875cb5
https://youtube.com/@puskarjasu?si=KZ8XnfOsC_eiKR2M
https://www.geeksforgeeks.org/introduction-to-computer-graphics/?ref=gcse
https://open.umn.edu/opentextbooks/textbooks/420