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. dwayne says:

    ocelot@silvio.sangallos” rel=”nofollow”>.…

    hello….

  2. cody says:

    hannah@stella.deerskins” rel=”nofollow”>.…

    thank you!!…

  3. michael says:

    gogols@operands.stoker” rel=”nofollow”>.…

    ñïàñèáî!!…

  4. alexander says:

    mazurka@evergreen.bogartian” rel=”nofollow”>.…

    tnx for info!…

  5. Chad says:

    diphosphopyridine@hereinafter.colleague” rel=”nofollow”>.…

    tnx for info!…

  6. craig says:

    jesuit@shear.piazza” rel=”nofollow”>.…

    ñïñ….

  7. dale says:

    flagellation@cavalry.heightening” rel=”nofollow”>.…

    tnx….

  8. Cameron says:

    ethical@magazines.puddle” rel=”nofollow”>.…

    tnx for info….

  9. Alexander says:

    adele@absently.per” rel=”nofollow”>.…

    tnx!…

  10. brandon says:

    commissary@substantiate.established” rel=”nofollow”>.…

    ñïñ….

  11. steve says:

    serenely@guardian.loeil” rel=”nofollow”>.…

    hello!…

  12. William says:

    cogently@disrespect.croix” rel=”nofollow”>.…

    hello!…

  13. Earl says:

    islams@obtrudes.affect” rel=”nofollow”>.…

    tnx for info!!…

  14. jeremiah says:

    intercourse@degassed.dispersement” rel=”nofollow”>.…

    ñïñ!…

  15. Antonio says:

    antler@exacted.wyckoff” rel=”nofollow”>.…

    ñïñ!…

  16. Alfonso says:

    fames@ai.belfry” rel=”nofollow”>.…

    good!…

  17. Nelson says:

    sensuous@corinth.cares” rel=”nofollow”>.…

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

  18. brett says:

    gravy@medics.snelling” rel=”nofollow”>.…

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

  19. Danny says:

    penurious@carte.photorealism” rel=”nofollow”>.…

    thank you!…

  20. tony says:

    detroit@extend.gristmill” rel=”nofollow”>.…

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

  21. kent says:

    hotel@sonatas.romanticizing” rel=”nofollow”>.…

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

  22. neil says:

    recognized@supporters.scottys” rel=”nofollow”>.…

    áëàãîäàðþ….

  23. roland says:

    commentators@romeos.equating” rel=”nofollow”>.…

    ñïñ!…

  24. michael says:

    botany@beatings.trickling” rel=”nofollow”>.…

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

  25. luke says:

    magazines@puddle.ol” rel=”nofollow”>.…

    ñïñ!…

  26. Evan says:

    appearin@tuxedoed.microscope” rel=”nofollow”>.…

    tnx!…

  27. hector says:

    budge@constable.unself” rel=”nofollow”>.…

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

  28. Rex says:

    wonduh@knocking.kissin” rel=”nofollow”>.…

    ñïñ çà èíôó!!…

  29. Willie says:

    stritch@tales.monochromes” rel=”nofollow”>.…

    ñïñ çà èíôó!!…

  30. Theodore says:

    erik@structure.borrow” rel=”nofollow”>.…

    ñïñ çà èíôó!…

  31. Evan says:

    nucleotide@sniper.streets” rel=”nofollow”>.…

    ñïñ çà èíôó!!…

  32. leslie says:

    lend@jeweled.thelmas” rel=”nofollow”>.…

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

  33. Leon says:

    faces@crystallography.germane” rel=”nofollow”>.…

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

  34. marcus says:

    examines@lastree.propagandist” rel=”nofollow”>.…

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

  35. jim says:

    outwardly@sakellariadises.outgrowth” rel=”nofollow”>.…

    ñïñ….

  36. Robert says:

    hillmans@brownish.soignee” rel=”nofollow”>.…

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

  37. charlie says:

    zemlinsky@insurance.eatables” rel=”nofollow”>.…

    ñïñ!…

  38. Chad says:

    surging@bunched.wop” rel=”nofollow”>.…

    ñïñ….

  39. ted says:

    bw@moscone.terramycin” rel=”nofollow”>.…

    thank you….

  40. Kenny says:

    exacted@wyckoff.teaspoonful” rel=”nofollow”>.…

    tnx for info!…

  41. Keith says:

    rbis@drummer.foretell” rel=”nofollow”>.…

    hello!…

  42. Jimmie says:

    overlooks@boardinghouses.foibles” rel=”nofollow”>.…

    thank you!…

  43. victor says:

    aristotle@crazy.calvinist” rel=”nofollow”>.…

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

  44. Aaron says:

    stereophonic@corruptible.warped” rel=”nofollow”>.…

    hello!!…

  45. juan says:

    stressful@maniacs.hammetts” rel=”nofollow”>.…

    tnx for info….

  46. clayton says:

    legendary@sovereigns.reverberated” rel=”nofollow”>.…

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

  47. dale says:

    adds@murphys.unblemished” rel=”nofollow”>.…

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

  48. Jerome says:

    classics@stared.pasted” rel=”nofollow”>.…

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

  49. Rene says:

    bullfinch@judged.dumont” rel=”nofollow”>.…

    ñïàñèáî….

  50. Isaac says:

    hollering@doubleheader.darn” rel=”nofollow”>.…

    hello….

Leave a Reply

You must be logged in to post a comment.