# Showcase

This page shows some of the many ways Pymunk can be used. I hope you find them

  as inspiring as I do!

If you also have done something using Pymunk please let me know, and I can add it here!

## Games

| Guide The Ball made by Francis Ali. Retrieved 2020-03-30 A game combining Pymunk with Kivy that runs on Android mobiles! In Guide The Ball the task is to guide a ball through 19 exciting and challenging levels!
| My Sincerest Apologies made by The Larry and Dan show (mauve, larry). Retrieved 2018-10-25 Winner of PyWeek 24 (Overall Team Entry) A game of fun, shooting, and “I’m sorry to put you through this”. A fabricator robot on Mars was supposed to make a bunch of robots! But it got lazy and made robots that could make other robots. And it made them smarter than they should have been. Now they’ve all gone off and hidden away behind various tanks and computers. Happily, he knew how to construct you, a simple fighting robot. It’s your job to clean out each area! See Daniel Popes teardown here for additional details
| Beneath the Ice made by Team Chimera (mit-mit, Lucid Design Ar). Retrieved 2016-09-25 Winner of PyWeek 22 (Overall Team Entry) Beneath the Ice is a submarine exploration game and puzzle solving adventure! Uncover a mysterious pariah who can’t let you discover his secrets, who can’t let you in! Team Chimera take 3!
| Invisipin made by Tee. Retrieved 2016-01-25 Winner of PyWeek 20 (Overall Individual Entry) A pachinko-like puzzle game. Play some balls and watch their movement carefully (i.e. collect data) to reconstruct the board!
| Angry Birds in Python made by Estevao Fonseca. Retrieved 2016-10-30 Angry Birds game written in python using pygame and pymunk
| SubTerrex made by Paul Paterson. Retrieved 2016-01-25 A cave exploration game where you explore caves by descending into them on ropes.

## Non-Games

