User:Mooeypoo/GSOC 2013 Project

= WiPhys: Physics Embeds in MediaWiki =

Name and contact information
Name: Moriel Schottlender

Email: moo@smarterthanthat.com

IRC or IM networks/handle(s): mooeypoo

Location: New York City

Synopsis
My idea is to develop a plugin for MediaWiki that enables the easy embedding of interactive physics demos in wiki articles, using a Javascript physics engine like Box2web (which is based on Box2D)

This is intended for schools, educational sites and tutors (and anyone else who'd like to use it) that allows the basic rendering of physics demonstrations visually by picking up on basic code.

The project itself is ambitious and has a lot of potential, but the GSoC2013 portion of the project can serve as an initial building-blocks of a system that can allow for further extension in the future.

A demo of Box2Web can be seen here: https://code.google.com/p/box2dweb/

Implementation Details
I will concentrate mostly on developing a basic system to provide a link between Box2d and wiki markup. The implementation will be done in the following steps:
 * Creating a plugin that sends parameters to the box2web engine and renders the requested image.
 * Creating a wiki base-template to allow the user to insert parameters using wiki markup
 * Creating wiki sub-templates for two physical subjects as a starting point: projectile movement and collisions.

The implementation will be done under the consideration of allowing future expansion into more physics subjects, like rotational movement, energies, and even electricity and magnetism.

The system will be built so it allows users to add their own templates that interact with the box2d engine and produces powerful demonstrations in articles.

Considerations
The leading Javascript physics engine that can be used for this plugin is Box2web, based on the powerful C/C++ physics engine Box2D. However, there are several other Javascript-based physics engines that may be considered as alternatives: The proper javascript engine should be chosen based on the best compatibility and extendibility. While Box2Web is likely the forerunner, a short period of testing is allocated to this project to make sure these contenders are tested and not just dismissed outright.
 * Ammo.js
 * JigLibJS
 * Cannon.js

Basic Example
An example could be something like the following code:

(This is just an idea to illustrate the mechanism, it doesn't necessarily represent the actual code)

This above example shows how users can implement their own demos relatively easily. The ideal would be to later add an additional GUI level to add these demos in an easier manner, but that could be done as a followup to the GSoC initial proposal.

Deliverables
As was mentioned before, this project serves as the base core engine for future enhancements. At the end of the GSoC2013 timelines, the project will result in:


 * A plugin to use Box2D in Wiki pages using markup
 * A working markup for basic static physics demonstration images for two subjects: Projectile and Collisions.
 * A working schema for manipulating the demos:
 * Core Javascript/PHP rendering engine
 * JSON parsing for demo data
 * Core template and two sub-templates for each category (projectile and collisions

Timeline (tentative)

 * Stage 1:
 * Checking into the best approach in terms of Javascript physics engine
 * Familiarizing myself with the JS physics engine functionality.
 * Creating the base core of the mediawiki plugin
 * Stage 2:
 * Working on the mediawiki plugin: preparing for converting markup to object creation and setting up scenes with extendible options.
 * Creating a base template to parse mediawiki markup into the js engine commands
 * Stage 3:
 * Creating a child-template for "projectile movement"
 * Creating a child-template for "collisions"
 * Testing various scenarios with multi-body scenes for both scenes
 * Testing with more than one scene embed on the same wiki page

If time permits:
 * Creating a GUI for adding or editing a scene
 * Creating child-template for "rotational movement"

Availability
If accepted to GSoC, I will be available throughout the summer from the end of May to the end of August. I may have to take a summer class, but it is scheduled to be a couple of days a week during the evening, and accommodates full-time work. I will also work during the weekends, so this coursework time will be very much compensated for.

About you
I have a bachelor's in Physics and am now studying for my Computer Science masters in the New York Institute of Technology in New York City. I've always been very passionate about both, and I think physics can benefit from insights from computer science and vise versa.

Participation
There are a number of groups that can be helpful in finding resources about this subject. First, physics engine groups related to box2d and javascript/html5 strategies. Also, there are quite a number of groups that can help with finding the best basic physics demonstrations and formulas like physicsGRE forums.

Past open source experience
I've created a couple of small extensions to lesser-known CMS systems and some side projects in PHP, Javascript/jQuery and Perl. I've worked with SVG rendering libraries (RaphaelJS) and I have experience with physics/math modelling.

For more about my past projects, you can check out my github page.

I am hoping this will be my first proper big contribution to the community!

Any other info
I have submitted another proposal to GSoC2013 for MediaWiki that seems to be more desired. However way the GSoC projects go, if this idea has merit, I'd love to do it regardless of GSOC, so I would appreciate the comments and thoughts about this. I would like to make sure it is something the community wants to have, and that I am not missing any important aspects that may make this project not feasible to produce or maintain.

Thank you for your thoughts!

Moriel