-
Notifications
You must be signed in to change notification settings - Fork 5
Homework Week 5
Pick a physics library (box2d, toxiclibs, liquidfun, jBullet) to experiment with. For example, you can take a sketch you previously made in Processing and add physics to it using a library. You could also just take one of the examples and riff off of it. Think about the following questions:
- Did the process of using a physics library make your project easier to work with or more difficult?
- Did you get new functionality or did you feel constrained?
Some exercise ideas:
- Box2D
- Review how we learned to draw a wave pattern in Chapter 3. Create a ChainShape object out of a sine wave, perlin noise, or some other algorithm. Sample Answer 1, Sample Answer 2.
- Use Box2D to add physics to a complex shape other than a rectangle or circle. Try to approximate a custom design: alien creature, water bottle, lollipop, etc. You could use the PolygonShape and/or attach multiple shapes to a single Body.
- Use a revolute joint for the wheels of a car. Use motors so that the car drives autonomously. Try using a chain shape for the road’s surface.
- Use a mouse joint to move a Box2D body around the screen according to an algorithm or input other than the mouse. For example, assign it a location according to Perlin noise or key presses. Or build your own controller using an Arduino.
- Toxcilibs
- Use the Cluster structure as a skeleton for a cute, cuddly, squishy creature (à la Nokia Friends). Add gravity and also allow the creature to be dragged with the mouse.
- Create an object that both attracts and repels. What if it attracts any particle that is far away but repels those particles at a short distance?
- Use spring onnections between objects to control their interactions. Create and delete these springs on the fly. Consider making these connections visible or invisible to the viewer.
As always, please create a web page to document your homework. Make sure it include some visual documentation of your work as well as the source code. To the extent possible, please post your link before 9am on Monday morning, March 10th. I will go through them and select ~5 assignments to look at in class. Finally, please add questions related to your assignment next to your name as well as any other general/longer ones below? I'll be using your questions to craft the material I present in class.
- Name - I didn't understand _______. Could you please explain _______? What does _______ mean? How would I _______?
- Allison
- Daniel
- Danqing
- David I had some issues with inheritance for the custom shape and the blobby shape. I also tried to draw a custom boundary on mousePress which I could get to draw, but not to behave as a box2d shape - in the 'surface' tab
- Dexter
- Dimelsa
- Erin
- Hellyn
- Haylee
- Ilwon
- Isi
- Jaewoong
- Karen
- John
- Azure
- Ziv
- MOQN
- I didn't understand _______. Could you please explain _______? What does _______ mean? How would I _______?