| Bouncing Balls, Beautiful Patterns made by Alessandro Giusti. Retrieved 2022-01-25 Satisfying simulations of bouncing balls obeying physical laws; for a fleeting moment during the simulation, the balls pass through a beautiful regular arrangement. Each sequence is obtained by joining two simulations, both starting from the time in which the balls are arranged regularly. One simulates forward in time, one backwards.
| manim-physics made by pdcxs, Matheart & Iced-Tea3. Retrieved 2021-07-05 This is a 2D physics simulation plugin that allows you to generate complicated scenes in various branches of Physics such as rigid mechanics, electromagnetism, wave etc.
| Computer Vision and Phyiscs made by Amirabbas Asadi. Retrieved 2021-06-25 Just playing with OpenCV + a hand tracking model + a physics engine :) A very cool blog post (and video) explaining how to combine computer vision and a little physics to create a simple environment for Augmented Reality. In the blog Amirabbas Asadi shows how OpenCV, Mediapipe and Pymunk can be combined to make a app where simulated balls bounce on the hand of the user.
| Galton Board made by Nav. Retrieved 2021-05-17 The quincunx (also known as a Galton board) created in Pymunk. This is a Galton Board simulation programmed to run in three modes, with medium sized balls, small balls and large balls. A bit of randomness had to be added to the ball elasticity and initialization positions, to aid with proper interaction with objects.
| PySimpleGUI Desktop Demo made by PySimpleGUI/Mike. Retrieved 2020-10-13 Demo of using PySimpleGUI together with Pymunk to create bouncing balls directly on the desktop, thanks to a transparent container window.
| Legged robot using differential evolution and perception made by Nav. Retrieved 2020-08-20 Legged robot first using Differential Evolution to navigate terrain and then learning to recognise the world via perception from its senses.
| Simulation of ambient chimes | Circle in a hexagon made by Jan Abraham.Retrieved 2019-11-17 An ambient piano chord produced by the simulation of a bouncing ball. The calculations were carried out using pymunk library. Tuning: Kirnberger III
| I teach AI to move with using NEAT made by Cheesy AI. Retrieved 2019-11-17 Recently I learned Pymunk 2d physics library. It is very cool so with that I made 2d Humanoid for my AI. Today I’m going to teach AI to move forward with NEAT. NEAT is a genetic algorithm for the generation of evolving artificial neural networks. Results are quite weird but it will be fun. Have fun!
| Car Configuration with Differential Evolotion made by Nav. Retrieved 2019-05-05 Among the simplest AI algorithms: Differential Evolution. Brought to life with Pymunk and Pygame. Each car has an objective of reaching the end of the track, but has only 15 seconds to do so. They explore the multidimensional search space of vehicle speed, chassis width, chassis height and wheel radius, to find a variety of configurations among which few are successful in helping the car cross the track. Source code available at github at https://github.com/nav9/evolutionaryCarRace
| VirtuaPlant made by Jan Seidl. Retrieved 2018-06-13 VirtuaPlant is a Industrial Control Systems simulator which adds a “similar to real-world control logic” to the basic “read/write tags” feature of most PLC simulators. Paired with a game library and 2d physics engine, VirtuaPlant is able to present a GUI simulating the “world view” behind the control system allowing the user to have a vision of the would-be actions behind the control systems.
| The Python Arcade Library made by Paul. Retrieved 2018-03-05 Arcade is an easy-to-learn Python library for creating 2D video games. It is not directly tied to Pymunk, but includes a number of examples and helper classes to use Pymunk physics from a Arcade application.
| billiARds A Game of Augmented Reality Pool made by Alex Baikovitz. Retrieved 2017-05-21 Alex built billiARds for his 15-112 (Fundamentals of Programming and Computer Science) term project at Carnegie Mellon University. Made in Python3 using OpenCV, Pygame, and Pymunk. Users can simply use a pool cue stick and run the program on any ordinary surface.
| pyPhysicsSandbox made by Jay Shaffstall. Retrieved 2017-01-01 pyPhysicsSandbox is a simple wrapper around Pymunk that makes it easy to write code to explore 2D physics simulations. It’s intended for use in introductory programming classrooms.
| Carrom Simulation made by Samiran Roy. Retrieved 2016-10-27 An open source Carrom Simulator interface for testing intelligent/learning agents. It provides an interface that allows you to design agents that that play carrom. It is built in python, using pygame + pymunk. This is the course project for CS 747 - Foundations of Intelligent and Learning Agents, taught by Prof. Shivaram Kalyanakrishnan at IIT Bombay.
| Self Driving Car made by Matt Harvey. Retrieved 2016-08-07 A project that trains a virtual car to how to move an object around a screen (drive itself) without running into obstacles using a type of reinforcement learning called Q-Learning.

## Papers / Science

Pymunk has been used or referenced in a number of scientific papers.

List of papers which has used or mentioned Pymunk:

1. Almar Oliva, Eduard. “Disseny i construcció d’un robot autònom per jugar al billar.” Master’s thesis, Universitat Politècnica de Catalunya, 2023.

2. Pan, Hainan, Xieyuanli Chen, Junkai Ren, Bailiang Chen, Kaihong Huang, Hui Zhang, and Huimin Lu. “Deep Reinforcement Learning for Flipper Control of Tracked Robots in Urban Rescuing Environments.” Remote Sensing 15, no. 18 (2023): 4616.

3. Yang, Yulong, Weihua Cao, Linwei Guo, Chao Gan, and Min Wu. “Reinforcement Learning with Reward Shaping and Hybrid Exploration in Sparse Reward Scenes.” In 2023 IEEE 6th International Conference on Industrial Cyber-Physical Systems (ICPS), pp. 1-6. IEEE, 2023.

4. Huang, Zenan, Haobo Wang, Junbo Zhao, and Nenggan Zheng. “Latent Processes Identification From Multi-View Time Series.” arXiv preprint arXiv:2305.08164 (2023).

5. de Schaetzen, Rodrigue, Alexander Botros, Robert Gash, Kevin Murrant, and Stephen L. Smith. “Real-Time Navigation for Autonomous Surface Vehicles In Ice-Covered Waters.” arXiv preprint arXiv:2302.11601 (2023).

