-
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
1 parent
444b518
commit 3d64ce5
Showing
16 changed files
with
171,835 additions
and
19 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,38 @@ | ||
# Compiled class file | ||
*.class | ||
target/ | ||
!.mvn/wrapper/maven-wrapper.jar | ||
!**/src/main/**/target/ | ||
!**/src/test/**/target/ | ||
|
||
# Log file | ||
*.log | ||
### IntelliJ IDEA ### | ||
.idea/modules.xml | ||
.idea/jarRepositories.xml | ||
.idea/compiler.xml | ||
.idea/libraries/ | ||
*.iws | ||
*.iml | ||
*.ipr | ||
|
||
# BlueJ files | ||
*.ctxt | ||
### Eclipse ### | ||
.apt_generated | ||
.classpath | ||
.factorypath | ||
.project | ||
.settings | ||
.springBeans | ||
.sts4-cache | ||
|
||
# Mobile Tools for Java (J2ME) | ||
.mtj.tmp/ | ||
### NetBeans ### | ||
/nbproject/private/ | ||
/nbbuild/ | ||
/dist/ | ||
/nbdist/ | ||
/.nb-gradle/ | ||
build/ | ||
!**/src/main/**/build/ | ||
!**/src/test/**/build/ | ||
|
||
# Package Files # | ||
*.jar | ||
*.war | ||
*.nar | ||
*.ear | ||
*.zip | ||
*.tar.gz | ||
*.rar | ||
### VS Code ### | ||
.vscode/ | ||
|
||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml | ||
hs_err_pid* | ||
replay_pid* | ||
### Mac OS ### | ||
.DS_Store |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,27 @@ | ||
# ShowTHR | ||
|
||
Read a THR file and simulate the motion of a ball rolling over a table covered in sand. | ||
|
||
## Usage | ||
|
||
```java -jar ShowTHR.jar <source.thr> <output> [-w <width>] [-h <height>] [-d <depth>] [-b <radius>]``` | ||
|
||
- `<source.thr>`: The path to the THR file. | ||
- `<output>`: The path to the output file. ImageIO supported formats are accepted, including pio and webp. | ||
- `-w <width>`: The width of the output image. Default is 300. | ||
- `-h <height>`: The height of the output image. Default is 300. | ||
- `-b <radius>`: The radius of the ball. Default is 5. | ||
- `-d <depth>`: The starting depth of the sand. Default is 2. | ||
|
||
## Example | ||
|
||
![Example](sand_simulation.png) | ||
|
||
## Notes | ||
|
||
The intensity of the output image is dictated by highest peak in the sand simulation. The output image is normalized to the range [0, 255]. | ||
If one point of sand is very tall, the rest of the image will be very dark. | ||
|
||
## License | ||
|
||
Apache 2.0 License |
Oops, something went wrong.