[HN Gopher] Math, Physics, and Engineering Applets
___________________________________________________________________
Math, Physics, and Engineering Applets
Author : timokoesters
Score : 80 points
Date : 2024-02-22 16:47 UTC (6 hours ago)
(HTM) web link (falstad.com)
(TXT) w3m dump (falstad.com)
| yeknoda wrote:
| Retro Ciechanowski
| TrackerFF wrote:
| Falstad circuit simulator, the app(let) that carried thousands of
| EE students through college, when they should have been writing
| Spice. (I'm guilty as charged)
|
| I have no idea who this Paul Falstad fella is, but I do owe a big
| thank you to him!
| JohnKemeny wrote:
| Well, he's the author of Zsh, for one ...
| kragen wrote:
| holy shit, i had no idea
| TrackerFF wrote:
| Must be one of them fabled 10x engineers.
| robblbobbl wrote:
| cool
| bytesmith wrote:
| Looks like he used swingjs[0] to port the applets to javascript
| since it hasn't been possible to run Java applets in a Chrome
| since v45 circa 2015. Always nice to see web 1 code live on.
|
| [0] https://chemapps.stolaf.edu/swingjs/site/swingjs/examples/
| r_klancer wrote:
| Fun! This is the kind of thing I got back into programming for
| around 2010. Just to toot my own (and my former employer's) horn,
| I worked on a bunch of the underlying models behind the Concord
| Consortium activities here: https://learn.concord.org/
|
| They're aimed more at middle and high school, are "curriculum
| aligned" and developed into classroom-ready form by professional
| educators, and then Concord researches how well they work in
| actual classrooms.
|
| We had been using a Java app (and applet) called Molecular
| Workbench for some of these, but in 2012 we got a Google.org
| grant to reimplement the same concept but natively running in
| browsers.
| kragen wrote:
| what do the models do, and how are they similar to or different
| from falstad's applets?
| torcete wrote:
| It's very cool. But also, I am surprised that java applets are
| still working nowadays. I am using safari and I didn't have to
| install anything.
|
| I honestly thought that java applets was something from the past.
| I was also surprised by their responsiveness. It's been a while
| since I saw one running, and I remember them as something clunky
| and slow.
| danans wrote:
| FTA:
|
| > These are some educational applets I wrote to help visualize
| various concepts in math, physics, and engineering. _They were
| originally written in Java, but they 've mostly been converted
| to Javascript, so you should be able to view them without a
| Java-capable browser_.
| kragen wrote:
| i've been doing a lot of small circuit simulations in paul
| falstad's circuit.js lately
|
| i've learned a lot of interesting things:
|
| - it's free software under the gnu gpl
|
| - you can download the repo and run the javascript locally when
| you're offline. for this purpose the 'export as text' file menu
| option is useful; it gives you a textual representation of the
| circuit you can copy and paste, so you aren't dependent on
| tinyurl.com to get your circuit back. like spice, it ignores
| leading whitespace, which is super convenient if you keep your
| notes in markdown
|
| - you can set the background to white (under options)
|
| - the list of available devices isn't extensive but it does
| include a tl431
|
| - the svg export (file menu) is great for including in a web
| page, but it only includes 'undocked' scopes, and the data that's
| plotted in them may not be the same as what you see
|
| - the simulations are generally in good agreement with the
| ngspice simulations i've done, but you have to use a smaller
| timestep than spice usually chooses (i guess because of the lower
| order of integration), and unless it's _much_ smaller, it can
| still have some numerical stability problems
|
| - they run slower than spice, but often the faster feedback loop
| for interactivity makes up for it
|
| - you can simulate an avr in it at the instruction level with
| avr8js: https://hackaday.com/2021/06/11/circuit-vr-arduino-
| virtually... which i don't know how to do in ngspice or any other
| spice
|
| -- *** --
|
| i have some questions, maybe someone knows the answers:
|
| - is there a way to convert spice netlists into circuit.js
| designs? because that would be pretty useful, especially if i
| could, say, import a spice model of a 7805 as a subcircuit
|
| - is there a way to convert circuit.js designs into spice
| netlists? because i feel like the schematic view is a lot clearer
| than the textual netlist
|
| - is there a way to import and/or export to kicad?
|
| - is there a way to do monte carlo simulation in circuit.js? or
| at least sensitivity analysis?
|
| -- *** --
|
| here are some circuits i've put together in circuit.js this week:
| http://tinyurl.com/27m6usjw http://tinyurl.com/23u2y4w8
| http://tinyurl.com/2cf5kgxc http://tinyurl.com/23qvuylw
| http://tinyurl.com/27agyg4q http://tinyurl.com/2bssxwjq and last
| week: http://tinyurl.com/2889h6o8 http://tinyurl.com/2a8by2mq
| (happy to explain any of these if anyone is curious)
| lxe wrote:
| I didn't expect this to "just work", but it does for me. I don't
| remember getting java installed. I'm running firefox nightly on
| windows.
| 01HNNWZ0MV43FF wrote:
| Seems to be a Java -> JS compat layer, like Ruffle.js is for
| Flash I guess: https://news.ycombinator.com/item?id=39470724
___________________________________________________________________
(page generated 2024-02-22 23:00 UTC)