6. Ansari, Abdul Fatir, Alvin Heng, Andre Lim, and Harold Soh. “Neural Continuous-Discrete State Space Models for Irregularly-Sampled Time Series.” arXiv preprint arXiv:2301.11308 (2023).

7. Ige, Ifeoluwatayo A., and Bolanle F. Oladejo. “Text2Simulate: A Scientific Knowledge Visualization Technique for Generating Visual Simulations from Textual Knowledge.” International Journal of Advanced Computer Science and Applications 14, no. 2 (2023).

8. Alex, Janey, Jason Stillerman, Noah Fritzhand, and Tucker Paron. “Agent-Based Model of Crowd Dynamics in Emergency Situations: A Focus on People With Disabilities.” arXiv preprint arXiv:2212.08149 (2022).

9. Schöttle, Marius, Tobias Lauster, Lukas J. Roemling, Nicolas Vogel, and Markus Retsch. “A continuous gradient colloidal glass.” Advanced Materials (2022): 2208745.

10. Huang, Bingling, and Yan Jin. “Reward shaping in multiagent reinforcement learning for self-organizing systems in assembly tasks.” Advanced Engineering Informatics 54 (2022): 101800.

11. Liu, Lucy, Gary Choi, and L. Mahadevan. “Quasicrystal kirigami.” Physical Review Research, 4(3), 033114, 2022.

12. Shen, Jeremy, Erdong Xiao, Yuchen Liu, and Chen Feng. “A Deep Reinforcement Learning Environment for Particle Robot Navigation and Object Manipulation.” arXiv preprint arXiv:2203.06464 (2022).

13. Lopez, Esteban Fernando. “Data-Driven Methods for Soft Robot Control and Turbulent Flow Models.” PhD diss., Illinois Institute of Technology, 2022.

14. Sadhukhan, Priyam, and Rastko R. Selmic. “Proximal policy optimization for formation navigation and obstacle avoidance.” International Journal of Intelligent Robotics and Applications (2022): 1-14.

15. Link, Martin, Max Schwarz, and Sven Behnke. “Predicting Physical Object Properties from Video.” arXiv preprint arXiv:2206.00930 (2022).

16. Gras, Benjamin James. “Side Channel Security Risks In Commodity Architectures” VU Research Portal. (2022).

17. Outa, Joseph, Xi Jia Zhou, Hyowon Gweon, and Tobias Gerstenberg. “Stop, children what’s that sound? Multi-modal inference through mental simulation.” PsyArXiv. May 13 (2022).

18. Enander, Jonas MD, Gerald E. Loeb, and Henrik Jorntell. “A Model for Self-Organization of Sensorimotor Function: Spinal Interneuronal Integration.” Journal of Neurophysiology (2022)

19. Abi Hamid, Mustofa, Dimas Aditama, Endi Permata, Nur Kholifah, Muhammad Nurtanto, and Nuur Wachid Abdul Majid. “Simulating the COVID-19 epidemic event and its prevention measures using python programming.” Indonesian Journal of Electrical Engineering and Computer Science 26, no. 1 (2022): 278-288.

20. Semage, Buddhika Laknath, Thommen George Karimpanal, Santu Rana, and Svetha Venkatesh. “Fast Model-based Policy Search for Universal Policy Networks.” arXiv preprint arXiv:2202.05843 (2022).

21. Ipe, Navin K., and Subarna Chatterjee. “An in-memory physics environment as a world model for robot motion planning.” In Soft Computing: Theories and Applications, pp. 559-569. Springer, Singapore, 2022.

22. Gessow, Samuel, Sunay Bhat, Yi-Chun Hung, and Vahe Gyuloglyan. “Parallel Double Cart Pole 239AS Project Report S2021.”

23. Sosa, Felix A., Tomer Ullman, Joshua B. Tenenbaum, Samuel J. Gershman, and Tobias Gerstenberg. “Moral dynamics: Grounding moral judgment in intuitive physics and intuitive psychology.” Cognition 217 (2021): 104890.

24. Hardo, Georgeos, Maximilian Noka, and Somenath Bakshi. “Accurate Segmentation of Bacterial Cells using Synthetic Training Data.” bioRxiv (2021).

