Skip to content

ashutosh3027/CR-Visualizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

Coefficient of Restitution Simulator

This project is for demonstration of Coefficient of Restitution. You can input height and Coefficient of Restitution and watch the simulation. Also project can print 10 height after bounce for your analysis.

Coefficient of Restitution: The ratio of final velocity to the initial velocity between two objects after their collision is known as the coefficient of restitution. The restitution coefficient is denoted as e and is a unitless quantity, and its values range between 0 and 1 (inclusive).
Formula:
Equation

e = coefficient of restitution
v = velocity after bounce
u = velocity before bounce
h2 = maximum heigth after bounce
h1 = height from ball dropped

Brief Project Structure

/
|-- CoefficientofRestitutionAnalysis/
    |-- bin/
        |-- application/                #Contains project class files
        |-- images/                     #Contains images used in the project
    |-- src/
        |-- application/
            |-- ball.java               #Contains methods applied on ball
            |-- main.java               #For initialization of screen and app
            |-- SampleController.java   #Controles motion of ball and set values
            |-- Sample.fxml             #Contains User Interface code (FXML)
        |-- images/                     #Contains images used in the project

Setup Process

  1. Clone this repository in your local system.

  2. Download Eclipse IDE and setup Java Language in your machine.

  3. Download Java FXML, SceneBuilder and JPheonix
    Java FXML Download Link
    SceneBuilder DownLoad Link
    JPheonix Download Link

  4. Open Eclipse and open CoefficientofRestitutionAnalysis folder as project.

  5. Go to Windows -> Preference.

  6. Search User Libraries and click New and name JavaFX.

  7. Search JavaFX and paste Scene Builder executable file path and JavaFX bin folder path in respective field.

  8. Go to Run -> Run Configuration.

  9. Move to Java Application and select Main and then Argument.

  10. In VM arguments paste below code:

        --module-path "<Enter path to JavaFX/lib folder>" --add-modules javafx.controls,javafx.fxml
    
  11. Click apply.

  12. Right click on Project Name and in Build Path select Configure Build Path search for Java Build Path.

  13. Click on Classpath, remove JavaFX and JPheonix already present in that, and from right select Add Library.. then click on User Library, select next and check JavaFX.

  14. Drag JavaFX SDK from Modulepath to Classpath.

  15. Click on Classpath and from right select Add External JARs.. and select JPheonix JAR file from your machine.

  16. Click on Apply and close.

  17. Project is now successfully setup in your machine 😎.

About

A project to visualize Coefficient of Restitution.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages