Skip to content

Commit 3d64ce5

Browse files
committed
initial commit
1 parent 444b518 commit 3d64ce5

File tree

16 files changed

+171835
-19
lines changed

16 files changed

+171835
-19
lines changed

.gitignore

Lines changed: 33 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,38 @@
1-
# Compiled class file
2-
*.class
1+
target/
2+
!.mvn/wrapper/maven-wrapper.jar
3+
!**/src/main/**/target/
4+
!**/src/test/**/target/
35

4-
# Log file
5-
*.log
6+
### IntelliJ IDEA ###
7+
.idea/modules.xml
8+
.idea/jarRepositories.xml
9+
.idea/compiler.xml
10+
.idea/libraries/
11+
*.iws
12+
*.iml
13+
*.ipr
614

7-
# BlueJ files
8-
*.ctxt
15+
### Eclipse ###
16+
.apt_generated
17+
.classpath
18+
.factorypath
19+
.project
20+
.settings
21+
.springBeans
22+
.sts4-cache
923

10-
# Mobile Tools for Java (J2ME)
11-
.mtj.tmp/
24+
### NetBeans ###
25+
/nbproject/private/
26+
/nbbuild/
27+
/dist/
28+
/nbdist/
29+
/.nb-gradle/
30+
build/
31+
!**/src/main/**/build/
32+
!**/src/test/**/build/
1233

13-
# Package Files #
14-
*.jar
15-
*.war
16-
*.nar
17-
*.ear
18-
*.zip
19-
*.tar.gz
20-
*.rar
34+
### VS Code ###
35+
.vscode/
2136

22-
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
23-
hs_err_pid*
24-
replay_pid*
37+
### Mac OS ###
38+
.DS_Store

.idea/.gitignore

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/encodings.xml

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/uiDesigner.xml

Lines changed: 124 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# ShowTHR
2+
3+
Read a THR file and simulate the motion of a ball rolling over a table covered in sand.
4+
5+
## Usage
6+
7+
```java -jar ShowTHR.jar <source.thr> <output> [-w <width>] [-h <height>] [-d <depth>] [-b <radius>]```
8+
9+
- `<source.thr>`: The path to the THR file.
10+
- `<output>`: The path to the output file. ImageIO supported formats are accepted, including pio and webp.
11+
- `-w <width>`: The width of the output image. Default is 300.
12+
- `-h <height>`: The height of the output image. Default is 300.
13+
- `-b <radius>`: The radius of the ball. Default is 5.
14+
- `-d <depth>`: The starting depth of the sand. Default is 2.
15+
16+
## Example
17+
18+
![Example](sand_simulation.png)
19+
20+
## Notes
21+
22+
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].
23+
If one point of sand is very tall, the rest of the image will be very dark.
24+
25+
## License
26+
27+
Apache 2.0 License

0 commit comments

Comments
 (0)