25. Bass, Ilona, Kevin Smith, Elizabeth Bonawitz, and Tomer Ullman. “Efficient Partial Simulation Quantitatively Explains Deviations from Optimal Physical Predictions.”

26. Bass, Ilona, Kevin Smith, Elizabeth Bonawitz, and Tomer Ullman. “Partial Mental Simulation Explains Fallacies in Physical Reasoning.” (2021).

27. Yang, Lujie, Kaiqing Zhang, Alexandre Amice, Yunzhu Li, and Russ Tedrake. “Discrete Approximate Information States in Partially Observable Environments.”

28. Yuan, Jianya, Hongjian Wang, Honghan Zhang, Changjian Lin, Dan Yu, and Chengfeng Li. “AUV Obstacle Avoidance Planning Based on Deep Reinforcement Learning.” Journal of Marine Science and Engineering 9, no. 11 (2021): 1166.

29. Agmon, Eran, Ryan K. Spangler, Christopher J. Skalnik, William Poole, Shayn M. Peirce, Jerry H. Morrison, and Markus W. Covert. “Vivarium: an interface and engine for integrative multiscale modeling in computational biology.” (2021).

30. Agmon, Eran, Ryan K. Spangler, Christopher J. Skalnik, William Poole, Shayn M. Peirce, Jerry H. Morrison, and Markus W. Covert. “Supplementary Materials for Vivarium: an interface and engine for integrative multiscale modeling in computational biology.” (2021).

31. Enander, Jonas MD, Gerald E. Loeb, Henrik Jorntell, Adam M. Jones, Matthieu Kirkland, and Jordan Hurless. “A Model for Self-Organization of Sensorimotor Function: The Spinal Monosynaptic Loop.” bioRxiv (2021).

32. Skalnik, Christopher J., Eran Agmon, Ryan K. Spangler, Lee Talman, Jerry H. Morrison, Shayn M. Peirce, and Markus W. Covert. “Whole-colony modeling of Escherichia coli.” bioRxiv (2021).

33. Zakka, Kevin, Andy Zeng, Pete Florence, Jonathan Tompson, Jeannette Bohg, and Debidatta Dwibedi. “XIRL: Cross-embodiment Inverse Reinforcement Learning.” arXiv preprint arXiv:2106.03911 (2021).

34. Gerstenberg, Tobias, Max Siegel, and Joshua Tenenbaum. “What happened? Reconstructing the past through vision and sound.” (2021).

35. Delucia, Marco, Anita Catapano, Marco Montemurro, and Jérôme Pailhès. “Pre-stress state in cork agglomerates: simulation of the compression moulding process.” International Journal of Material Forming (2021): 1-14.

36. Semage, Buddhika Laknath, Thommen George Karimpanal, Santu Rana, and Svetha Venkatesh. “Intuitive Physics Guided Exploration for Sample Efficient Sim2real Transfer.” arXiv preprint arXiv:2104.08795 (2021).

37. Dhruv, Akshit J., Reema Patel, and Nishant Doshi. “Python: The Most Advanced Programming Language for Computer Science Applications.” (2021).

38. Welle, Michael C., Anastasiia Varava, Jeffrey Mahler, Ken Goldberg, Danica Kragic, and Florian T. Pokorny. “Partial caging: a clearance-based definition, datasets, and deep learning.” Autonomous Robots (2021): 1-18.

39. Ji, Hao, and Yan Jin. “Designing Self-Assembly Systems with Deep Multiagent Reinforcement Learning.”

40. Mori, Hiroki, Masayuki Masuda, and Tetsuya Ogata. “Tactile-based curiosity maximizes tactile-rich object-oriented actions even without any extrinsic rewards.” In 2020 Joint IEEE 10th International Conference on Development and Learning and Epigenetic Robotics (ICDL-EpiRob), pp. 1-7. IEEE, 2020.

41. Jiang, Lincheng. “A Computational Method to Generate One-story Floor Plans for Nursing Homes Based on Daylight Hour Potential and Shortest Path of Circulations.” (2020).

42. Chen, Ricky TQ, Brandon Amos, and Maximilian Nickel. “Learning Neural Event Functions for Ordinary Differential Equations.” arXiv preprint arXiv:2011.03902 (2020).

