library(shiny) fluidPage( titlePanel("Barbell simulation - a 1D analogue of a real coin toss"), sidebarPanel( uiOutput("animationSlider"), sliderInput("frameInterval", "Set frame Interval (ms.)", min=0, max=2000, value=300,step=50), actionButton("resetTime","Reset Time",class = "btn-success"), h3("Adjust Parameters"), # Input: Animation with custom interval (in ms) ---- # to control speed, plus looping sliderInput("x"," Initial distance from floor:", min = 1, max = 12, value = 6), sliderInput("omega"," Initial angular momentum:", min = 0, max = 100, value = 40), sliderInput("l", "Length:", min = 1, max = 12, value = 3), sliderInput("g", "Gravity constant:", min = 1, max = 10, value = 1), sliderInput("HookeConstant", "Hooke constant:", min = 1, max = 120, value = 60), sliderInput("AirResistance", "Air Resistance:", min = 0, max = 2, step = 0.01, value = 0.08), sliderInput("timeStep", "Time Step:", min = 0, max = 1, step = 0.01, value = 0.1) ), mainPanel( uiOutput("description"), tags$a(href = "barbell.pdf", "Theory of operation of the barbell"), plotOutput('plot') ) )