Summer of Code rapid prototype: "Visualization of STL Containers"

Greetings, Boost! I've been in the application process for Google's "Summer of Code", and John Maddock brought up the idea of rapid prototyping in order to start finalizing design ideas. Over a couple of days I worked out a rough sketch of how the user interface would be organized. The "Initial Proposal" below has a detailed description of what the project is about, but the rough idea is that I need to visualize data in STL containers using the SVG (Scalable Vector Graphics) format. The sample code provided uses std::vector<double> containers currently, and I will extend the idea to generic STL containers during the summer. Dr. Maddock had the idea that the class could use a stream-like interface, sampled below. svg_graph my_graph("file.svg"); my_graph<<x_scale(-10, 10)<<y_scale(-10, 10); my_graph<<plot_range(my_cont.begin(), my_cont.end()); I have the basic idea of streams working, but I haven't yet implemented multiple streams working in conjunction (as in line 2). Again, this is a rapid prototype that I squeezed in between schoolwork! I intend the main bulk of the work to be done during the summer, and I feel that I still need to do some refactoring of the code. I am looking for suggestions of directions people would like to see this project go. What would you like to customize in the output? Do you have a better idea for an interface? Am I taking the implementation in the wrong direction? How would you like invalid data to appear? Not at all? As a gray dot on an axis? I'd like to get a conversation going about what the user should/should not be able to do with this. Initial Proposal: http://www.tcnj.edu/~voytko2/proposal.txt Suggestions by mentors: http://www.tcnj.edu/~voytko2/suggestions.txt Zip file of code: http://www.tcnj.edu/~voytko2/svg.zip Output of sample code: http://www.tcnj.edu/~voytko2/first.svg The code compiles in both MS Visual Studio 8.0 and g++ 4.0.3. Thank you for your time, Jacob Voytko

Your ideas looks most promising. I'll look at your code more fully when I get a moment. I'm impressed how easy it is to knock up some simple and small encodings of graphs using SVG. You may be amused at my quick play-about attached. I am now convinced that the basic idea of using SVG for this sort of job is right. The file size is 3 kb and that is in a fairly verbose style and includes comments - it could probably be nearly halved with more care. Good luck with your GSoC application. Paul PS I'd be interested to know which browsers can display the attached file - Adobe SVG viewer is needed for IE6 at least. --- Paul A Bristow Prizet Farmhouse, Kendal, Cumbria UK LA8 8AB +44 1539561830 & SMS, Mobile +44 7714 330204 & SMS pbristow@hetp.u-net.com
-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Jake Voytko Sent: 02 April 2007 07:21 To: boost@lists.boost.org Subject: [boost] Summer of Code rapid prototype: "Visualization of STLContainers"
Greetings, Boost!
I've been in the application process for Google's "Summer of Code", and John Maddock brought up the idea of rapid prototyping in order to start finalizing design ideas. Over a couple of days I worked out a rough sketch of how the user interface would be organized. The "Initial Proposal" below has a detailed description of what the project is about, but the rough idea is that I need to visualize data in STL containers using the SVG (Scalable Vector Graphics) format. The sample code provided uses std::vector<double> containers currently, and I will extend the idea to generic STL containers during the summer.
Dr. Maddock had the idea that the class could use a stream-like interface, sampled below.
svg_graph my_graph("file.svg");
my_graph<<x_scale(-10, 10)<<y_scale(-10, 10);
my_graph<<plot_range(my_cont.begin(), my_cont.end());
I have the basic idea of streams working, but I haven't yet implemented multiple streams working in conjunction (as in line 2). Again, this is a rapid prototype that I squeezed in between schoolwork! I intend the main bulk of the work to be done during the summer, and I feel that I still need to do some refactoring of the code.
I am looking for suggestions of directions people would like to see this project go. What would you like to customize in the output? Do you have a better idea for an interface? Am I taking the implementation in the wrong direction? How would you like invalid data to appear? Not at all? As a gray dot on an axis? I'd like to get a conversation going about what the user should/should not be able to do with this.
Initial Proposal: http://www.tcnj.edu/~voytko2/proposal.txt
Suggestions by mentors: http://www.tcnj.edu/~voytko2/suggestions.txt
Zip file of code: http://www.tcnj.edu/~voytko2/svg.zip
Output of sample code: http://www.tcnj.edu/~voytko2/first.svg
The code compiles in both MS Visual Studio 8.0 and g++ 4.0.3.

