Tuesday, July 30, 2013

Mid - term

And here it is, mid-term evaluation period is already open. And it seems like yesterday, we begin working on our projects. From last post, there explaining how the class text_render look, I was implementing it to existing code.

 Here is a final result , proof of concept latex interpreter. As you can see, it need to be upgraded.


Here's part of Octave code producing this plot.

graphics_toolkit('fltk');
x=0:0.1:10;
plot(x,sqrt(x));
title('Plot with LaTeX','fontsize',28);
ylabel('y=\sqrt(x)',interpreter','latex');

For now I will point only the main points that should be in next upgrade:
- it should have transparent background
- quality of image should be higher
- image should be smaller

   Transparent background 
Problem with current revision is that it use PPM format for transferring data to pixels member of any render class. It's handy, because Octave can directly open this file. Read image width and height, and then just read data stored in every pixel ( red, green and blue component ). But it has one big defect , alpha channel is missing. So there have to be another format or some kind of trick to get around this shortage of information.

   Antialiasing 
Current image is rendered form EPS file at 600 dpi. The idea is to render larger image and then scale it to fit original image at Octave plot. With this trick, rendered LaTeX image will be smoother. With better smooth there's better image quality. ( Note: Rendered image in plot presented here is rendered at 300 dpi to produce smaller image. )

   Image size
After placing image on plot is obvious that it's too big. It should be smaller to fit with other text on plot. As mentioned before we want smaller image then rendered, but with better smoothing so it will be pushed into smaller size to get this result.



No comments:

Post a Comment