Baby's First Physics Simulation
Happy June!
Comments (58)
Sorry Hit return Loaded 'rebound' and all the Jupyter and iPython stuff. It is fun to simulate the Solar System and then introduce mutant bodies into it and watch it blow up. Thanks for introduction to very accessible program. k
Hi Angela
On a slightly off-topic but literal note, have you seen "Astrophysics for Babies" -- I met the one author at a Quantum Physics open house at the Toronto Science Centre and really enjoyed his mindset of trying to teach very young children to be interested in science. Associate link: https://amzn.to/3CY1iZ1
Thanks for this one :) my personal feeling on the adds is: I use brave browser with adblocker so I never see them anyway and try to pay for the content I enjoy (I'll get youtube premium soon but still have a couple of issues with the way it works plus I'm a little broke aha). So the current setup works ok for me. Have a good month :)
Lighting and camera angle looked good. Enjoying your content. Dont go on Joe Rogan, or rather continue to not be someone he would want.
thanks for this video, it really once again reminded me of my first physical simulation I did like a year ago, where I made two huge mistakes. First was too big a time step, the second was a assumption regarding the direction of drag. Combined they launched my parachuting little guy into outer space with speeds that quickly ramped up to infinity as soon as he released his chute. (assumed v would always be downward, but when forces applied with enough of a timestep v went up, and v was assumed to always be down in the drag model lol) Anyway I really hope you do tear into astrology if you feel like it, but here's my long time braincooked and not very good "defense": Assuming that humans start making formative memories at a certain point after birth give or take a few months or whatever, let's say you were born in march, a lot of your earliest memories will be from your first winter, a lot of time indoors etc. September, first memories hanging out on the beach. This also obviously assumes climate, hemisphere, a lot about family etc.. But on the whole I do not think that when you were born and how you become are independent. And for a target demographic in say a horoscope column, you can get away with assuming a lot of these things. Its still all woo ofcourse just a thing that won't stop circling the drain of my brain.
I find anything she says about any topic interesting but personally I wouldn't be interested in a video on Astrology. It's just pseudoscience IMO and there isn't much more to say on it after that.
Loved this one! As a developer/math obsessed CompSci loser, it's really refreshing to hear your perspective on what's seen as important CS-wise within your field. Maybe just me, but I think a video centered on the computational aspects (i.e how you approached learning those things with a physics oriented brain, more detailed hardware/software specs that are relevant to the progress of the field, even just some lists of recommendations for intuitive software and novice-oriented projects to learn from, would make for awesome content!) I can't tell you how much I appreciate the diligence you take to differentiating between what a computer does and what is actually meaningful. Anyway, good as always, would also enjoy astrology debunking or book/show talk just as well, do whatever you want we're just here for the gud gud science whenever it comes <3
Outstanding content as usual. The comments here are... fine. it's fine.
Please do take a vacation. I'm getting old now and I wish I had a.) taken more vacations, b.) taken more sight-seeing/decompression trips, c.) visited my further flung friends and family more/more often, and d.) seen more plays/concerts and other live events. One often says they will do such things when the time is right, but the time is rarely right -- so getting in the habit of just doing such things anyway is, I think, a good habit to try to cultivate.
Thanks for another enjoyable and enlightening video. The audio and video quality seemed very good to me. Your random discussion / philosophical musings are always good as far as I am concerned.
Awesome videos. Would you ever do a video on Hoag's Object? Not sure if wierd galaxies are in your area if interest but that thing fascinates me.
Framework do a decent linux laptop, but the Arch link above is probably the best one to look through! I've been happy with my Lenovo thinkpad carbon running debian12 for ages. Though, as a long term linux sysadmin I find it easy to troubleshoot. I get that it's not for everyone, but yeah, Microsoft is really getting anti consumer. I remember coding up my own n body simulation for undergrad astrophysics, I remember it was great until my bodies got too close, then the accelerations encountered some sort of overflow and the simulation blew up!
The ads in Windows 11 were a horrible idea, but here's the thing: you can remove them quite easily. If Apple ever decides to do the same thing, it will probably be much harder to get rid of them. Hopefully Apple will continue to over-price their hardware, so that they don't feel the need to put ads on the desktop. If you don't want a Windows PC with lots of bloatware, it's best to avoid places like Best Buy. The machines they sell usually come from OEMs that subsidize their low prices via bloatware deals with companies like Norton. You can buy a PC with no bloatware from dedicated PC builders. It will probably cost a bit more, but in exchange, you get a PC without bloatware, and usually one with higher-quality components. Apple doesn't have to deal with this issue, because it doesn't let anyone else make Mac-compatible devices. Some people see this as a good thing, but I'm not one of them.
For me the answer to the question "Should /someone take a vacation?" is always "Absolutely!" In your case escaping summer could even mean change hemisphere, but I'm sure there should be somewhere nice to enjoy some cold weather. Anyway, we'll be here when you're back
If you have a link to the thermocouple interface documentation, I can probably whip up some Python that can read its data. It’s probably just a serial port in there. 🙂
Regarding what you said about timestepping, and making a video about time - I've seen a lot of science-education videos online talking about "the arrow of time", and how a lot of the equations of motion for things like orbits could run in reverse, and you'd have no way of telling from an outside perspective. But as you mentioned re: what to include in a simulation - is this just a function of not including enough detail, like... gravitational waves or something? Regarding scientific simulations in general, and timestepping - I know exactly what you mean. I did computational geodynamics, so modelling tectonic plates and such. We use the stokes flow equations - and they don't have a time parameter at all! We just have to solve the flow equations instantaneously (based on all the various forces and viscosity, etc.), and then just pick a time step to migrate all the particles around. The same issues tend to come up though, e.g.: if you pick a timestep that is too large, the particles end up in weird places. So we do another instantaneous solve at their new positions, and rinse/repeat. Weird!
sorry to be repetitious but i'd still like more autobiographical videos. a. collier's story is a saga of self determination that is inspiring in the extreme. her memoir to date, even as young as she is, would be a best seller in my estimation.
That’s a weird thing to say dude
Awesome video! Nice concise overview of simulations and the kind of complications that can arise while implementing them. Would've loved to hear more about different numerical methods:) When you set the COR to one, the max height still kept decreasing quite noticeably. Thought it was a little weird that you said it stayed constant. The position probably has to be reset to zero and the velocity interpolated back to the ground level before flipping it or something to get a less noticeable decay. This would be a more direct way to improve the results than adding drag. Anyway great stuff! A few years ago my colleague bought a new MacBook and gave me his old one. I've used Windows mostly, then Debian based distros for a while before that. Never going back.
Another huge difference between Linux and Windows is how bloated the latter is (memory and disk). Becomes very obvious when you run them as virtual machines. Especially if you don't need the graphical user interface, then you can just turn that off in Linux.
the tradeoff I struggle with is effort to get stuff I need working vs effort to work around enshittification. windows is leading the charge but mac is hardly unscathed. I've used all 3, and don't really find any of the above satisfactory.
Totally understandable that you haven't made it your thing to get into the weeds on philosophy, but "it's all a simulation" is a respin on a concept from philosophy called solipsism. I'm not sure anyone has had anything new to say about it since Decartes, certainly not the current batch of techbro simulation cultists. Descarte's writings on solipsism is where the famous quote "cogito ergo sum"/"I think therefore I am" comes from.
oh also there's some writing on the "brain in a vat" scenario from Putnam that is at least marginally interesting but it gets tedious really quick so recommend you not bother as there's nothing here that you couldn't guess. I don't think I am especially advantaged over someone who has never heard of any of this because I took a few philosophy classes. it's unfalsifiable so not really worth worrying about. people talk about trying to hack into the simulation software, or looking for simulation rendering artifacts, but that to me just seems like doing physics without recognizing you are doing physics or going about it in a competent way.
When I started buying personal computers ( a long time ago), I preferred Windows over Mac as I felt it gave me more opportunity to configure things than Mac did, but now I agree that Microsoft has taken a ridiculous direction and my children in college and most of the engineers that I manage prefer Macs.
I ditched my last Windows machine a few years ago. Linux is still frustrating in many ways, especially when you have to deal with things like graphics drivers. But it's frustrating in a "why is this free thing not working perfectly" way, rather than a "why is this thing I pay money for attempting to control my behavior and show me ads" way.
Oh my gosh, I spent WAYYYY too much time trying to figure out why the ball got stuck after the second bounce with e=0.75 (and many other values). It's actually a great example of how easy it is for a simulation to diverge from reality (and why I give up every time I implement a physics simulation). In this case the problem was that the ball may not rise above 0 in a single time step. If that happens it gets stuck forever, as it keeps reversing direction. The fix is to update the condition to add a "v < 0".
As a full-time, card-carrying member of the anti-astrology club, I need your debunk video like plants need water.
Also fuck Windows. ADS? In the computer that I PAID FOR???
(let's keep dunking on Windows) this is downright dangerous: > “Every few seconds, screenshots are taken. These are automatically OCR’d by Azure AI, running on your device, and written into an SQLite database in the user’s folder,” explains Beaumont in a detailed blog post. “This database file has a record of everything you’ve ever viewed on your PC in plain text.” An entire timelapse of your digital activities being sent to the cloud (as in someone else's computer) and then the text is just dumped into a local SQLite database... And (in it's current form) is *opt-out*, if you don't want that _you_ are responsible for turning it off! https://www.theverge.com/2024/6/3/24170305/microsoft-windows-recall-ai-screenshots-security-privacy-issues
yeah the crap that is thrown on top of Windows is quite unfortunate but there is no OS out there that can compete with the WinNT kernel, it is by far the superior system
Please please please get a chalkboard
Parallels is a thing. ;-) https://www.parallels.com/products/desktop/
a subscription? to willingly infect my computer with windows???
Great video, thanks! Also, would my fellow Patreons or Patreees or whatever-we-are consider commenting and showing some approval for DrAC taking a vacation. In my experience, it’s really easy to feel guilty about spending money on yourself and perhaps that’s something that the encouragement of a few supportive commenters could assist with. After all, how is DrAC supposed to stay funny if she doesn’t recharge her batteries by… (quickly does some Googling) …travelling to KY in order to have an ATV adventure in Letcher County? On a different topic, I hate to say it, but the gulf between simulations and reality is maybe what Wolfram is talking about when he says matter is in some sense computational - that in some sense maybe the universe computes itself or simulates itself. That explains why he's so fascinated by iterative functions. That concept might also imply that the fundamentals of reality would be the same as the simplest possible model which exactly simulated reality. (Hmm, very difficult to put that idea into words without sounding stoned.) Also, I’d very much like to hear DrAC vent her annoyance about the Picard series. We might even achieve some group catharsis.
I’m cool with allowing the adult to make her own decisions without feeling the need to brow beat her about her choices.
Computers suck now. It's basically the consequence of people not spending money on operating systems anymore, though that crap bloatware goes back decades now (though now it's part of Windows in addition to being installed by the laptop maker). The main topic just made me think of all the times Sean Carroll has to say "Laplace's Demon is not real" in his AMAs - we can't faithfully simulate our reality without something the size/complexity of our reality
This was a great video. I really appreciated the insight into the techniques and simplifications you went into when simulating a galaxy for your PhD thesis. When I was in high school, I wrote a program in Microsoft BASIC on my then-new PC-XT clone, running at a blisteringly fast 8 MHz, with a monochrome orange screen. I wanted to simulate stars moving in a galaxy under gravity, but my computer was several orders of magnitude slower than a modern PC, and running BASIC which made it even slower still, and I also didn't simulate dark matter because I didn't know I had to do that. Thanks to your videos, I know now, though! Anyway, I could only get up to about a dozen or so stars before the simulation ran too slowly to be useful, and in general the stars tended to move randomly and fling each other out of the boundaries of my simulation. So I didn't learn a lot, but it was still fun! You're so right about Windows PCs. My one Windows PC (that I use to run the TV and play video games on) recently told me that a) Microsoft would be ending support for Windows 10 next year and b) My PC wasn't new enough to run Windows 11, so I was basically out of luck. Which is complete garbage. My PC was state of the art a few years back, and still runs new AAA games at 1080p just fine, and besides, what on Earth does Windows 11 do that requires more horsepower than Windows 10? The answer is nothing; it requires new specialized hardware so that it can lock things down more and spam you with more ads and things that will be more and more difficult to block. Also I'm pretty sure Microsoft said that Windows 10 would be the last Windows version, and they would just keep upgrading that, which they did not do.
Just stay away from all the proprietary data acq and control stuff. Labview can be ok for setting stuff up quickly at first, especially when you want a strip chart recorder or xy plotter, but it's deceptive because they'll deprecate your VIs away if you don't update regularly ($$$). I started moving back to doing things "the hard way" several years ago because it ends up being easier and more durable and you spend less time fighting with tools that won't let you do what you want unless you pay for yet another module. You can probably do what you want to with linux just as fast as with labview, and it will work forever. A lot of the outboard hardware makers make drivers for linux, and you can even use a cheap arduino as an outboard A/D, D/A and digital I/O board. Some things will be hack-ish because you'll end up with PWM for D/A, and the A/D is only 10 bit, but it's easy to do demos and get small specialized parts that will interface. And you probably have all the practice using the scientific plotting tools in linux to get pretty dynamic plots as fast as in labview. And it will run on an old computer and still run on the computer you buy in 10 years. (ETA: I bought a decent windows ATX box used from someone a year or so ago for when something really demands it, and also to be able to run some stuff that just needs to sit by itself and do FFTs (using a Linux VM on it), and found that I basically don't really need it)
Ok, 20+ years as a software engineer here, and the last few years working with (and improving) physicists’ simulation code - no need to feel bad about your code. Any “coder” who gives you shit for functioning, concise code is an amateur. At best. Fuck em. You did a GREAT job of explaining the difficulties of scaling simulations to, for example, all stars in the galaxy. You even touched on the concept of chaos. I kinda almost wish you’d gone deeper on that, because it hits so close to home… but hey, that’s just being greedy and unrealistic. Maybe another video, another time. Excellent job, Dr. Collier. :-)
Great video as always. I don’t think I could be more interested in your concept of time video if you paid me to be! 😂 definitely looking forward to that one.
I've found that the "Windows 10 Enterprise LTSC" editions are the most tolerable of all, almost no ads / bloatware. Don't get me wrong, it's still late-stage-capitalism Windows, but it's a lot A LOT less annoying. The downside is that these are not freely available (I think); the one I use (because I have to) I got it because of work. Otherwise hell yea Linux FTW. Aside: If you are considering running Linux in a laptop, because driver support in Linux is not perfect, a good starting point is https://wiki.archlinux.org/title/Category:Laptops and pick a laptop from there with good hardware support (then install whatever distro you want, doesn't have to be Arch). Something worth a try is to install Steam and it's Proton emulation layer and add software to it as it were an non-Steam game. For example same as in these steps: https://www.rockpapershotgun.com/how-to-install-battlenet-on-steam-deck but instead of selecting the Battle.net installer, just install your Windows software and give it a try. I'm not sure about Windows software that wants to access hardware tho...
Have you found running productivity applications through Steam to work better than just using Bottles?
Its so terrible the state of Windows. I got a new work laptop and spent a good hour getting rid of so much crap - I recommend this which helps a little bit to get rid of some of the garbage https://github.com/ChrisTitusTech/winutil
I am so very sorry, but if I don't say this, I'll explode. The first thing I thought when you showed the little function that simulates the bouncing ball was "There's a slight possibility the ball will get stuck under the ground." And then it did, on the e=0.75 simulation, that's why it only bounced once, then just stopped. On another topic, I've been using mostly Microsoft products since MSDOS days. I don't think I'll buy another one. I've got my Chromebook (I know, Google has its own problems) for web stuff and otherwise, I'm just going to upgrade parts on my old gaming computer and just run Linux on it.
thanks!
I wrote a big long comment then checked another app and the comment is gone. so I'll just say you're funny and leave it at that.
Sounds like a vacation is needed - at least from Windows.. Thanks for this one, I really liked the deep dive into the simulation process. And I enjoy philosophy talk. I always think of it as the analog world vs the digital world when it comes to time. It is not the same until you are slicing the sampling all the way down to the plank time slice. - cheers
I read Jenny Odell's book about time and it kind of covers this idea of physical time versus experienced time and...it is just a very interesting thing to think about
Dr. Collier have you always written your 0’s as phi’s? It’s the dumbest thing but I feel like I should have noticed earlier.
Φ has a vertical line, 0 (zero) does not, although a diagonal slash or a central dot is sometimes added for disambiguation with O. Some people also add a crossbar to 7 and Z for the same reason.
Oooo I'm learning things in my computer-ey way of things.
I'm a software engineer with 20+ years of experience. Don't sweat your coding experience. It's all good.
Speaking as a professional coder, without having even seen your code yet, your code is fine. Don't let anyone tell you otherwise, they're jerks. Additionally, I really appreciate the explanation about testing simulations for correctness! As a working programmer I've been really curious about how scientists test their simulations, like how do we know that the simulation makes an accurate prediction for something we've not measured? All code has bugs, so learning how scientists suss out those bugs in their simulations is quite helpful :) Assuming I catch the ball is giving me far more credit than I deserve 😅 Yes, you are making sense regarding time. I think a more elegant way of saying it is that reality is continuous but simulations are discrete. Totally empathize with you on the Windows thing. I cannot tolerate it. It's not just that it doesn't actually work (crashes, bugs, etc.), but as you say, the *ads* in software you *paid for* is the most egregious thing. It breaks the implicit deal of modern software / media: you can pay to remove ads. Like with your Netflix example, or YouTube, or Hulu, or various websites. Yet you buy Windows and there's still ads. This is also why I refuse to subscribe to Apple News+: it's still got ads in it. I am not paying for something with ads in it. Ads are at best irrelevant because they aren't targeted, or if they are relevant, that relevancy comes at the cost of your privacy--and that's not even considering the psychological manipulation of advertising. grmbl grmbl year of the Linux desktop grmbl grmbl (seriously though, gaming is the only thing keeping most people on Windows at home and proton is pretty awesome sooo)
So we have "test problems" that can be solved analytically and then we "test" our code with those to ensure we get the correct answer. You can also test your code by doubling the number of particles or reducing the time step and seeing how accurate you have to get to get the same answer. Re:software and most of it they want you to pay a subscription fee! So you can't even keep the powerpoint version you paid for!
Re: chalkboard, Jeffrey Kaplan and Molly Rocket (two YouTube channels) both have setups where they have some sort of glass? Between them and the camera which allows them to write "on" the surface of the video, which they both use as a sort of whiteboard-surrounding-the-host in their editing. Might be cool to check out or inspiring for a future improvement? I'm 95% sure Jeffrey Kaplan has a video explaining the setup, which is apparently in a room at the university where he works.
ooo i will look into this
Every programmer who doesn't really get all the details of a lot of these videos perking up right now like "oh hey I bet I can understand this one all the way through"