On Tue, 03 Apr 2007 23:15:35 +0200, Paul A Bristow <pbristow@hetp.u-net.com> wrote:
PS I'd be interested to know which browsers can display the attached file - Adobe SVG viewer is needed for IE6 at least.
I tested it with firefox 2.0, opera 9.1 and konqueror 3.5.4 under linux, and all display the svg file correctly. It appears that this library will be very useful and simple to work with. Marco -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

I tested it in Internet Explorer on top of that, and the file itself does not open, but it displays properly when embedded in a webpage. The file/code that I provided is a proof-of-concept. Graphs that are drawn will be much smaller than what I linked to if I use a path rather than draw each line segment. There is a lot that I would like to refactor/rewrite in the code.. keep in mind that it is a prototype! I will be using this general code layout when I write code for a submission to the Boost community. If you see how the code could be organized differently, please let me know! Thank you for your time, Jake

-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Marco Sent: 03 April 2007 22:52 To: boost@lists.boost.org Subject: Re: [boost] Summer of Code rapid prototype: "Visualization ofSTLContainers"
PS I'd be interested to know which browsers can display the attached file - Adobe SVG viewer is needed for IE6 at least.
I tested it with firefox 2.0, opera 9.1 and konqueror 3.5.4 under linux, and all display the svg file correctly. It appears that this library will be very useful and simple to work with.
Thanks for checking this - good news. Paul PS The demo also shows how a 1-D 'scatter plot' might be useful - and one could add some confidence intervals, mean, median, mode etc markers too. --- Paul A Bristow Prizet Farmhouse, Kendal, Cumbria UK LA8 8AB +44 1539561830 & SMS, Mobile +44 7714 330204 & SMS pbristow@hetp.u-net.com

Paul A Bristow wrote:
PS I'd be interested to know which browsers can display the attached file - Adobe SVG viewer is needed for IE6 at least.
Comes up blank with IE6/Adobe SVG viewer for me, while Jake's displayed ok(I think it was pushed up and to the left. Jeff

