Physics?

I am relatively new, but have some programs under my belt. I am interested in making a physics based program, but don’t know ere to start. Please help by giving me some sample code or some other way of teaching. Thank you!
~Kai

@Kai This is about as simple as it gets. Lookup physics in the build in reference for more info.

function setup()
    physics.body(EDGE,vec2(0,0),vec2(WIDTH,0))  -- create floor    
    b=physics.body(CIRCLE,40)   -- create ball
    b.x=WIDTH/2
    b.y=HEIGHT-100
    b.restitution=.9
end

function draw()
    background(40, 40, 50)
    fill(255)
    ellipse(b.x,b.y,80)
end

Thanks @dave but I am unsure what the restitution means

@Kai Look thru the build in reference. Everything you need explained is listed there. Restitution is the amount of bounce of the physics object. Just start Codea and tap the icon in the upper left corner. Select reference and then select physics. Tap on physics.body and read everything there.

Thank you @dave170 you are a big help

My blog has a lot of posts on physics - see in here

https://coolcodea.wordpress.com/2013/06/19/index-of-posts

Thanks @Ignatz but on one of your tutorials, it has gravity. Do you have one that can Acces the Ipad’d gyroscope for real gravity?

@Kai See the Codea reference under Motion & Location. Anything you have a question about can be found by doing a forum search. Just about anything that can be done has already been done and there’s example code on the forum. You can continue to ask questions, but if you do a search you won’t have to wait for someone to answer. Also, doing a search will lead to things you may not think to ask about. As always, we’re here if you run into problems.