Andrew Que Sites list Photos
Projects Contact
Main

No articles for week of February 19, 2017

Falling back to closest date.

February 04, 2017

AQ Graph Release

   After a fair bit of cleanup work, my Javascript graphing library AQ Graph is ready for the world.
Graph demo   The design of AQ Graph began more than 6 months ago after an experiment at work with HTML 5 canvases.  I had started the basics for a simple line graph but ended up not needing any graphing functionality on the project I was using.  Then some months ago I started working on some FFT code where I needed a Javascript graphing library.  In the past I have used my PHP library X/Y Plot, but I wanted someone that ran client-side rather than server-side.  So I decided to look into what I was going to use for work but never pursued.  The results are a very fast X/Y graphing library that work with large data sets.  As part of a (as yet unreleased) project called WaveLab, I finished the base implementation of the graphing library.  This project required two kinds of graphs: an X/Y plot, and a bar graph.  They were quite messy so I decided that before finishing WaveLab, I would finish the graphing library.  The finishing process involved taking the project specialized library and making it general purpose. 
   I kept the high speed of the X/Y graph and worked on cleaning up the division and labeling function, making them common between the X/Y and bar graph types.  The bar graphs needed the most work.  While fairly basic in terms of options, they are fully functional.  I also made them capable of running as stand-alone and AMD libraries.
Chicago Skyline on Approach

Chicago Skyline on Approach

   Last day of the trip.  After our morning meetings and some lunch it was time to get back to Wisconsin.  It is hard taking picture out of an aircraft window at night because they are double-paned.  This produces a lot of glare form the inside lights.  But I did pull off a couple of good pictures of our approach to Chicago.  I ended up in bed around midnight and required to be awake at 5:00 am for breakfast tomorrow.  Going to be a groggy morning.
   I biked into work today only to find out the trip we've been trying to setup to travel out east culminated last night with a decision to travel today.  Since I was in Beloit for sushi, I didn't get the e-mail and found out shortly after arriving at work that we would need to travel that afternoon.  So, I worked until just before noon, cycled home, very quickly packed, and drove back to work.  The remainder of the day was spent traveling to Baltimore.
   Pictured are my coworkers and I having dinner during our travels.
   The group had just defeated Sir Brancen Waike, an oath breaker who had driven Sovella, the queen, into hiding and was draining the resources of Artume.  The Outlaw Console killed the Sovella's husband and that is how Waike took power.  Sefer had made arrangements with Sovella in order to gain her support.  Vishtorian negotiates to hammer out the details.  Sovella agrees to be part of the Riverlands Empire Collective (REC).  In exchange for taxes and conscription Sovella is placed as the ruler until her toddler son, Edryd, is comes of age. 
   The groups fame quickly spreads.  Sovella was well liked, and Waike hated.  Words spreads and 37 individuals volunteer to join our takes.  Waike is sentenced to death.  Vishtorian and Sefer are allowed an hour of questioning, but get nothing out of him as his constitution is far too high.  After his death, Vishtorian asks to be given disposal of his body where she takes the blood of a worthy enemy and gives the skull to Crampus.
   From there much research is done about Outsea.  Vishtorian makes sure to be at Sovella's side for all public events, and REC's fame begins to spread from the Artume around the River Kingdoms.
Allison

Allison

I’ve been working on a Javascript graphing library. I started the project as part of doing an update for my web-based demos. In the past I have used Javascript/PHP with my library X/Y Plot for graphics. But this requires a server request for each update of the graphic. With the maturity of HTML5 canvas this back end for generating graphics is no longer needed—everything can be done via Javascript.

So I started a demo using pure Javascript. I looked at various graphing libraries, but all of them seem like they are designed for small data sets. I want very large data sets, and in particular, when I graph an X/Y data set, I want to see the minimum and maximums represented. I did some experiments over the summer and found I could generate a graph with around 10 million data points in about 600 ms. Starting from that base, I worked on a FFT demo (still not finished). While the demo is mostly functional, the weak area was the limits to graphing. So the last few days I have been working on improving this. I added divisions and labels (concepts developed for X/Y Plot) and have been breaking the function pieces down into modules.

After getting the graph divided and labeled, I went back to improve speed. Using a separate setup function to draw the divisions and labels that also allocated all memory block, I was able to redraw data on the graph at very high speeds.

Points Milliseconds
32,768 2.5
65,536 4
131,072 6
262,144 7
524,288 13
1,048,576 23
4,194,304 211
16,777,216 350
67,108,864 1,520
134,217,728 3,200
268,435,456 8,767

I find these numbers impressive for a script-based language. One million data points in 23 ms is fast enough to do real-time data—if you can get a million points of data that fast. Hundred million data points sets are a bit absurd in a browser just because of the memory required, but are possible.

   Did some measurements of the time it takes FFT4loc to compute an FFT.  The results are far from impressive.  For powers-of-two it can do 4,096 points in 7 seconds, 16,384 in 31 seconds, 65,536 in 140 seconds.  But for doing a prime number like 4,099 points it takes 90 seconds.  The library is functional, but it is not fast.  This is mostly do to the fact that ooBasic is an interpreted language and clearly doesn't have much optimization.