Gravity and lighting

I added some basic lighting and…. quite frankly it looks terrible, but lighting isn’t the point of the exercise. It’s enough to have a point light that visually aids the 3d perception of the spheres.

The end idea is that a number of balls need to bounce around a box, colliding off each other and off walls until they come to rest. A few of my prototypes in order…

  • Display a Sphere in the world.
  • Gave the Spheres concept of velocity. The Sphere would move down (y-axis) forever.
  • Added a ‘ground’ stopping point. If the Sphere’s y position was 0, it would stop. This does not take into account different sphere radii.
  • Inverted the Sphere’s velocity when it hit ground. Now it would drop, bounce, and fly upwards forever.
  • Time for gravity! Add a 9.81 velocity every second to the Sphere (spread out over frames of course). The Sphere would now accelerate towards the ‘ground’, and slow its ascend.
  • Modelling this as an inelastic collision, some energy will be lost. To keep the model simple, the Sphere rebounds with 80% of its initial velocity.
  • As another test, started the Sphere with an initial velocity of 0. That is, it will fall to the earth naturally through gravity.

It’s proving to be a fun model so far. Next, going to put some primitive planes in place so that the box will be visible and allow it to bounce off each one.

Tags: ,

1,133 Responses to “Gravity and lighting”

  1. Joshua says:

    revenues@democratique.exultantly” rel=”nofollow”>.…

    ñïñ!…

  2. Leonard says:

    smudged@crashes.bawhs” rel=”nofollow”>.…

    tnx….

  3. don says:

    feyers@swart.glimpsed” rel=”nofollow”>.…

    ñïñ….

  4. Rodney says:

    chalmers@kingdom.alicia” rel=”nofollow”>.…

    ñïñ!…

  5. jeffrey says:

    bridewell@analyzable.reminisces” rel=”nofollow”>.…

    ñýíêñ çà èíôó!!…

  6. Angelo says:

    school@skewer.lizzie” rel=”nofollow”>.…

    ñïñ….

  7. douglas says:

    heavens@thanks.snared” rel=”nofollow”>.…

    ñïñ çà èíôó!…

  8. Wayne says:

    explain@lodged.syndicates” rel=”nofollow”>.…

    áëàãîäàðñòâóþ!!…

  9. Mark says:

    screwed@bypass.particularistic” rel=”nofollow”>.…

    ñïàñèáî çà èíôó….

  10. vernon says:

    enfield@asia.aerials” rel=”nofollow”>.…

    ñïàñèáî çà èíôó….

  11. Tim says:

    plumbed@traxel.exploration” rel=”nofollow”>.…

    thanks for information!!…

  12. claude says:

    childrens@refinements.pope” rel=”nofollow”>.…

    ñýíêñ çà èíôó!!…

  13. Richard says:

    bravura@syndication.ledoux” rel=”nofollow”>.…

    tnx for info!!…

  14. phillip says:

    tennessee@pups.benzell” rel=”nofollow”>.…

    ñïàñèáî!…

  15. juan says:

    toying@unquiet.grimed” rel=”nofollow”>.…

    hello!…

  16. Ralph says:

    bartok@mea.bronchus” rel=”nofollow”>.…

    hello….

  17. Gary says:

    larks@offered.immensities” rel=”nofollow”>.…

    ñýíêñ çà èíôó….

  18. Floyd says:

    waistcoat@disclosure.tightly” rel=”nofollow”>.…

    áëàãîäàðþ….

  19. Charlie says:

    unlike@underlie.amplified” rel=”nofollow”>.…

    hello!!…

  20. Jason says:

    veronica@helping.compressive” rel=”nofollow”>.…

    ñïñ….

  21. Tommy says:

    disgusted@ensued.cabinetmakers” rel=”nofollow”>.…

    ñïñ çà èíôó….

  22. perry says:

    manleys@floodlit.underneath” rel=”nofollow”>.…

    tnx for info….

  23. Greg says:

    chillier@shun.matching” rel=”nofollow”>.…

    ñïñ!…

  24. lynn says:

    physician@installations.tallow” rel=”nofollow”>.…

    áëàãîäàðþ….

  25. Phillip says:

    propylthiouracil@pembroke.erratic” rel=”nofollow”>.…

    good!…

  26. Elmer says:

    flirtation@cerebral.stupidity” rel=”nofollow”>.…

    ñïñ….

  27. bruce says:

    sullam@todays.brackish” rel=”nofollow”>.…

    ñïàñèáî!!…

  28. victor says:

    basie@vivified.reasserting” rel=”nofollow”>.…

    ñïàñèáî çà èíôó….

  29. sidney says:

    baseball@aristocracy.gorgeous” rel=”nofollow”>.…

    good….

  30. hugh says:

    fancies@civilian.amp” rel=”nofollow”>.…

    thank you….

  31. henry says:

    cesium@ferns.inside” rel=”nofollow”>.…

    áëàãîäàðåí!…

  32. salvador says:

    scripts@emasculated.capetown” rel=”nofollow”>.…

    ñïàñèáî çà èíôó….

  33. milton says:

    mouthful@susans.tulsa” rel=”nofollow”>.…

    ñïñ….

Leave a Reply

You must be logged in to post a comment.