The "Up and to the left" may have been just the viewing window I chose for the demo. I chose a non-standard viewing window to show that the user has the capability of moving the window to however they might like it. Jake On 4/6/07, Jeff F <TriumphSprint2000@hotmail.com> wrote:
Paul A Bristow wrote:
PS I'd be interested to know which browsers can display the attached file - Adobe SVG viewer is needed for IE6 at least.
Comes up blank with IE6/Adobe SVG viewer for me, while Jake's displayed ok(I think it was pushed up and to the left.
Jeff
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Jeff F Sent: 06 April 2007 21:14 To: boost@lists.boost.org Subject: Re: [boost] Summer of Code rapid prototype: "VisualizationofSTLContainers"
Paul A Bristow wrote:
PS I'd be interested to know which browsers can display the attached file - Adobe SVG viewer is needed for IE6 at least.
Comes up blank with IE6/Adobe SVG viewer for me,
Puzzling - it displays OK for me by selecting the file and using Open With Internet Explorer. (IE 6 and Adobe SVG viewer installed). (Vista IE7 doesn't work 'out-of-the-box' either - needs Adobe SVG viewer?). Paul --- Paul A Bristow Prizet Farmhouse, Kendal, Cumbria UK LA8 8AB +44 1539561830 & SMS, Mobile +44 7714 330204 & SMS pbristow@hetp.u-net.com

Paul A Bristow wrote:
-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Jeff F Sent: 06 April 2007 21:14 To: boost@lists.boost.org Subject: Re: [boost] Summer of Code rapid prototype: "VisualizationofSTLContainers"
Paul A Bristow wrote:
PS I'd be interested to know which browsers can display the attached file - Adobe SVG viewer is needed for IE6 at least.
Comes up blank with IE6/Adobe SVG viewer for me,
Puzzling - it displays OK for me by selecting the file and using Open With Internet Explorer. (IE 6 and Adobe SVG viewer installed).
"Restricted Sites" with the do not enter symbol is displayed in the statusbar. Perhaps it's related to some security settings? Jeff

Internet Explorer has had issues before with code execution vulnerabilities in .png files, which are also built using commands instead of dealing with images pixel-by-pixel http://www.microsoft.com/technet/security/bulletin/MS02-066.mspx I wouldn't at all be surprised if they are trying to cut down on support of command-based file formats to limit the number of attack vectors. An explanation of IE's support of SVG: http://wiki.svg.org/Internet_Explorer But Adobe also offers "SVG Viewer", but will remove it from their download page on January 1, 2009, (they cite the maturation of the market as the reason). There is an already promising alternative called Renesis, and with any luck, IE7 will either have support for a SVG viewer, or will come packaged with one (there is no shortage of people suggesting that to the IE7 team). Jake

I just got the final confirmation that I was accepted into Google's Summer of Code program, so if you have any final thoughts or suggestions on this matter, you have a month to get them to me before I begin all of the grunt work :) I am doing the project entitled "Visualization of STL Containers and Arrays", and if you have any feature requests or suggestions, I'd be interested in hearing them Jake On 4/7/07, Jake Voytko <jakevoytko@gmail.com> wrote:
Internet Explorer has had issues before with code execution vulnerabilities in .png files, which are also built using commands instead of dealing with images pixel-by-pixel
http://www.microsoft.com/technet/security/bulletin/MS02-066.mspx
I wouldn't at all be surprised if they are trying to cut down on support of command-based file formats to limit the number of attack vectors.
An explanation of IE's support of SVG: http://wiki.svg.org/Internet_Explorer
But Adobe also offers "SVG Viewer", but will remove it from their download page on January 1, 2009, (they cite the maturation of the market as the reason). There is an already promising alternative called Renesis, and with any luck, IE7 will either have support for a SVG viewer, or will come packaged with one (there is no shortage of people suggesting that to the IE7 team).
Jake

-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Jake Voytko Sent: 12 April 2007 04:23 To: boost@lists.boost.org Subject: Re: [boost] Summer of Code rapidprototype:"VisualizationofSTLContainers"
I just got the final confirmation that I was accepted into Google's Summer of Code program, so if you have any final thoughts or suggestions on this matter, you have a month to get them to me before I begin all of the grunt work :)
I am doing the project entitled "Visualization of STL Containers and Arrays", and if you have any feature requests or suggestions, I'd be interested in hearing them
Jake
On 4/7/07, Jake Voytko <jakevoytko@gmail.com> wrote:
Internet Explorer has had issues before with code execution vulnerabilities in .png files, which are also built using commands instead of dealing with images pixel-by-pixel
http://www.microsoft.com/technet/security/bulletin/MS02-066.mspx
I wouldn't at all be surprised if they are trying to cut down on support of command-based file formats to limit the number of attack vectors.
An explanation of IE's support of SVG: http://wiki.svg.org/Internet_Explorer
But Adobe also offers "SVG Viewer", but will remove it from their download page on January 1, 2009, (they cite the maturation of the market as the reason). There is an already promising alternative called Renesis, and with any luck, IE7 will either have support for a SVG viewer, or will come packaged with one (there is no shortage of people suggesting that to the IE7 team).
Jake
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
participants (4)
-
Jake Voytko
-
Jeff F
-
Marco
-
Paul A Bristow