Center Of Mass

Sdílet
Vložit
  • čas přidán 1. 04. 2021
  • Displaying the system's center of mass as a blue circle.
  • Věda a technologie

Komentáře • 86

  • @glorious2538
    @glorious2538 Před 3 lety +218

    Your channel is literally a hidden gem.

    • @yusufklc7821
      @yusufklc7821 Před 3 lety +2

      yeah there are lots of cool sfml projects

    • @skaramicke
      @skaramicke Před 3 lety +8

      You are literally not using the word literally literally. The channel is perfectly visible. As if that wasn’t enough, it is in fact a CZcams channel and not a gem. It is figuratively a hidden gem.

    • @glorious2538
      @glorious2538 Před 3 lety +1

      @@skaramicke Ya ever heard of an exaggerated metaphor?

    • @Thrustmaster64
      @Thrustmaster64 Před 3 lety +1

      @@glorious2538 I've literally never heard of that.

    • @glorious2538
      @glorious2538 Před 3 lety

      @@Thrustmaster64 when you put literally into a metaphor, it exaggerates its meaning.

  • @Beatsbasteln
    @Beatsbasteln Před 3 lety +72

    love when things turn out to be sine waves!

  • @KatzRool
    @KatzRool Před 3 lety +32

    Does it always end up oscillating in a line like that? And is it always simple harmonic motion?

    • @potatonoodlebear8035
      @potatonoodlebear8035 Před 3 lety +14

      Without outside forcing or collision or friction, it should continue to oscillate forever.

    • @oreos3174
      @oreos3174 Před 3 lety +3

      @@potatonoodlebear8035 I think he meant with different particles

    • @aperson1
      @aperson1 Před 3 lety +3

      By the laws of orbital mechanics, it should always either move in a line or an ellipse. I have a feeling in this case it will always be a line though, because an ellipse implies some transfer of force.

    • @potatonoodlebear8035
      @potatonoodlebear8035 Před 3 lety

      @@aperson1 ???

    • @jiqci
      @jiqci Před 2 lety

      The collision system was buggy and turned out to be anti-collision system, so yes

  • @PoroConKa
    @PoroConKa Před 3 lety +3

    This video will appear as a recommended in 5 years more

  • @user-sl6gn1ss8p
    @user-sl6gn1ss8p Před 3 lety +16

    Ooh, so what happens is that they nudge each other's orbits when they collide, which in time finds a stable configuration on which there are no collisions, since there is no changing external factor?
    Do the circles attract each other, or are they just attracted by the invisible attractor? Would this still happen without the attractor?

    • @jameswhalley7462
      @jameswhalley7462 Před 3 lety +4

      Without the invisible attractor the centre of mass would follow a path of constant velocity assuming normal conservation laws apply once the collisions stop occuring.

    • @user-sl6gn1ss8p
      @user-sl6gn1ss8p Před 3 lety +4

      @@jameswhalley7462 yeah, it would, my question is whether it would get to the point where collisions stop occurring. It's not clear to me if the the circles are attracting each other and how much or if the attractor dominates, and how much does that affect the outcome (other than what you've pointed out)

    • @jameswhalley7462
      @jameswhalley7462 Před 3 lety +4

      @@user-sl6gn1ss8p The creator said elsewhere in a comment that the circles don't actually attract each other at all I believe.

    • @user-sl6gn1ss8p
      @user-sl6gn1ss8p Před 3 lety +1

      @@jameswhalley7462 Makes sense. I would guess not, but I wonder if the same effect could eventually be achieved if the circles attracted each other

    • @jameswhalley7462
      @jameswhalley7462 Před 3 lety +3

      @@user-sl6gn1ss8p Interesting question. You might have just tempted me to simulate what you describe this weekend to find out for sure. I'll let you know if I find anything interesting.

  • @lennartgimm
    @lennartgimm Před 3 lety +14

    Why would the centre of mass oscillate like that? Without outside forces the centre of mass should move linearily, right? If you break it down, the COM has some momentum p which is the sum of all momentums in this simulation. Conversation of momentum now tells us that without outside forces the total momentum should not change. The total momentum is the sum of all momentums (momenta?) and thus equal to the momentum of the COM. So somethinghere isn't physical. I suspect the little balls avoid each other by being displaced by a few pixels instead of colliding, resulting in movement that doesn't contribute to the total momentum but does move the COM...

    • @PezzzasWork
      @PezzzasWork  Před 3 lety +13

      What's isn't physical is that there is a virtual point with no mass attracting all objects at the center of the screen

    • @lennartgimm
      @lennartgimm Před 3 lety +6

      @@PezzzasWork Oh I thought they were only attracted to one another :D Cheers for clearing that up :)

    • @PezzzasWork
      @PezzzasWork  Před 3 lety +3

      @@lennartgimm no problem :)

    • @kongolandwalker
      @kongolandwalker Před 3 lety +3

      @@PezzzasWork "Displaying the system's center of mass as a blue circle." that is misleading. Center of mass and attractor have different meanings

    • @PezzzasWork
      @PezzzasWork  Před 3 lety +5

      @@kongolandwalker the blue circle is the center of mass, the attractor is static at the center of the screen and not displayed

  • @hahayes7205
    @hahayes7205 Před 3 lety +5

    "its not a bug, its a feature"

  • @Tinkerer_Red
    @Tinkerer_Red Před 3 lety +5

    This makes me wonder if you could use this for chaos theory based seeding. For instance, after a perfect cycle for a single orb, would the other orbs still be in sync or would they be slightly off center? This could lead to the ability to add all of their x and y of each and use it for a seed value. Syncing this for online games could be extremely powerful, as long as they don't start repeating their locations every cycle.
    Would you be able to leave an outline location for every object, when object 1 finishes it's cycle?

    • @Tinkerer_Red
      @Tinkerer_Red Před 3 lety

      Also if you made them their center points the center of a gaussian blur, then make that the input for a distortion shader, you could have some amazing pulsing ameba or gore monster.

  • @Zac8668
    @Zac8668 Před 3 lety +6

    this is really cool

  • @manojpradhan943
    @manojpradhan943 Před 3 lety +11

    All your work is awsome
    I need some help . How much programming experience do you have ? I wanna be able to do all this . I am quite familiar with C++ and sfml and unity game engines but no expertise . Like how you just implement a procedural tree , just like that . The thing is , I am not able to keep my mind at one place . Like I would start with some idea for let's say a "self mutating simulation having some creature" , five minutes in I would start worrying about the design pattern . Whether entities should draw themselves , or should be drawn by a window.draw(entity) method . And that would lead to a another downhill spiral , rather than solving the actual problem .
    What pathway would you recommend to become proficient in implementing things . This itch of wanting to know behind the things of every thing that iam doing becomes a barrier . Almost like a overthinking .
    Thanks in advance !! .

    • @PezzzasWork
      @PezzzasWork  Před 3 lety +16

      Thank you :)
      I have about 10 years of programming experience but most of it as a beginner. Like you I don't have expertise and my projetcs help me to improve myself.
      Regarding your problem I used to feel like you and then I started iterative development process. First I make a very ugly prototype only aiming for functionality. When it works, I then start to think of a better way of doing it. Your example of the draw method is a good one. During the prototyping phase I almost always inlcude it in my class (drone.draw(window) for example). Very often the draw method becomes big and the next iteration I create a "DroneRenderer" class taking care of it. In my opinion architectural design is a key skill to improve because it's where the real difficulty of programming is and that's true for all languages. You shouldn't try to do everything perfect the first time because it too discouraging and quite impossible!

    • @manojpradhan943
      @manojpradhan943 Před 3 lety +3

      @@PezzzasWork thankyou thanku thankyou . Any resource that you would like to recommend. Unity is quite overwhelming . I guess one must be done with the concepts of shaders and rendering first before jumping directly onto full fledged game engines ?
      I have made one flight sim in unity but what I felt was you just get to learn unity api not actaul game dev.

    • @mouradtulimat
      @mouradtulimat Před 3 lety

      I tried getting a pathway for myself from this thread, I'm familiar with c++ but only competitive programming/problem solving and only now learning some advanced OOP, I'm trying to learn multiple things to see what suites me best, nothing too hard so far, but I have no Idea about visualizing, I have no intention in becoming a pro in this criteria, but I do wanna learn how to implement cool stuff like this even if it's ugly af, would learning sfml be enough for now? or should I start some where else?
      ps,
      don't go easy on me I'm some what of fast learner :3

    • @nates9778
      @nates9778 Před 3 lety +1

      @@manojpradhan943 Take a look at handmadehero (CZcams Channel is Molly Rocket)
      It's a really good source of someone making a game from scratch in c++ in windows and he explains everything down to detail.

  • @Pauly421
    @Pauly421 Před 10 měsíci

    For anyone else confused. There is an invisible attractor in the center of the simulation. Which is something he really should have mentioned in the description. Still it's cool to watch.

  • @gerardskomin6317
    @gerardskomin6317 Před 3 lety +2

    Weirdly satisfying :P

  • @Poulpink
    @Poulpink Před 3 lety +4

    Isn't there a problem here ? Without external force, the center of mass should not have any acceleration (straight line / no movement)
    Edit: I see you said there is actually a force at the center, you should mention it in the description, this is disorienting fo rmost people

  • @CCV334
    @CCV334 Před 3 lety

    That’s awesome

  • @nolanbie3664
    @nolanbie3664 Před 2 lety

    Be super cool to have this as a wall paper

  • @VaradMahashabde
    @VaradMahashabde Před 3 lety +2

    But if all the forces are internal, shouldn't CoM stay still?
    or is there an unaccounted large mass orbiting in the distance?

    • @LostieTrekieTechie
      @LostieTrekieTechie Před 3 lety

      It might be a result of calculation inaccuracies, or this simulation might be based on different physics than our own..
      But yeah, in real life unless there is an external Force the center of mass should stay still or have constant velocity.

    • @revimfadli4666
      @revimfadli4666 Před 2 lety

      It was said that there's an invisible attractor in the middle

  • @keithmanning6564
    @keithmanning6564 Před 3 lety

    I wonder whether this would converge given any set of objects orbiting each other

  • @tyrendel
    @tyrendel Před 3 lety +5

    What if you make the central attractor apply a gravitational force (proportional to inverse square distance)?

  • @fejfo6559
    @fejfo6559 Před 3 lety +2

    why does the center of mass move?

    • @PezzzasWork
      @PezzzasWork  Před 3 lety +4

      It moves because the system is unbalanced since there is a static attractor at the center of the screen. These objects are all independent

  • @jadugniko3245
    @jadugniko3245 Před 3 lety

    Is it already released?

  • @IlIllllIllIllIllIl
    @IlIllllIllIllIllIl Před 3 lety

    Dope ass channel

  • @linsproul3548
    @linsproul3548 Před 3 lety +1

    is it just displaying the center of mass or are the balls actually orbiting it?

  • @microm2078
    @microm2078 Před 3 lety +1

    Why is the center of mass oscillating if there are only internal forces?

    • @microm2078
      @microm2078 Před 3 lety

      Or is there a centered external force for every object?

    • @microm2078
      @microm2078 Před 3 lety

      Plus its a beautiful video ;)

  • @APaleDot
    @APaleDot Před 3 lety +3

    I thought the center of mass shouldn't move unless there is an outside force acting on it. Newton's Third Law and all that.

    • @mubasshir
      @mubasshir Před 3 lety

      I don't think that small is the centre of mass. It's probably not marked in the video. That dot is probably a particle.

    • @APaleDot
      @APaleDot Před 3 lety

      @@mubasshir
      Did you read the description?

    • @mubasshir
      @mubasshir Před 3 lety

      @@APaleDot I did. That circle looks green to me. Maybe that's where I went wrong. It still looks green to me

    • @jonathanwalther
      @jonathanwalther Před 3 lety

      @@mubasshir Either you are a troll or colorblind in the green/blue spectrum. The small dot in the middle is blue. At least "more" blue than all the other dots.

    • @Pauly421
      @Pauly421 Před 10 měsíci

      There is an invisible attractor in the center of the simulation. Which is something he really should have mentioned in the description.

  • @dr.oobleck2317
    @dr.oobleck2317 Před 3 lety

    What happens when you add boids rules?

  • @ericscheit5540
    @ericscheit5540 Před 9 měsíci

    I feel dumb when I see people talking about stuff I have no clue about.

  • @leonpeitz6813
    @leonpeitz6813 Před 3 lety

    Where is the difference between this and the big you created in one of your other videos?

  • @pritampattnaik2005
    @pritampattnaik2005 Před 3 lety +1

    Any way to do something like this in java?

    • @nothingnothing1799
      @nothingnothing1799 Před 3 lety

      Considering he made this in C++ I'd assume yes, java is based on C++.

    • @iamdozerq
      @iamdozerq Před 3 lety

      Of course - just find any graphics lib.

    • @alfonzo_
      @alfonzo_ Před 3 lety

      I'd recommend libGDX. really easy to draw some circles on screen so you just have to code the physics.

    • @pritampattnaik2005
      @pritampattnaik2005 Před 3 lety

      @@iamdozerq what’s a graphic lib lol

  • @kadefringe
    @kadefringe Před 3 lety +1

    Did he just solve n-body problem with a bunch of codes?

    • @emilioannoni368
      @emilioannoni368 Před 3 lety

      n-body problem is about analytical solution (aka a one for all formula), not a computational approximation.
      You definitely would be eligible for the 1MLN prize for Navier Stokes equations with a relatively simple fluid simulation code that way hahaha

  • @eyewear195
    @eyewear195 Před 3 lety

    I never like videos but these are amazing!

  • @Apotheosis-
    @Apotheosis- Před 3 lety +1

    Now do it with squares

  • @volo870
    @volo870 Před 3 lety

    Where's Mass?
    Is that where the toaster is?

  • @ofal4535
    @ofal4535 Před 2 lety

    Could you edit it so the balls will orbit oround center orb? Sth like sun

  • @user-xs6gb7vs3e
    @user-xs6gb7vs3e Před 3 lety

    Why the center of mass keep changing?

    • @Eryna_
      @Eryna_ Před 3 lety

      The various circles are moving around, and sometimes more of them are going to be at one end rather than the other.

  • @jojodasjojo
    @jojodasjojo Před rokem

    42

  • @LunarSea
    @LunarSea Před 3 lety

    чувак, прости, но єто візівает у меняз зубную боль )