GSoC 2015 Application Wanlin Xie: Multiple Types of Coordinate Systems

Wanlin Xie edited this page Mar 26, 2015 · 9 revisions

#TITLE ##SymPy - Implementing Multiple Types of Coordinate Systems

#ABOUT ME

Name: Wanlin Xie

University: Columbia University, freshman

Timezone: Eastern Standard Time

Contact Info:

Bio/Background: I am currently pursuing a Bachelor's Degree in Computer Science and a minor in Applied Mathematics. Python is my favorite language so far. I also have experience in Java, HTML, CSS, and Matlab from classes and projects that I have worked on in the past. My favorite text editor is vi. Although it took a period of time to get used to only using the keyboard, I've found that it was much faster and more efficient for me to use than other text editors. My favorite part of Python that is different from Java and Matlab is it is much more mathematical and simple in that way. I like math because it is extremely formulaic and it is easy to understand once you understand the concept. Similarly, Python is so much simpler and cleaner in its syntax and code format; the way it defines its functions and variables are much more straightforward and easy for me to follow.

My favorite project that I've worked on so far is the game 2048 I coded in java for a final project in my senior year. It was an extremely popular game at the time and everyone was playing it so I thought it would be interesting to make it myself since I was familiar with how it worked. I created the GUI and the algorithm seemed simple in the beginning. Then, I realized some tricky obstacles while coding when implementing all the rules, which made the finished project extremely rewarding. I worked with recursion, exception handling, KeyListeners, etc. which really helped me develop my coding skills. I like learning while coding as that has always been the fastest way for me to learn new things. The Python feature I’ve had the most experience with is NumPy. I used NumPy last semester for my Percolation program, as well as the Nearest Neighbor problem. Even though I haven't had much experience with git or version control, I'm extremely excited to learn more about it.

Favorite feature of SymPy: : I loved SymPy as soon as I started playing around with it. The most amazing thing I’ve seen so far is how extremely fast and efficient it is. Even when integrating high exponents, it is much speedier than other platforms I’ve used.

>>> integrate(sin(x)**10,x)
63*x/256 - sin(x)**9*cos(x)/10 - 9*sin(x)**7*cos(x)/80 - 21*sin(x)**5*cos(x)/160 - 21*sin(x)**3*cos(x)/128 -      63*sin(x)*cos(x)/256

This computation took less than a second which I found extremely impressive. I really hope I get the opportunity to contribute to this amazing library and be a part of this wonderful project.

#COURSES TAKEN

  • Introduction to Computing for Engineers and Applied Scientists (Python)
  • Mathematical Modeling
  • Multivariable Calculus
  • Introduction to Computer Science (Unix, HTML, Python, Java)
  • Art of Engineering (Intro to Matalab)
  • Differential Equations

#THE PROJECT

The goal of my project is to create a system for the Vector class so it can take in coordinate systems other than Cartesian Coordinates. This project is exciting to me because I am very familiar with the material as I've taken multivariable calculus before. Some of the conversions between coordinates can be very time consuming so I want to improve the way people can handle these types of calculations. I think this project will be a very important addition to the SymPy library. I've also taken other classes such as Mathematical Modeling and Differential Equations as math has always been a favorite subject of mine, so combining both math and computer science is extremely interesting to me. My idea for the class structure is first split it into 2D and 3D coordinates. For 2D, there are Cartesian coordinates (x,y) and Polar coordinates (r,theta). Then, in the 3D subclass, there are Spherical coordinates (rho, phi, theta), Cylindrical coordinates (r, theta, z), and Cartesian coordinates (x,y,z). These are the main systems that I would look at. If there was extra time, I would look into more advanced coordinate systems just as log-polar coordinates, Plucker coordinates, etc.

#TIMELINE

Weeks 1-2: constructing basic structure of the Vector class for multiple coordinate systems; setting up variables, relating variables from one system to another so user can change coordinate systems easily

Weeks 3-5: look into Jacobians and transformations from one coordinate system to an arbitrarily defined second coordinate system.

Weeks 6-8: Work on being able to implement Green’s Theorem, Stoke’s Theorem, Divergence Theorem.

Weeks 9-10: Look into plotting module, right now plotting module only has Cartesian coordinates as well; add documentation

Weeks 11-etc: Go over everything, run lots of test cases, 3D plotting, etc.

#PATCH

Unmerged: (https://github.com/wanlinxie/sympy/pull/1) This is my first pull request. I went on the SymPy issues list and saw this problem: (https://code.google.com/p/sympy/issues/detail?id=3223&q=label%3AEasyToFix&colspec=ID+Type+Status+Priority+Milestone+Reporter+Summary+Stars&) I used recursion to make the algorithm more efficient. The reason it took so long is because it expanded the polynomial, so if there was a large exponent, the algorithm could be extremely slow.

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.