Git Product home page Git Product logo

draw-solar-system-with-java's Introduction

Draw Solar System in Java.

Solar System

Description

The Solar System Simulator is a Java application that generates an image of our solar system with the sun, planets, moons, and orbital rings. You can customize the appearance of celestial objects and add more planets and features to the simulation.

Installation

  1. Clone this repository to your local machine: git clone [https://github.com/MaraBytes/Draw-Solar-system-with-Java.git]

  2. Ensure you have Java Development Kit (JDK) installed on your system.

  3. Open the project in your preferred Java IDE (e.g., IntelliJ IDEA, Eclipse).

  4. Run the DrawSolar class to generate the solar system image.

Adding More Planets and Features

To add more planets or features to the solar system simulation, follow these steps:

  1. Open the DrawSolar class in your IDE.

  2. Inside the main method, you can create more instances of the Planet class to add new planets with their properties. For example, to add a new planet named "Jupiter" with a red color and no moon, you can do the following:

planets.add(new Planet(center, innerRadius, outerRadius, 0, "Jupiter", Color.RED, "", null));
Customize the properties of the planet according to your requirements.

If you want to add a moon to a planet, create a new instance of the Planet class for the moon and specify the planet as the moon's parent. For example, to add a moon named "Ganymede" to Jupiter, you can do the following:

java
planets.add(new Planet(jupiter.getCenter(), 5, 15, 0, "Ganymede", Color.GRAY, "", jupiter));
Run the DrawSolar class to generate the updated solar system image with your new planets and features.

draw-solar-system-with-java's People

Contributors

marabytes avatar

Watchers

 avatar

Forkers

jkasaine

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.