Skip to content

GSoC 2012 Report Bharath M R: Implicit plotting.

catchmrbharath edited this page Aug 28, 2012 · 8 revisions

About me

My name is Bharath M R. I am a fifth year dual degree student of Electrical Engineering at IIT Madras. My project involved setting up the implicit plotting functions for SymPy and improving the plotting module.

Project

The first part of my project was to implement the implicit plotting module. The implementation of the implicit plotting module closely followed [1]. The implicit plotting module uses interval arithmetic, and this was implemented at the start of my GSoC project. Initially the idea was to implement it in mpmath, but due to speed concerns, the interval arithmetic module was completely implemented in numpy. The interval arithmetic is not completely accurate as it uses floating points, but it was sufficient for plotting. The next part was to extend the algorithm to handle boolean combinations of functions. With small changes to the interval arithmetic module, implicit plotting of boolean combinations of function was implemented.

One of the improvements to the existing plotting module was adaptive sampling. This allowed the plotting module to plot functions which varied heavily, by checking the whether three points were almost collinear, and recursively sampling more, if the points are not almost collinear. This allows the plotting of $sin(10x)$ accurately, which otherwise would represent a different sine wave, due to aliasing.

I spent some of my time trying to get the plotting module working with svgfig. The output from svgfig wa shighly inconsistent sometimes, and it was also not in active development, hence the idea of adding plotting for the SymPy Live was dropped.

Clone this wiki locally