How do i plot big bang?

1 次查看(过去 30 天)
Simon Sandberg
Simon Sandberg 2016-9-27
Hi, I need to illustrate Big Bang by creating an animation. So this is what the assignment tells me: Let a bunch of spherical objects, with different masses, be located in a single point and let them effect each other with a constant that is a random(to size and direction) force under a small period. It will make the objects accelerate from the start position in different directions. Then only gravitational forces can act upon the bodies and pull them towards each other. When two bodies collide they will merge and become a new object with the total mass and a new velocity. Plot the objects as circles with an area proportional to the mass.
Appreciate any help since I have no idea of how to approach this assignment, thanks!
  1 个评论
José-Luis
José-Luis 2016-9-27
编辑:José-Luis 2016-9-28
What's your experience programming?
I would start writing pseudo-code, listing the steps you need to go through (divide the job in smaller tasks) and try to code each step.
Just copy/pasting your problem doesn't really motivate contributors to help you. It is better to ask specific questions.

请先登录,再进行评论。

回答(1 个)

Michael Abboud
Michael Abboud 2016-9-29
That sounds like an interesting assignment! The question however is a bit vague, and as commented above, it is usually better to identify specific questions the community can help you with.
As you need to animate your graphics, I would suggest you start by reading through the following animation example in the documentation, and hopefully this will give you some idea of how to proceed. I have also linked below a page which more generally describes how animation works in MATLAB.

类别

Help CenterFile Exchange 中查找有关 Animation 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by