Jump to content

h4tt3n

Senior Members
  • Posts

    162
  • Joined

  • Last visited

Posts posted by h4tt3n

  1. The Ferrari example is actually quite... symptomatic, one might call it ^^

     

    A group of uneducated farm-boys with plenty of practical experience might actually be able to reassemble the car faster than - say - a group of engineers specialized in car-design.

     

    This is the old problem of practice vs. theory. A practically gifted / experienced person may be able to do very complicated things without knowing the theory behind it. And a well-educated theoretical scientist is not necessarily able to express his knowledge in practice.

     

    It is not a trivial problem, believe me! I'm currently standing in the middle of a "fight" between people with a theoretical and practical approach to the same problem.

     

    Cheers, Michael

  2. You're welcome. IMHO this is exactly what forums like this are for. I'll be away for the weekend, but I'll pm you my email sometime sunday. Anyway, for further reference, why not post the code here? That way our discussion may help others in a similar situation...

     

    cheers, Michael

  3. Ok,

     

    As you've probably noticed by now, there isn't much programming related help to get on this forum. I recommend you to take a look at these physics programming forums instead:

     

    http://www.gamedev.net/community/forums/

     

    http://www.bulletphysics.com/Bullet/phpBB3/

     

    Regarding your post: Your proposed method does not work, and this is because you do not seem to understand the concepts of movement in classical mechanics.

     

    First, you need to know Newtons three laws of motion, here in the quck and dirty version:

     

    (1) Every object stays in the same state of motion (or at rest) unless an external force is applied to it.

     

    (2) When a force is applied to an object it accellerates according to this rule: Force = Mass * Acceleration

    or

    Acceleration = Force / Mass

     

    (3) For every action (Force) there is an opposite and equal reaction (also a force).

     

    When calculating how two or more bodies influence each other gravitationally, you need to update these values every time step:

     

    Force -> acceleration -> velocity -> position

     

    All of these are vectors, and I recommend that you define an x and y value for each in order to keep track of them.

     

    You've got the calculation of force right, so lets move on to acceleration. When two bodies attract each other they are influenced by the same force, except in opposite direction (Newton's 3rd law). But the resulting acceleration may be different!

     

    The acceleration of M1 and M2 due to gravitational force F is:

     

    A(M1) = F / M1

     

    A(M2) = F / M2

     

    So, if M1 is twice as big as M2 then M1 is only accelerated half as much as M2.

     

    Now comes the tricky part... we need to figure out the new velocity and position of the celestial bodies as a function of the gravitational force applied on them. This is called integrating with respect to time, and we do this with a so called numerical integration algorithm.

     

    There are many to choose from, but for a simple simulation like yours I recommend the symplectic Euler integration method:

     

    New velocity = old velocity + acceleration * timestep

    New position = old position + new velocity * timestep

     

    It is very important to understand tha you can calculate gravitational force and acceleration accurately, but that you can't do the same with velociy and position. It is still an unsolved matemathical problem to accurately predict the motion of 3 or more bodies due to graviational interaction. The different integration algorithms around try to "predict" movement as accurately as possible, but they can never be exact. You can increase accuracy by making the timestep value smaller.

     

    (Once you get more advanced you'll need to implement the 4th order Runge-Kutta algorithm!)

     

    I'll write some more on how to apply all this in a program later...

     

    Cheers, Michael

  4. Hi Shadow,

     

    I've been making several 2d and 3d gravity simulations during the past few years, and I wouldn't mind giving you som constructive freedback on the source code once it's ready. I wouldn't mind posting a few examples of mine either (they're not c dialect). :)

     

    Cheers, Michael

  5. @Mr Skeptic

     

    Yes, this is pretty much what I've come up with too. This is called the thermohaline circulation when dealing with the world ocean as a whole. Thanks for mentionin the mineral transportation effect, I missed that one.

     

    thermohaline.jpg

     

     

    @r1dermon

     

    Coriolis effect and wind indeed. Which means that I have to ask another Q in order to answer the first one:

     

    How does winds move about on a smooth, spherical planet?

     

    This is easier, since wind is less affected by the continents than ocean currents are. Here's a nice scematic that somewhat accounts for coriolis too:

     

    Trade_Winds_fig01.jpg

     

    I suppose that on a smooth planet the ocean currents will move in a similar fashion, transporting heat away from the equator towards the poles? But I'm still a bit unsure exactly how the coriolis effect influences the system as a whole...

     

    Are the ocean currents split up into covection cells just like the atmosphere in the scematic?

     

    If the warm currents flowing from the equator are constantly deflected by the coriolis effect, then how will they ever reach the poles?

  6. Recently I've been trying to understand how ocean currents work from a general perspective. While studying, an intrigueing question popped up in my mind, and I haven't been able to let it go unanswered. It is simply:

     

     

    If the Earth was a completely smooth, ocean covered sphere (but otherwise unchanged), how would the ocean currents flow?

     

     

    I think that answering this Q might help one to understand what makes all the world's real ocean currents tick. Any suggestion?

     

    Cheers,

     

    Michael

  7. When it comes to using relational operators on scalar values, there's usually no problem. But what about vectors?

     

    Are there any generally accepted rules or consensus when it comes to relational comparisons (ie. =, <>, >, <, >=, <=) of vectors?

     

    For instance, consider v1 < v2 for the two vectors v1 = (10, 8) and v2 = (5, 10)...

     

    Does one then compare the x and y values pairwise and return a boolean for each value, in this case (false, true)?

     

    Or does one check the magnitude of the vectors against each other and simply return (false)?

     

    Or something entirely different...?

     

    Cheers,

     

    Michael

  8. Well, when it comes to one of my favourite hobbies, making physics simulation programs, it is quite common to use impulse as a way of indirectly transferring force from one object to another. For instance when dealing with rigid body collision it would be a pain in the arse to actually figure out the forces involved ^^

     

    Here's a funny java example with a pretty good explanation: http://www.myphysicslab.com/collision.html

     

    (Just get me right, here - I'm definitely NOT saying that it can be done entirely without using the concept of force!)

  9. Not everywhere! The gravity pull on poles is felt more than in the equator! If a body in equator wights 1000g, in poles will weight 1005g. It's nearer to the center of earth (earth's gravity center).

     

    Yes, but not because it is closer to Earths centre! The difference is caused by (the imaginary) centrifugal force caused earths rotation. Gravity would actually decrease if you moved closer to earths gravitational centre, and it approximates zero in the centre of the planet.

     

    Btw I agree with D H. This should be removed.

     

    Cheers,

     

    Michael

  10. Well, I've never heard of them either. Although, I've always wondered what might happen if you froze water while it was under influence of a strong electric field ^^

     

    Anyone here have any hands-on experience with these electrets? Will they for instance bend water streaming from a faucet like an electrified comb does?

  11. I'm sorry... :confused:

     

    Isn't the fact that 1+1 = 2 derived empirically?

     

     

    As in " When I put one nut in the sack and then another nut, then I got two nuts in the sack."

     

    And logic is then a generalized system based on the above and similar empirically derived non-disputable facts?

  12. You could always do a small number of identical worlds-in-a-jar, except that you "pollute" all but one with various chemicals or waste products.

     

    You could use lead, cadmium, or even mercury and call it a heavy elements pollution project

     

    Or you could use hydrochloric or sulphuric acid and call it an acid rain pollution project

     

    Then you observe wether they evolve different than the pure sample or not.

  13. Life may adapt to the surrounding environment, but the opposite might just be a bit more plausible: that life over time changes the environment to fit its needs, just as life has done on here earth billions of years ago. Pre-life earth may have looked a bit like present-time venus, and today it is completely different thanks to for instance photosynthetis.

     

    So, we may assume that if life emerges on a planet - even a very hostile one - it may completely change the environment of that planet within a few 100 millions or a few billions years to fit whatever needs it has. And if that life is carbon based and uses water as a solvent it will probably work towards an environment similar to ours.

     

    (May use chlorine as an oxidizing agent instead of oxygen, though ^^)

  14. ad HallsofIvy: Well, ok. I just supposed that the term "cross product" was out of the question since, as you say, it is only used for three dimensional vectors.

     

    would this qualify as a "2d cross product", then? Any other suggestions out there?

     

    ad Atheist:

     

    Ok, I don't get it. I'd just say Asin(Sine to angle) = angle, in this case 0. Anyway I dont actually need to know the angle - cosine and sine will do just fine for me ^^.

  15. In every vector ressource on the net you can read that the dot product of two vectors a and b can be used to find cosine of the angle between them, like this:

     

    a.b = lal * lbl * cos angle

     

    cos angle = a.b / (lal * lbl)

     

    (lal and lbl beeing the magnitude of the vectors)

     

    Finding the dot product of a and b is done like this:

     

    a.b = (a.x * b.x + a.y * b.y)

     

    (a.x, b.y and so forth beeing the horisonal and vertical length of the vectors)

     

    What wonders me is that it doesnt say anywhere that

     

    (a.x * b.y - a.y * b.x)

     

    equals the sine of the angle, which can be a very useful information too.

    My question is: what is this function called? It surely isn't the dot product, but I can't seem to find anything about it anywhere.

     

    best regards,

    Michael

  16. Thanks for the reply swansont. It makes sense, but only to a certain degree...

     

    If I split the equation up I get:

     

    gravity: F = mgj

     

    Hooke's law on spring force: F = -k D

     

    damping: F -= b (Vx i + Vy j)

     

    But what is this for: (sin θ i + cos θ j) ??

     

    I've tried implementing the equation, and it works fine, except for the above part. Apparently i and j are just vctors and not unit vectors like you suggsted.

     

    Force = -Stiffnes*(Distance-relaxed_distance) - damping*(vel.x*dist.x + vel.y*dist.y)

     

     

    By running the attached .exe file you can see the equation in action. Klick-drag the pin, ball or rubberband to interact with the simulation.

     

    regards,

    Michael

    rubberband.zip

  17. Hello, I'm tampering with a little computer simulation of mass spring damper systems, and somewhere on the net I stumbled across this equation:

     

    F = m g j − k D (sin θ i + cos θ j) − b (Vx i + Vy j)

     

    F = force

    m = mass

    g = gavity

    k = spring constant

    D = string length displacement

    Vx = Velocity X

    Vy = Velocity Y

     

    Maybe someone here can shed a little light on whats going on here and wether this equation is even right? And what does i and j stand for?

  18. What really wonders me in the above case is: why hasn't the water gone missing a long time ago due to photolysis? If the planet is close enough to it's host sun to obtain a 2 day orbital period, then it must be exposed to a massive radiation including ultraviolet light, which is capable of separating water into hydrogen and oxygen.

    Of course Oxygen and hydrogen could be "recycled" within the atmosphere and form water after the separation, but even the gravity of a jupiter-like planet wouldn't be able to hold back free H at a surface temperature of 1.300 degrees farenheit. (Is water even stable at this temperature?)

     

    So... Why isn't this planet bone dry?

     

    Even our own earth will face certain drought due to photolysis when the sun has increased it's radiation to about twice what it is today. The HD 189733b case seems far more extreme than this scenario, but still there is plenty of water at hand...

  19. i was wondering if there was a type of metal that could be a 1mm cube inside of a 2cm cube and be able to have an visible effect on the big cube when it is on top of an electric magnet. The metal should not be attracted to regular magnets, atleast not enough where a person could feel a regular magnet attract to the 1mm cube inside the 2cm cube. any help or ideas?

     

    Hehe, trying to fix a game of dice, are we? :-D

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.