Giter Club home page Giter Club logo

ripplegl's Introduction

ripplegl

Ripple Tank, webgl version

Introduction

RippleGL is a ripple tank simulation that runs in the browser. It was originally written by me, Paul Falstad, as a Java Applet. Then Iain Sharp adapted one of my other applets, a circuit simulator, to run in the browser using GWT. So I used some of his code to build a similar port of the java ripple tank to GWT. In the process, I also converted the simulation code to WebGL, for much better performance.

For a hosted version of the application see http://www.falstad.com/ripple/

Building the web application

The tools you will need to build the project are:

  • Eclipse, Oxygen version.
  • GWT plugin for Eclipse.

Install "Eclipse for Java developers" from here. To add the GWT plugin for Eclipse follow the instructions here.

This repository is a project folder for your Eclipse project space. Once you have a local copy you can then build and run in development mode or build for deployment. Running in super development mode is done by clicking on the "run" icon on the toolbar and choosing http://127.0.0.1:8888/Ripple.html from the "Development Mode" tab which appears. Building for deployment is done by selecting the project root node and using the GWT button on the Eclipse taskbar and choosing "GWT Compile Project...".

GWT will build its output in to the "war" directory. In the "war" directory the file "iframe.html" is loaded as an iFrame in to the spare space at the bottom of the right hand pannel. It can be used for branding etc.

Deployment of the web application

  • "GWT Compile Project..." as explained above. This will put the outputs in to the "war" directory in the Eclipse project folder. You then need to copy everything in the "war" directory, except the "WEB-INF" directory, on to your web server.

The link for the full-page version of the application is now: http://<your host>/<your path>/Ripple.html

Just for reference the files should look like this

-+ Directory containing the front page (eg "ripple")
  +- Ripple.html - full page version of application
  ++ ripple (directory)
   +- various files built by GWT
   +- examples (directory)
   +- setuplist.txt (index in to example directory)

Embedding

You can link to the full page version of the application using the link shown above.

If you want to embed the application in another page then use an iframe with the src being the full-page version.

You can add query parameters to link to change the applications startup behaviour. The following are supported:

.../Ripple.html?rol=<string> // Load the example from the URL
.../Ripple.html?startExample=<filename> // Loads the file named "filename" from the "examples" directory
.../Ripple.html?colorScheme=rrggbb,rrggbb,... // 8 hex color specifications for walls, + waves, - waves, 0 waves, +,-,0 waves in media, sources

Building an Electron application

The Electron project allows web applications to be distributed as local executables for a variety of platforms. This repository contains the additional files needed to build Ripple as an Electron application.

The general approach to building an Electron application for a particular platform is documented here. The following instructions apply this approach to Ripple.

To build the Electron application:

  • Compile the application using GWT, as above.
  • Download and unpack a pre-built Electron binary directory version 9.3.2 for the target platform.
  • Copy the "app" directory from this repository to the location specified here in the Electron binary directory structure.
  • Copy the "war" directory, containing the compiled Ripple application, in to the "app" directory the Electron binary directory structure.
  • Run the "Electron" executable file. It should automatically load Ripple.

Thanks to @Immortalin for the initial work in applying Electron to CircuitJS1, which was then applied to Ripple.

License

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

ripplegl's People

Contributors

pfalstad avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

ripplegl's Issues

pure Java version?

Hey there. Great application, having lot's of fun playing around with it. I wonder if there is still the previous pure Java version around? I guess it's much more efficient with GL and shaders, but I'd be interested to see it run on plain desktop. Thanks!

Source is different than production

I saw you recently added the new probe feature, so awesome! I've been trying to write my own implementation based your source, however I can never get it to run. I believe it's because of gwt, but after looking at the source from the hosted version on your website, it appears that the two aren't the same. Anyways, was just wondering if you have any insights on the issue. Thanks!

sound wave propagation speed issue

An attempt to simulate an acoustic waveguide with vanes leads to unexpected results from the simulation.
Sound wave propagation seems to be different in different sections of the waveguide.

vanes-5

