-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
2,070 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
setwd("~/Desktop/csafe/bullet/bulletanalyzer") | ||
shiny::runApp() |
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
library(shiny) | ||
library(bslib) | ||
options(rgl.useNULL = TRUE) | ||
options(shiny.port = 4569) | ||
options(shiny.host= "0.0.0.0") | ||
library(rgl) | ||
library(x3ptools) | ||
library(bulletxtrctr) | ||
library(shinyscreenshot) | ||
|
||
ui <- bootstrapPage( | ||
screenshotButton(label = "Download Report", id = "allplot",filename="Bullet Comparison Report",scale=1), | ||
uiOutput("allplot") | ||
|
||
) | ||
|
||
server <- function(input, output) | ||
{ | ||
|
||
bull <- read_bullet("~/Desktop/csafe/bullet/bulletanalyzer/dump/bull") | ||
# bull <- read_bullet("~/Desktop/bull") | ||
bull$x3p <- lapply(bull$x3p,x3p_m_to_mum) | ||
bull$x3p <- lapply(bull$x3p,function(x) y_flip_x3p(rotate_x3p(x,angle = -90))) | ||
x3p_scaled <- x3p_interpolate(bull$x3p[[1]],resx=20) | ||
output$plot1 <- renderRglwidget({image_x3p(x3p_scaled,zoom=1);rglwidget()}) | ||
output$plot2 <- renderRglwidget({image_x3p(x3p_scaled,zoom=1);rglwidget()}) | ||
output$plot3 <- renderRglwidget({image_x3p(x3p_scaled,zoom=1);rglwidget()}) | ||
output$plot4 <- renderRglwidget({image_x3p(x3p_scaled,zoom=1);rglwidget()}) | ||
output$plot5 <- renderRglwidget({image_x3p(x3p_scaled,zoom=1);rglwidget()}) | ||
output$plot6 <- renderRglwidget({image_x3p(x3p_scaled,zoom=1);rglwidget()}) | ||
output$plot7 <- renderRglwidget({image_x3p(x3p_scaled,zoom=1);rglwidget()}) | ||
output$plot8 <- renderRglwidget({image_x3p(x3p_scaled,zoom=1);rglwidget()}) | ||
output$plot9 <- renderRglwidget({image_x3p(x3p_scaled,zoom=1);rglwidget()}) | ||
output$plot10 <- renderRglwidget({image_x3p(x3p_scaled,zoom=1);rglwidget()}) | ||
output$plot11 <- renderRglwidget({image_x3p(x3p_scaled,zoom=1);rglwidget()}) | ||
output$plot12 <- renderRglwidget({image_x3p(x3p_scaled,zoom=1);rglwidget()}) | ||
output$plot13 <- renderRglwidget({image_x3p(x3p_scaled,zoom=1);rglwidget()}) | ||
output$plot14 <- renderRglwidget({image_x3p(x3p_scaled,zoom=1);rglwidget()}) | ||
output$plot15 <- renderRglwidget({image_x3p(x3p_scaled,zoom=1);rglwidget()}) | ||
output$plot16 <- renderRglwidget({image_x3p(x3p_scaled,zoom=1);rglwidget()}) | ||
output$plot17 <- renderRglwidget({image_x3p(x3p_scaled,zoom=1);rglwidget()}) | ||
output$plot18 <- renderRglwidget({image_x3p(x3p_scaled,zoom=1);rglwidget()}) | ||
output$plot19 <- renderRglwidget({image_x3p(x3p_scaled,zoom=1);rglwidget()}) | ||
output$plot20 <- renderRglwidget({image_x3p(x3p_scaled,zoom=1);rglwidget()}) | ||
|
||
output$allplot <- renderUI({layout_column_wrap( | ||
width = 1/5, | ||
rglwidgetOutput('plot1'), | ||
rglwidgetOutput('plot2'), | ||
rglwidgetOutput('plot3'), | ||
rglwidgetOutput('plot4'), | ||
rglwidgetOutput('plot5'), | ||
rglwidgetOutput('plot6'), | ||
rglwidgetOutput('plot7'), | ||
rglwidgetOutput('plot8'), | ||
rglwidgetOutput('plot9'), | ||
rglwidgetOutput('plot10'), | ||
rglwidgetOutput('plot11'), | ||
rglwidgetOutput('plot12'), | ||
rglwidgetOutput('plot13'), | ||
rglwidgetOutput('plot14'), | ||
rglwidgetOutput('plot15'), | ||
rglwidgetOutput('plot16'), | ||
rglwidgetOutput('plot17'), | ||
rglwidgetOutput('plot18'), | ||
rglwidgetOutput('plot19'), | ||
rglwidgetOutput('plot20') | ||
)}) | ||
} | ||
|
||
|
||
shinyApp(ui = ui, server = server) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
|
||
# options(rgl.useNULL = TRUE) | ||
library(rgl) | ||
library(x3ptools) | ||
library(bulletxtrctr) | ||
# bull <- read_bullet("~/Desktop/bull") | ||
|
||
bull <- read_bullet("~/Desktop/csafe/bullet/bulletanalyzer/dump/bull") | ||
bull$x3p <- lapply(bull$x3p,x3p_m_to_mum) | ||
bull$x3p <- lapply(bull$x3p,function(x) y_flip_x3p(rotate_x3p(x,angle = -90))) | ||
bull$x3p <- lapply(bull$x3p,function(x) x3p_add_hline(x,yintercept = 375, size = 10, color = "#e6bf98")) | ||
x3p_scaled <- x3p_interpolate(bull$x3p[[1]],resx=8) | ||
image_x3p(x3p_scaled,zoom=.75) | ||
|
||
|
||
# snapshot3d("~/Downloads/test.png") | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
options(rgl.useNULL = TRUE) | ||
library(rgl) | ||
library(x3ptools) | ||
library(bulletxtrctr) | ||
bull <- read_bullet("Dump/bull") | ||
# bull <- read_bullet("~/Desktop/csafe/bullet/bulletanalyzer/dump/bull") | ||
bull$x3p <- lapply(bull$x3p,x3p_m_to_mum) | ||
bull$x3p <- lapply(bull$x3p,function(x) y_flip_x3p(rotate_x3p(x,angle = -90))) | ||
bull$crosscut <- sapply(bull$x3p,x3p_crosscut_optimize) | ||
bull$x3p <- lapply(bull$x3p,function(x) x3p_add_hline(x,yintercept = 51.5625, size = 20, color = "#ea2b1f")) | ||
# x3p_scaled <- x3p_interpolate(bull$x3p[[1]],resx=8) | ||
x3p_sampled <- x3p_sample(bull$x3p[[1]],m=5) | ||
image_x3p(x3p_sampled,zoom=.75) | ||
|
||
|
||
# snapshot3d("~/Downloads/test.png") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
## Ubuntu packages install | ||
sudo apt install build-essential libz-dev gfortran libpng-dev libblas-dev liblapack-dev libjpeg-dev libxml2-dev libtiff5-dev libx11-dev libcurl4-openssl-dev libssl-dev libgl1-mesa-dev libglu1-mesa-dev | ||
|
||
## Install Google Chrome Command Line | ||
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb | ||
sudo dpkg -i google-chrome-stable_current_amd64.deb | ||
sudo apt-get install -f | ||
sudo dpkg -i google-chrome-stable_current_amd64.deb | ||
|
||
## Install R | ||
|
||
## Install R Packages | ||
install.packages(c("shiny","shinyjs","shinyBS","shinycssloaders","shinyscreenshot","bslib","bsicons","ggplot2","randomForest","dplyr","DT","remotes","webshot2")) | ||
|
||
remotes::install_github("dmurdoch/rgl") | ||
remotes::install_github("heike/x3ptools") | ||
remotes::install_github("heike/bulletxtrctr") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,203 @@ | ||
h4 { | ||
font-family: 'Montserrat', sans-serif; | ||
font-weight: 700; | ||
/* color: #003A70;*/ | ||
} | ||
|
||
h3 { | ||
font-family: 'Montserrat', sans-serif; | ||
font-weight: 700; | ||
color: #003A70; | ||
} | ||
|
||
h2 { | ||
font-family: 'Montserrat', sans-serif; | ||
font-weight: 500; | ||
} | ||
|
||
h1 { | ||
font-family: 'Montserrat', sans-serif; | ||
font-weight: 700; | ||
font-size: 36px; | ||
} | ||
|
||
body { | ||
font-family: 'Montserrat', sans-serif; | ||
font-weight: 500; | ||
font-size: 16px; | ||
color: #545859; | ||
} | ||
|
||
html, body { | ||
height: 100%; | ||
} | ||
|
||
.well { | ||
background-color: #003A70; | ||
color: white; | ||
border: 0px; | ||
margin-left: 14px; | ||
} | ||
|
||
.help-block { | ||
color: white; | ||
} | ||
|
||
#app-container { | ||
height: 100%; | ||
display: flex; | ||
flex-direction: column; | ||
} | ||
|
||
#global-navbar { | ||
background-color: #FFFFFF; | ||
overflow: hidden; | ||
height: 120px; | ||
} | ||
|
||
.container-fluid { | ||
padding-left: 0px; | ||
padding-right: 0px; | ||
} | ||
|
||
.tab-content { | ||
padding-left: 10px; | ||
padding-right: 10px; | ||
padding-top: 15px; | ||
} | ||
|
||
.navbar-default { | ||
background-color: #003A70; | ||
padding-left: 10px; | ||
margin-bottom: 20px; | ||
} | ||
|
||
/* Targeting inactive tabs */ | ||
.navbar-nav > li:not(.active) > a { | ||
color: white; /* Sets the text color to white for inactive tabs */ | ||
} | ||
|
||
/* Changing text color on hover for inactive tabs */ | ||
.navbar-nav > li:not(.active) > a:hover { | ||
color: white; /* Sets the hover text color to light grey */ | ||
} | ||
|
||
#global-footer { | ||
background-color: #003A70; | ||
overflow: hidden; | ||
height: 60px; | ||
} | ||
|
||
#global-navbar a, #global-navbar img, #global-footer a #global-footer p { | ||
float: left; | ||
display: block; | ||
text-align: center; | ||
text-decoration: none; | ||
line-height: 80px; | ||
padding-left: 10px; | ||
} | ||
|
||
#global-navbar img { | ||
height: 70px; | ||
margin-top: 5px; | ||
margin-bottom: 5px; | ||
vertical-align: middle; | ||
} | ||
|
||
#global-footer img { | ||
height: 60px; | ||
margin-top: 00px; | ||
margin-bottom: 10px; | ||
margin-left: 20px; | ||
vertical-align: middle; | ||
} | ||
|
||
#global-footer a, #global-footer p { | ||
color: white; | ||
margin-top: 20px; | ||
} | ||
|
||
#global-navbar a { | ||
color: white; | ||
} | ||
|
||
#global-navbar a:hover, #global-footer a:hover { | ||
background-color: #ddd; | ||
color: black; | ||
} | ||
|
||
#global-navbar a.right-float, #global-footer a.right-float, #global-navbar p.right-float, #global-footer p.right-float { | ||
float: right; | ||
margin-right: 20px; | ||
} | ||
|
||
#header-image img { | ||
max-width: 100%; | ||
width: 100%; | ||
max-height: 80px; | ||
height: 80px; | ||
vertical-align: middle; | ||
margin-top: 20px; | ||
} | ||
|
||
#main-content { | ||
flex: 1; | ||
} | ||
|
||
#global-footer { | ||
margin-top: auto; | ||
} | ||
|
||
#customPopover { | ||
position: fixed; | ||
top: 50px; | ||
left: 50%; | ||
transform: translateX(-50%); | ||
background-color: #f9f9f9; | ||
border: 1px solid #ccc; | ||
border-radius: 5px; | ||
padding: 10px; | ||
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); | ||
z-index: 1050; | ||
display: none; | ||
} | ||
|
||
.btn-default { | ||
color: #003A70; | ||
background-color: white; | ||
font-family: 'Montserrat', sans-serif; | ||
font-weight: 700; | ||
} | ||
|
||
.modal-content { | ||
background-color: rgba(0, 58, 111, 0.8); /* Blue with 80% transparency */ | ||
color: white; | ||
} | ||
|
||
.modal-dialog { | ||
position: fixed; /* Or 'absolute' depending on your layout */ | ||
top: 30%; | ||
left: 45%; | ||
transform: translate(-45%, -30%); | ||
} | ||
|
||
.responsive-text { | ||
font-size: 2vw; | ||
} | ||
@media (max-width: 600px) { | ||
.responsive-text { | ||
font-size: 3vw; /* Larger on small screens */ | ||
} | ||
} | ||
|
||
.rounded-box { | ||
border: 2px solid #ddd; | ||
border-radius: 15px; | ||
padding: 10px; | ||
margin-bottom: 10px; | ||
display: inline-block; | ||
} | ||
|
||
.center-container { | ||
text-align: center; | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.