Skip to content
This repository has been archived by the owner on Jan 21, 2019. It is now read-only.

A rudimentary physics simulator including object gravity and collisions (C#/WPF, MIT Licensed)

License

Notifications You must be signed in to change notification settings

draevin/collision-gravity-simulator

Repository files navigation

collision-gravity-simulator

A rudimentary physics simulator including object gravity and collisions (C#/WPF)

Description

Using the mouse and the provided controls, this application allows for the creation of mobile and fixed objects. Mobile objects have vectors for position and velocity, as well as a property for size, from which we derive mass. These influence their reactions to collisions with other objects. Fixed objects have vectors for position, a similar properties for size and mass, and local gravity with area-of-effect and strength based on size and mass.

Background

This application was developed as a project for an intermediate OOP class.

Controls

The top bar includes the settings for the creation of objects and map control. From left to right, they include a checkbox for the type of object (fixed/mobile) and sliders for size, angle, and velocity, and a checkbox for "torus" mode. The sliders for angle and velocity will maintain a value but have no effect on fixed objects. The torus checkbox will provide for infinite wrapping of objects, as if they were moving across the face of a torus. With this checked, after proceeding beyond any edge, they will wrap to the opposite size and maintain course.

The left sidebar is a stop/start button, which will provide control over the motion of the balls (effectively pause/play on the world)

The right sidebar is a clear button, which will remove all mobile objects if your screen is too cluttered or you wish to start from scratch.

Left clicking will place objects on the screen using the settings entered in the top

Right clicking on any object will remove it.

If you have any questions or any issues regarding the code, feel free to contact me using the information on my profile.

About

A rudimentary physics simulator including object gravity and collisions (C#/WPF, MIT Licensed)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages