#i don't even like starbucks it's just a matter of principle at this point. like am i not good enough for your subpar coffee?
Explore tagged Tumblr posts
Text
2025 voted worst year for italian american job seekers in chicago. a hundred years ago i could've been set loose with a crowbar and a zoot suit and been able to live comfortably but today i have to apply to work at fucking target
#speak friend and enter#is bootlegging still an option? im fairly confident in my ability to make and distribute bathtub gin#the sad thing is ive applied to work at literal speakeasies and none of them have gotten back to me yet.#40 jobs on culinaryagents and not a peep. so im resorting to the unthinkable (target barista)#but in all my years of working ive applied to like no kidding ten sbux jobs and not one of them has ever gotten back to me. why is that.#i don't even like starbucks it's just a matter of principle at this point. like am i not good enough for your subpar coffee?#or do you fear my unfettered skill on the hot bar? either way please hire me im getting kinda antsy
18 notes
·
View notes
Conversation
Playing with Balls
Let me start with the simplest case of gravity balls so that you can really get a feeling for what's going on. Suppose I have two balls somewhere in space. It's just these two balls and nothing else — no planets, no stars, no Starbucks nearby. In that case the only interaction between the two balls would be gravitational. What will happen to these two balls? Since there is a gravitational force pulling them together, they will both increase in speed (that's what forces do). But as they move closer together, the gravitational force increases even more. Overall, it's an interesting motion problem.
This gravitational force would depend on the product of the mass and the distance between the two balls.
These two balls are somewhere with respect to some origin (it doesn't really matter). What matters is the vector from A to B which we can label as just r. With this vector r, I can find the gravitational force on ball B as:
I should point out a few things with this expression. This is the gravitational force on B as exerted by A. There is also a force from B on A, it would have the same magnitude but opposite direction. The G is the universal gravitational constant. The r with the "hat" is called r-hat (surprise) and it is a unit vector. This unit vector doesn't change the magnitude of the force, but without it, you would just have a scalar force and that wouldn't be so useful.
What do we do with the force anyway? The gravitational force on object B can be used to find the change in momentum of B after some time interval where the momentum is the product of mass and velocity. This comes straight from the momentum-principle.
Yes, the p is momentum. Before you ask, I don't know why we always use "p" for momentum. I guess it's because "m" was already taken to be used for the mass. OK, there is one more equation. If I know the object's momentum, then I can use the definition of momentum and average velocity to find the new position of this thing after some short time interval.
The r-vector represents the position since "p" was already taken. That was just a joke: Actually, we use "r" for position because it comes from the "r" in spherical coordinates. But this leads to something good. It goes like this: calculate the force, update the momentum and then update the position for some short time interval. Do this also for the other mass. Since the positions change, the force changes so you need to do it all again. And again. And again. Keep doing this until you want to stop — and boom. That's the whole idea behind a numerical calculation.
Let's just do it. Here is a numerical calculation for two masses in space. Go ahead and click the "play" to run and you can see the code by pressing the "pencil" icon.
I tried to put some comments (comments are lines with the # symbol in front of them) in the code so that you can sort of figure out what is going on if you want to play with it. It might not look like anything is happening at first because the balls start off really slowly. Just wait and you should see something.
What happens to the balls? They do indeed start to move towards each other and speed up during that process. However, they aren't real balls so that there is nothing preventing them from passing through each other — and so they do. After that, the gravitational force slows them down until they start moving towards each other again. If you let it, these would just oscillate back and forth forever.
Also, I cheated. The balls have a mass of 1 kilogram, but I changed the universal gravitational constant to some much larger number than the real life version. In real life these balls would take forever to get together since real gravity is super weak.
Finally, one other note. If you look at the code you can see that when the balls overlap, I set the gravitational force to the zero vector. There is a reason for this — it's not just because I'm crazy. If the center of the balls get really, really close then the magnitude of the r-vector is really, really small. A small r means a giant gravitational force. This giant gravitational force for a very short time can make weird things happen. The overlap force of zero prevents weird things.
More Gravity Balls
OK, but I think we can agree that two interacting gravity balls are sort of boring. What about 10 gravity balls? How would you make 10 balls interact? It's really just more of the same thing that worked for just two balls. With 10 balls, I can take one ball at a time. I need to find the distance to all the other balls and the gravitational force from all other balls. After that, I can update the momentum and position for that ball. Oh, I still need to do the same thing for the other nine balls. Yes, it's a bunch of work — but that's why I'm making a computer do it instead of me.
Here is an animation of what this looks like. If you want to play with the code (and you should), it's right here.
That's pretty cool right? Notice that I gave the balls a random color — just for fun. Also, these things will just keep moving around forever (or as long as the program runs). But what's next? How about 100 balls! No wait, 200 balls! This is the exact same code as before, just with more gravity balls. Actually, this is running at 5x speed so that it goes faster.
I don't know about you, but I'm really starting to get excited. You really need to check out the code and run it yourself (you can't break anything — I promise). See how many gravity balls you can run before your computer explodes (no, it won't really explode). Of course as you increase N (the number of gravity balls) you dramatically increase the number of computations. Not only do you have more balls to update with the momentum, but each ball has more balls that exert a force on it. I can get up to 1,000 balls, but it doesn't run super-fast.
Adding a Drag Force
Let's change it again. I don't want these balls to oscillate in and out forever. I want them to settle down into one big blob. I can do that by adding a drag force. This drag force has two main properties. First, it has to be in the opposite direction of each ball's momentum (or velocity) so that it makes the ball slow down. Second, the drag force should be proportional to the magnitude of the momentum so that a ball at rest has no drag force and a super-fast ball has a super high drag force.
Actually, I've had a drag force in the code the whole time — but the drag coefficient was set to zero so that it wouldn't do anything. If I put the coefficient to some arbitrary value (I picked 0.2), this is what happens (for 100 gravity balls). Note: I increased the playback speed by a factor of 10 — just because I wanted to try it.
If you zoom in to the final form, it looks like this:
The individual gravity balls still move around a little bit. Most of the balls are within the radius of the other balls (they are overlapping) so that most of these do not have a gravitational force on them. For the ones that do have a gravitational force, they get pulled back into the ball blob.
A Different Random Distribution
After playing with the gravity balls for a while (I hope someone is keeping track of how many times I write "gravity balls"), I saw something weird. With a large number of balls, I always get a formation that looks like this.
Hopefully you can see that "x". Why is there an "x"? Actually, you can even rotate this distribution of balls around and it's still and "x" in three dimensions. I think I know the cause of the "x". I created 1,000 gravity balls by picking three random numbers for each ball position. The x, y, z coordinates of each random number is between -1 and 1 so the possible positions of balls would be a “2 x 2 x 2” cube. Of course, the average center of mass for a distribution would be in the center of this cube and the masses are all attracted towards that point. But the non-spherical distribution of balls must be the cause of this x-feature.
I can test this supposition if I make a spherical distribution of gravity balls. Instead of creating random x, y, z coordinates, I am going to use spherical coordinates and create the following three variables: r (0 to 1), θ (0 to π), and φ(0 to 2π). This should make a spherical distribution and there shouldn't be the resulting "x" pattern. Here we go.
Looks good. Oh, since this distribution has 1,000 gravity balls, I will play it back at 30x speed.
Extension
There are many questions you could answer for this situation.
• In this gravity balls model there is no force when two balls overlap. How can you make this interaction so that it is more like “hard” sphere collisions with no overlapping?
• Is energy conserved in the case of 100 gravity balls with no drag force? What about momentum? Making a graph would help make the determination.
• Do you get significantly different results if the ball masses are not constant? Give the balls a random mass within some random range.
• I don't know if this will work, but what would happen if a giant collection of gravity balls (let's say 500) had a slight rotation to begin with. When the whole thing compresses into a compact ball, would that ball be spinning super-fast? It should. Oh, don't forget about the drag. If your drag force is too high you will lose angular momentum.
• What if you just give all the gravity balls some small random momentum to start with. What happens then?
• Suppose there were two massive gravity balls at the edge of the distribution of balls (opposite ends). Could these two balls make two different blobs form? That would be cool.
• Well, how does it feel to play around with your balls? Did you try playing around with the drag coefficient? You should.
0 notes