$ 3 2000 125 0 0 728 0.00037463
S 2 251 837 251 1163 0 0.01637368881118881 0 10.000178395549446 99.9998652719957 1 0
w 0 250 836 250 1164
w 0 250 1164 252 1164
w 0 250 836 252 836
w 0 252 1164 255 1164
w 0 252 836 255 836
w 0 255 1164 257 1164
w 0 255 836 257 836
w 0 257 1164 260 1164
w 0 257 836 260 836
w 0 260 1164 263 1164
w 0 260 836 263 836
w 0 263 1164 267 1164
w 0 263 836 267 836
w 0 267 1164 270 1165
w 0 267 836 270 835
w 0 270 1165 274 1165
w 0 270 835 274 835
w 0 274 1165 278 1166
w 0 274 835 278 834
w 0 278 1166 283 1167
w 0 278 834 283 833
w 0 283 1167 288 1168
w 0 283 833 288 832
w 0 288 1168 293 1169
w 0 288 832 293 831
w 0 293 1169 299 1171
w 0 293 831 299 829
w 0 299 1171 304 1172
w 0 299 829 304 828
w 0 304 1172 310 1174
w 0 304 828 310 826
w 0 310 1174 317 1177
w 0 310 826 317 823
w 0 317 1177 323 1179
w 0 317 823 323 821
w 0 323 1179 331 1182
w 0 323 821 331 818
w 0 331 1182 338 1186
w 0 331 818 338 814
w 0 338 1186 346 1190
w 0 338 814 346 810
w 0 346 1190 355 1194
w 0 346 810 355 806
w 0 355 1194 364 1199
w 0 355 806 364 801
w 0 364 1199 373 1204
w 0 364 801 373 796
w 0 373 1204 382 1211
w 0 373 796 382 789
w 0 382 1211 393 1217
w 0 382 789 393 783
w 0 393 1217 403 1224
w 0 393 783 403 776
w 0 403 1224 414 1232
w 0 403 776 414 768
w 0 414 1232 426 1240
w 0 414 768 426 760
w 0 426 1240 437 1248
w 0 426 760 437 752
w 0 437 1248 450 1258
w 0 437 752 450 742
w 0 450 1258 462 1268
w 0 450 742 462 732
w 0 462 1268 475 1279
w 0 462 732 475 721
w 0 475 1279 490 1290
w 0 475 721 490 710
w 0 490 1290 503 1302
w 0 490 710 503 698
w 0 503 1302 518 1314
w 0 503 698 518 686
w 0 518 1314 534 1327
w 0 518 686 534 673
w 0 534 1327 549 1341
w 0 534 673 549 659
w 0 549 1341 565 1355
w 0 549 659 565 645
w 0 565 1355 582 1370
w 0 565 645 582 630
w 0 582 1370 598 1384
w 0 582 630 598 616
w 0 598 1384 615 1400
w 0 598 616 615 600
w 0 615 1400 633 1416
w 0 615 600 633 584
w 0 633 1416 650 1432
w 0 633 584 650 568
w 0 650 1432 668 1449
w 0 650 568 668 551
w 0 668 1449 686 1466
w 0 668 551 686 534
w 0 686 1466 705 1484
w 0 686 534 705 516
w 0 705 1484 723 1501
w 0 705 516 723 499
w 0 723 1501 741 1518
w 0 723 499 741 482
w 0 741 1518 761 1536
w 0 741 482 761 464
w 0 761 1536 779 1553
w 0 761 464 779 447
w 0 779 1553 798 1572
w 0 779 447 798 428
w 0 798 1572 816 1589
w 0 798 428 816 411
w 0 816 1589 833 1606
w 0 816 411 833 394
w 0 833 1606 852 1624
w 0 833 394 852 376
w 0 852 1624 870 1641
w 0 852 376 870 359
w 0 870 1641 887 1658
w 0 870 359 887 342
w 0 887 1658 904 1674
w 0 887 342 904 326
w 0 904 1674 921 1691
w 0 904 326 921 309
w 0 921 1691 938 1707
w 0 921 309 938 293
w 0 938 1707 953 1722
w 0 938 293 953 278
w 0 953 1722 969 1738
w 0 953 278 969 262
w 0 969 1738 984 1752
w 0 969 262 984 248
w 0 984 1752 998 1766
w 0 984 248 998 234
w 0 998 1766 1012 1780
w 0 998 234 1012 220
w 0 1012 1780 1026 1793
w 0 1012 220 1026 207
w 0 1026 1793 1039 1806
w 0 1026 207 1039 194
w 0 1039 1806 1052 1819
w 0 1039 194 1052 181
w 0 1052 1819 1064 1830
w 0 1052 181 1064 170
w 0 1064 1830 1075 1842
w 0 1064 170 1075 158
w 0 1075 1842 1087 1853
w 0 1075 158 1087 147
w 0 1087 1853 1097 1862
w 0 1087 147 1097 138
w 0 1097 1862 1107 1873
w 0 1097 138 1107 127
w 0 1107 1873 1117 1882
w 0 1107 127 1117 118
w 0 1117 1882 1126 1891
w 0 1117 118 1126 109
w 0 1126 1891 1134 1899
w 0 1126 109 1134 101
w 0 1134 1899 1143 1908
w 0 1134 101 1143 92
w 0 1143 1908 1150 1915
w 0 1143 92 1150 85
w 0 1150 1915 1158 1922
w 0 1150 85 1158 78
w 0 1158 1922 1165 1929
w 0 1158 78 1165 71
w 0 1165 1929 1171 1935
w 0 1165 71 1171 65
w 0 1171 1935 1177 1941
w 0 1171 65 1177 59
w 0 1177 1941 1183 1947
w 0 1177 59 1183 53
w 0 1183 1947 1188 1952
w 0 1183 53 1188 48
w 0 1188 1952 1193 1957
w 0 1188 48 1193 43
w 0 1193 1957 1197 1961
w 0 1193 43 1197 39
w 0 1197 1961 1202 1966
w 0 1197 39 1202 34
w 0 1202 1966 1205 1969
w 0 1202 34 1205 31
w 0 1205 1969 1209 1973
w 0 1205 31 1209 27
w 0 1209 1973 1212 1976
w 0 1209 27 1212 24
w 0 1212 1976 1215 1979
w 0 1212 24 1215 21
w 0 1215 1979 1218 1982
w 0 1215 21 1218 18
w 0 1218 1982 1220 1984
w 0 1218 18 1220 16
w 0 1220 1984 1222 1986
w 0 1220 16 1222 14
w 0 1222 1986 1224 1988
w 0 1222 14 1224 12
w 0 1224 1988 1226 1989
w 0 1224 12 1226 11
w 0 1226 1989 1227 1991
w 0 1226 11 1227 9
w 0 1227 1991 1228 1992
w 0 1227 9 1228 8
w 0 1228 1992 1229 1992
w 0 1228 8 1229 8
w 0 1229 1992 1229 1993
w 0 1229 8 1229 7
w 0 261 1082 282 1083
w 0 261 918 282 917
w 0 282 1083 303 1084
w 0 282 917 303 916
w 0 303 1084 325 1087
w 0 303 916 325 913
w 0 325 1087 348 1090
w 0 325 913 348 910
w 0 348 1090 371 1094
w 0 348 910 371 906
w 0 371 1094 396 1099
w 0 371 906 396 901
w 0 396 1099 422 1104
w 0 396 901 422 896
w 0 422 1104 449 1111
w 0 422 896 449 889
w 0 449 1111 478 1119
w 0 449 889 478 881
w 0 478 1119 510 1128
w 0 478 881 510 872
w 0 510 1128 544 1138
w 0 510 872 544 862
w 0 544 1138 581 1149
w 0 544 862 581 851
w 0 581 1149 621 1162
w 0 581 851 621 838
w 0 621 1162 664 1177
w 0 621 838 664 823
w 0 664 1177 711 1192
w 0 664 823 711 808

Source: https://www.diyaudio.com/forums/multi-way/338806-acoustic-horn-design-easy-ath4-post6786379.html

Unstable issue

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.