43. Jain, Ayush, Andrew Szot, and Joseph J. Lim. “Generalization to New Actions in Reinforcement Learning.” arXiv preprint arXiv:2011.01928 (2020).

44. Petitgirard, Julien, Tony Piguet, Philippe Baucour, Didier Chamagne, Eric Fouillien, and Jean-Christophe Delmare. “Steady State and 2D Thermal Equivalence Circuit for Winding Heads—A New Modelling Approach.” Mathematical and Computational Applications 25, no. 4 (2020): 70.

45. Hook, Joosep, Seif El-Sedky, Varuna De Silva, and Ahmet Kondoz. “Learning data-driven decision-making policies in multi-agent environments for autonomous systems.” Cognitive Systems Research 65 (2021): 40-49.

46. Matthews, Elizabeth A., and Juan E. Gilbert. “ATLAS CHRONICLE: DEVELOPMENT AND VERIFICATION OF A SYSTEM FOR PROCEDURAL GENERATION OF STORY-DRIVEN GAMES.”

47. Ipe, Navin. “Context and event-based cognitive memory constructs for embodied intelligence machines.”

48. Ipe, Navin. “An In-Memory Physics Environment as a World Model for Robot Motion Planning.” (2020).

49. Li, Yunzhu, Antonio Torralba, Animashree Anandkumar, Dieter Fox, and Animesh Garg. “Causal Discovery in Physical Systems from Videos.” arXiv preprint arXiv:2007.00631 (2020).

50. Suh, H. J., and Russ Tedrake. “The Surprising Effectiveness of Linear Models for Visual Foresight in Object Pile Manipulation.” arXiv preprint arXiv:2002.09093 (2020).

51. Vos, Bastiaan. “The Sailing Tug: A feasibility study on the application of Wind-Assisted towing of the Thialf.” (2019).

52. Wong, Eric C. “Example Based Hebbian Learning may be sufficient to support Human Intelligence.” bioRxiv (2019): 758375.

53. Manoury, Alexandre, and Cédric Buche. “Hierarchical Affordance Discovery using Intrinsic Motivation.” 2019.

54. Mounsif, Mehdi, Sebastien Lengagne, Benoit Thuilot, and Lounis Adouane. “Universal Notice Network: Transferable Knowledge Among Agents.” In 2019 6th International Conference on Control, Decision and Information Technologies (CoDIT), pp. 563-568. IEEE, 2019.

55. Du, Yilun, and Karthik Narasimhan. “Task-Agnostic Dynamics Priors for Deep Reinforcement Learning.” In International Conference on Machine Learning, pp. 1696-1705. 2019.

56. Siegel, Max Harmon. “Compositional simulation in perception and cognition.” PhD diss., Massachusetts Institute of Technology, 2018.

57. Caselles-Dupré, Hugo, Louis Annabi, Oksana Hagen, Michael Garcia-Ortiz, and David Filliat. “Flatland: a Lightweight First-Person 2-D Environment for Reinforcement Learning.” arXiv preprint arXiv:1809.00510 (2018).

58. Yingzhen, Li, and Stephan Mandt. “Disentangled Sequential Autoencoder.” In International Conference on Machine Learning, pp. 5656-5665. 2018.

59. Melnik, Andrew. “Sensorimotor Processing in the Human Brain and in Cognitive Architectures.” (2018).

60. Li, Yingzhen, and Stephan Mandt. “A Deep Generative Model for Disentangled Representations of Sequential Data.” arXiv preprint arXiv:1803.02991 (2018).

61. Hongsuk Yi, Eunsoo Park and Seungil Kim (이홍석, 박은수, and 김승일.) “Deep Reinforcement Learning for Autonomous Vehicle Driving” (“자율주행자동차 주행을 위한 심화강화학습.”) 2017 Korea Software Engineering Conference (한국정보과학회 학술발표논문집 (2017): 784-786.)

62. Fraccaro, Marco, Simon Kamronn, Ulrich Paquet, and Ole Winther. “A Disentangled Recognition and Nonlinear Dynamics Model for Unsupervised Learning.” arXiv preprint arXiv:1710.05741 (2017).

