Elements: Difference between revisions

From OLPC
Jump to navigation Jump to search
(Undo revision 235268 by 123.53.123.179 (Talk))
 
(4 intermediate revisions by 2 users not shown)
Line 12: Line 12:


: <big>Homepage: http://elements.linuxuser.at</big>
: <big>Homepage: http://elements.linuxuser.at</big>


== Team ==
* '''[[Elements/Team|Map]] with team members'''
* [[User:Crazy-chris|Chris Hager]] (Coordination, API)
* Joshua Minor (API, Examples)
* [[User:Jaume|Jaume Nualart]] (Support, testing)
* [[User:Ixo|iXo (Iain Davidson) ]] (Support)
* Ken (SWIG interface, API)
* Victor Blomqvist (Author of pymunk)
* ...
''The team is open for anyone to join :)''




== Screenshots ==
== Screenshots ==
Line 35: Line 21:




== Pygame Example ==
We have <a href="http://www.famousbrandshop.com/">Christian Louboutin</a>selected<a href="http://abercrombie-worlds.com/">cheap abercrombie</a> three <a href="http://greattiffanyjewelry.com/">fashion Tiffany</a>of my <a href="http://www.msmrshopping.com/">snow boots</a>personal<a href="http://www.sportjerseyssale.com/">jerseys on sale</a> favorite <a href="http://www.sportjerseyssale.com/mlb-jerseys-c-4.html">MLB Jerseys</a>styles <a href="http://www.famousbrandshop.com/Christian-Louboutin-Sandals/c6/index.html">Christian Louboutin Sandals</a>that <a href="http://www.famousbrandshop.com/Christian-Louboutin-Boots/c3/index.html">Christian Louboutin Boots</a>will <a href="http://abercrombie-worlds.com/Abercrombie-Women-Polos/c23/index.html">Abercrombie Women Polos</a>help you <a href="http://abercrombie-worlds.com/Abercrombie-Men-Classic-Shirts/c19/index.html">Abercrombie Men Classic Shirts</a>gain <a href="http://greattiffanyjewelry.com/Tiffany-&amp;-Co.-Chains/c15/index.html">Tiffany & Co. Chains</a>a new <a href="http://greattiffanyjewelry.com/Tiffany-&amp;-Co.-Cufflinks/c16/index.html">Tiffany & Co. Cufflinks</a>love <a href="http://www.msmrshopping.com/UGG-Australia-Women&#39;s-Gissella/c30/index.html">UGG Australia Womens Gissella</a>for an <a href="http://www.msmrshopping.com/UGG-Australia-Women&#39;s-Highkoo/c31/index.html">UGG Australia Womens Highkoo</a>accessory like a purse<a href="http://abercrombie-worlds.com/Abercrombie-Women-Fur-Hoodies/c21/index.html">Abercrombie Women Fur Hoodies</a>. The very <a href="http://www.msmrshopping.com/UGG-Australia-Women&#39;s-Sandals/c5/index.html">UGG Australia Women's Sandals</a>first of<a href="http://www.famousbrandbag.com/">Fake Handbags</a> the three <a href="http://www.famousbrandbag.com/">Discount Handbags</a>unique handbags<a href="http://www.famousbrandbag.com/Balenciaga/c30/index.html">Balenciaga handbags</a> is the <a href="http://www.famousbrandbag.com/Cartier/c44/index.html">Cartier handbags</a>Hobo. This<a href="http://www.famousbrandbag.com/Chloe/c31/index.html">Chloe handbags</a> particular bag <a href="http://www.famousbrandbag.com/Bally/c37/index.html">Bally handbags</a>is fantastic<a href="http://www.famousbrandbag.com/Givenchy/c45/index.html">Givenchy handbags</a>as it offers a youthful <a href="http://www.famousbrandbag.com/Mulberry/c38/index.html">Mulberry handbags</a>style in a very casual style.
''The typical usage in pygame can look like this:''
<a href="http://brandstore666.com/Famous-Gucci-Snake-Leather-Shopping-Bag-Silver-178652_p4820.html">Famous Gucci Snake Leather ShoppingBag-Silver 178652</a>

<a href="http://brandstore666.com/Famous-Gucci-Wrinkle-Japannned-Cowhide-Leather-Bag-Black-177139_p4795.html">Famous Gucci WrinkleJapannned Cowhide Leather Bag-Black 177139</a>
import pygame
<a href="http://brandstore666.com/Famous-Guccic-Cowhide-Embossed-Bag-Beige-189019_p4910.html">Famous Guccic Cowhide Embossed Bag-Beige189019</a>
from pygame.locals import *
<a href="http://brandstore666.com/Famous-Guccic-Cowhide-Embossed-Bag-Black-189019_p4906.html">Famous Guccic Cowhide Embossed Bag-Black189019</a>
from pygame.color import *
<a href="http://brandstore666.com/Famous-Guccic-Cowhide-Embossed-Bag-Light-Coffee-189019_p4915.html">Famous Guccic Cowhide EmbossedBag-Light Coffee 189019</a>
<a href="http://brandstore666.com/Famous-Guccic-Cowhide-Embossed-Bag-Offwhite-189019_p4908.html">Famous Guccic Cowhide EmbossedBag-Offwhite 189019</a>
from elements import *
pygame.init()
screen = pygame.display.set_mode((800, 800))
clock = pygame.time.Clock()
world = elements()
world.add_wall((100, 200), (300, 200))
# Main Game Loop:
while running:
# Event Handling
# Maybe calling world.add_ball(event.pos) or world.add_square(event.pos)
# ...
screen.fill((255,255,255))
# Update & Draw World
world.update()
world.draw(screen)
# Flip Display
pygame.display.flip()
# Try to stay at 50 FPS
clock.tick(50)

[[category:software ideas]]
[[category:physics]]
[[category:science]]

Latest revision as of 23:57, 18 May 2010

Elements logo1.png

About

The Elements project is all about free and easy 2D physics for python and the XO laptop. It is used as the backend for the XO physics playground activity Physics.


Watch this and that video to see where we are heading
IRC: #elements on irc.freenode.net


Homepage: http://elements.linuxuser.at

Screenshots

(from Elements/Screenshots)

Screenshot1.png Screenshot2.png

Screenshot3.png Screenshot4.png


Pygame Example

The typical usage in pygame can look like this:

      import pygame
      from pygame.locals import *
      from pygame.color import *   

      from elements import *
       
      pygame.init()
      screen = pygame.display.set_mode((800, 800))
      clock = pygame.time.Clock()

      world = elements()
      world.add_wall((100, 200), (300, 200))
         
      # Main Game Loop:
      while running:
         # Event Handling
         # Maybe calling world.add_ball(event.pos) or world.add_square(event.pos)
         # ...

         screen.fill((255,255,255))

         # Update & Draw World
         world.update()
         world.draw(screen)

         # Flip Display
         pygame.display.flip()
          
         # Try to stay at 50 FPS
         clock.tick(50)