63. Kister, Ulrike, Konstantin Klamka, Christian Tominski, and Raimund Dachselt. “GraSp: Combining Spatially‐aware Mobile Devices and a Display Wall for Graph Visualization and Interaction.” In Computer Graphics Forum, vol. 36, no. 3, pp. 503-514. 2017.

64. Kim, Neil H., Gloria Lee, Nicholas A. Sherer, K. Michael Martini, Nigel Goldenfeld, and Thomas E. Kuhlman. “Real-time transposable element activity in individual live cells.” Proceedings of the National Academy of Sciences 113, no. 26 (2016): 7278-7283.

65. Baheti, Ashutosh, and Arobinda Gupta. “Non-linear barrier coverage using mobile wireless sensors.” In Computers and Communications (ISCC), 2017 IEEE Symposium on, pp. 804-809. IEEE, 2017.

66. Espeso, David R., Esteban Martínez-García, Victor De Lorenzo, and Ángel Goñi-Moreno. “Physical forces shape group identity of swimming Pseudomonas putida cells.” Frontiers in Microbiology 7 (2016).

67. Goni-Moreno, Angel, and Martyn Amos. “DiSCUS: A Simulation Platform for Conjugation Computing.” In International Conference on Unconventional Computation and Natural Computation, pp. 181-191. Springer International Publishing, 2015.

68. Amos, Martyn, et al. “Bacterial computing with engineered populations.” Phil. Trans. R. Soc. A 373.2046 (2015): 20140218.

69. Crane, Beth, and Stephen Sherratt. “rUNSWift 2D Simulator; Behavioural Simulation Integrated with the rUNSWift Architecture.” UNSW School of Computer Science and Engineering (2013).

70. Miller, Chreston Allen. “Structural model discovery in temporal event data streams.” Diss. Virginia Polytechnic Institute and State University, 2013.

71. Pumar García, César. “Simulación de evolución dirigida de bacteriófagos en poblaciones de bacterias en 2D.” (2013).

72. Simoes, Manuel, and Caroline GL Cao. “Leonardo: a first step towards an interactive decision aid for port-placement in robotic surgery.” Systems, Man, and Cybernetics (SMC), 2013 IEEE International Conference on. IEEE, 2013.

73. Goni-Moreno, Angel, and Martyn Amos. “Discrete modelling of bacterial conjugation dynamics.” arXiv preprint arXiv:1211.1146 (2012).

74. Matthews, Elizabeth A. “ATLAS CHRONICLE: A STORY-DRIVEN SYSTEM TO CREATE STORY-DRIVEN MAPS.” Diss. Clemson University, 2012.

75. Matthews, Elizabeth, and Brian Malloy. “Procedural generation of story-driven maps.” Computer Games (CGAMES), 2011 16th International Conference on. IEEE, 2011.

76. Miller, Chreston, and Francis Quek. “Toward multimodal situated analysis.” Proceedings of the 13th international conference on multimodal interfaces. ACM, 2011.

77. Verdie, Yannick. “Surface gesture & object tracking on tabletop devices.” Diss. Virginia Polytechnic Institute and State University, 2010.

78. Agrawal, Vivek, and Ryan Kerwin. “Dynamic Robot Path Planning Among Crowds in Emergency Situations.”

List last updated 2023-10-11. If something is missing or wrong, please contact me!

### Cite Pymunk

If you use Pymunk in a published work and want to cite it, below is a citation.cff example. If you prefer you can also visit the Github repository of Pymunk and use the shorthand “cite this repository” feature: https://github.com/viblo/pymunk

Feel free to modify to fit your style. (Make sure to modify the version number if included.):

    cff-version: 1.2.0
    message: "If you use this software and want to cite it, please do so as below."
    authors:
      - family-names: "Blomqvist"
        given-names: "Victor"
    title: "Pymunk"
    abstract: "A easy-to-use pythonic rigid body 2d physics library"
    version: 6.5.2
    date-released: 2023-10-22
    url: "https://pymunk.org"