| My Tech Projects |
| Last updated: Man-O-War, 1 Nov 2011 | Contact: |
| Current downloads / Notes |
|
||||
|
I'm also interested in the various ways to organize, index, and generally analyze my website (well, websites in
general). I'd like to play around with semantic web constructs. E.g. how are
my photos of fishing boats in Peru related to
photos of my dinghy and sail placement and
graphs of sailboat characteristics? I'd like to describe each
of those with semantic markup linked to (public and private) ontologies, then graphically link and navigate (pun there?) between them.
Something for the future. In the meantime, below is a HTML grapher that I found and am starting to fiddle with.
|
||||
The projects:
|
| Usage Mapper |
| Man-O-War, 31 Oct 2011 |
|
The notion is to map visits to this website on a world map and relate them to the pages viewed. <-- See the map in the left column (scroll up a bit). Click on it to enlarge and see more details. |
Visitors (not live)
|
||||||||
References:
|
|||||||||
| Hello World Remote Controller - Notes |
| Man-O-War, 25 Oct 2011 | Download |
|
The notion is to control the Arduino LED using an iPod Touch or iPhone via WiFi. |
||||||||
|
|
![]() |
|||||||
And here is the Arduino it is controlling:
|
||||||||
|
||||||||
Some notes regarding the code:
Installing Apache Tomcat 6 on Mac OS X (Snow) Leopard - pretty helpful
|
||||||||
| Camera Controller |
| Last updated: Melbourne, 9 Feb 2010 | Demo (you may need to use your browser's |
| zoom to fit - e.g. View > Zoom > Reset) |
|
Notion: |
|||||||
|
|||||||
|
Interesting problems: |
|||||||
| I think what would make this an interesting project is integrating the UI for all these functions on a snazzy device like the iPod. | |||||||
|
Status: |
||
|
Here
is a mock-up of the current GUI.
Note: you might need to zoom in
or out a little in your browser for the demo pages to fit right. (e.g. "<command> +" and
"<command> -" on Firefox on a Mac, "<CTRL> +" and "<CTRL> -" on Windows, etc).
The buttons along the bottom of these mocked-up pages (as well as the "8.63 volts" drill-down button
and the "?" button) are hooked up so please try them.
The other buttons would need to invoke functions on the Arduino so they don't work here. That mock-up should look OK with any web browser, BUT if you have an iPod Touch or iPhone, to see the actual look:
|
||
|
Melbourne, 6 Mar 2010 Video of my first version: |
||
| [25 Dec 2011: I'd like to port this code to the new Arduino WiFi shield when it becomes available.] | ||
| Stereo Webcam - Notes |
| Man-O-War, 16 Dec 2010 | Download |
|
Notion: |
|||||||||
|
|||||||||
|
Interesting problems: |
|||||||||
|
|||||||||
|
Possible solution: |
|||||||||
|
|||||||||
|
|
16 Dec 2010 | |||
|
As a first pass to learn about the USB interfaces to these Logitech Orbit AF webcams and see how the stereo video is going to come out,
I wrote an Objective-C program that runs on the MacBook which controls one or two webcams. The webcam(s) are plugged directly into
the USB port(s) of the MacBook (ie. no microcontroller). If you have one or two Logitech Orbit AF webcams and OS-X (I developed it
on 10.5 and then upgraded to 10.6 when it became available so they should work), you can download my code
here. I'm still working on the demo video and some documentation. |
||||
| Boat Performance Monitor |
|
Notion: |
|||||||||
|
|||||||||
|
Interesting problems: |
|||||||||
| The iPod user interface would make this snazzy, of course. But what I think would make this real interesting is keeping the history of how the boat has performed in the past on that particular point of sail. Ie. on that particular heading relative to the wind and that wind speed. Then we could use that past performance as a benchmark - can we do better? I think it would be very cool to have a public repository of performance data like this somewhere so that we could see how we compare with other boats - sort of a distributed, time-lagged sailing regatta. | |||||||||
|
Possible solution: |
|||||||||
|
|||||||||
| Boat Security Monitor |
|
Notion: |
|||
|
|||
|
Interesting problems: |
|||
|
This can probably be done with various off-the-shelf products. But I'm thinking I can do a better job
creating an integrated dashboard specifically for my needs. We'll see. I'd reuse parts of the Stereo Webcam and Boat Performance Monitor from above. |
|||
|
Possible solution: |
|||
|
|||
| HTML Grapher - Notes |
| Last updated: Mt. Desert Island, 3 Aug 2010 | The applet |
| Download the code |
I found a cool HTML grapher on http://www.aharef.info/static/htmlgraph/. Kudos to Marcel Salathé and Jeffrey Traer Bernstein. It creates a graphical depiction of the HTML tags on webpages. The individual nodes (that is, the inner circles of each of the nodes in my plots) are colored according to the HTML tag (blue for <a>, green for <div>, red for <table>, etc).
I added code to allow viewing more than one page. A sample screen shot is shown below. Each connected blob represents a different page on my website (/cr34-analysis.php is yellow, /index.php is red, /sv-breakaway.php is blue, /about-me.php is green, etc). The page you're now reading, /tp.php, is purple. When the applet is running, it looks like spindly creatures under a microscope. To me anyway. In the future, I'd like to show the links between pages and add the ability to pick which pages to show.
Following is a sample screen capture of the results (you can click on this screenshot to hopefully invoke the actual applet):

If you're having problems invoking the applet above, check to see if you have Java Applets enabled in your browser. As a test, see if you can display the clock here (click on a time zone).
On a broadband network connection, the applet should take just a few seconds to load (the background turns black and the Start Button (
The applet was created using the current version (1.2.1) of Processing. The embed code that Processing produced looks pretty robust. If you are having a problem viewing it, I'd appreciate hearing what version of what browser you are using (email me at ). Also, let me know what version of Java you're using, if you know it.
Here are results of my testing this applet with various browsers on my Mac and Vista systems:
|
| Monitor the battery on my Macbook |
| Man-O-War, 18 Oct 2010 | Initial (rough) pass at the server-side UI |
Shortly after I got back to the boat, my laptop started acting a little berzerk when it was recharging. Even though it isn't that old and I usually run it off the charger (with only about 180 battery recharge cycles so far), at first I thought cripes - the battery is worn out. It is a little difficult (and costly) to get parts here and I was getting a little anxious. I googled around and soon found the likely cause - I don't recalibrate the battery often (well.. I think I did it once when I first got this laptop). But other possible causes mentioned were a bad battery, faulty logic board, problems with the charger, and needing to reset the System Management Controller (SMC). It wasn't clear at first that the battery was being recharged at all. But as I watched the power readings in [Apple] > About This Mac > More Info... > Power during that whiney recharge cycle, it did seem to (slowly) get back to a full charge. I then followed the recommended recalibration process and it's been OK since.
|
Anyway, I got to thinking that a battery cycle grapher might be interesting and could maybe help me improve the battery life. I also saw some Apple(?) documentation suggesting that at the end of the battery life, these power readings get erratic, so this tool may help me determine when it's |
||
|
end of life is approaching (how morbid is that? :-). I wrote a little program that samples the same Power readings as can be viewed in the About This Mac panel I mention above (by programatically invoking /usr/sbin/system_profiler once a minute). I currently simply write the data to a .csv file. Here is a sample of the results after formatting the .csv data a bit in Excel. |
![]() |
|
The vertical axis for the voltage (the purple line) is on the right hand side (0-14V). The plot starts (on the left) with me unplugging the charger. When it got to 5 minutes left on the battery (the bottom of the blue "V" in the graph), I plugged the charger back in. I stopped the plot when the battery indicator (on the MacBook menu bar) was showing "(Charged)". I was surfing the web and watching a DVD on the laptop while this was going on.
Man-O-War, 22 Nov 2010
| Here's the current UI. It displays the readings in realtime (albeit slowly - one sample per minute). There is also a plot of the daily min/max/ave and a plot of the battery health (current full charge capacity divided by it's capacity when it was new) and the current battery life (how long it takes to discharge from a full charge to empty). There are a couple screen samples of those plots in my Welcome page for the server side reporter. I'd also like to have included the ability to overlay previous recharge cycles. But I am stopping here. I've just recently | ![]() |
|
|
come across a very similar
utility called MiniBatteryLogger
(although that developer's website has apparently been down for the past couple days. I am curious
to see what he was charging.. hmm.. pun there? :-). Still, I think this project was a "successful failure" in that
I learned a lot and got to try some new stuff (new for me anyway). For example, my user interface included pinch to zoom in/out
on the plots and the 2-finger gesture for scrolling the plot (that sounds a little vulgar, doesn't it?), and 3-finger swipe to
move between pages. I'll hopefully be able to resuse some of the code in future projects. And I enjoyed working on
this one. Again, the first draft of the server side of this (now defunct) app is found here. The user (running the UI, shown above, on their MacBook) would be able to post reports to the server and display them, along with others, on the Reports folder. My Aggregate Plots folder was intended to look similar to MiniBatteryLogger's Shared Data Battery Archive Page. As they say, C'est la vie. [Update: Currently, storing the sample screens from the user is not working on the server, so those parts are blacked out in the Reports folder. I need to update the version of the jdbc driver on the GoDaddy server to support writing of the images (as BLOBs) into my host database. It works on my local development server.] |
||
| Sailboat Characteristics Plotter |
| Man-O-War, 29 Nov 2010 |
The tool itself Notes |
This is an interactive web-based plotter of sailboat characteristices (length, beam, etc). It is based on the excellent database and spreadsheet that I downloaded (22 Nov 2010) from John Holtrop's website, www.johnsboatstuff.com (the download link is towards the bottom of his page). Mine is still very much a work in progress, but intended to (eventually) be an interactive version of the Excel plots of Crealock 34 and 37 characteristics that I made way waaay back in 2000. I am totally indebted to John Holtrop for posting his database and spreadsheets.
My interactive plotter can be found here. Below is a screen sample from it, where I've selected to plot the designs for Alberg, Crealock, and Paine. You can also select from a list of builders, or from a list of all the models. The model list should be complete. The others are still under construction.
Please try it out. And come back from time to time. I hope to make improvements.
|
|
2 Dec 2010 | |||
|
Here are my implementation notes. |
||||
|
|
5 Dec 2010 | |||
|
Regarding browser compatability.. I had wanted to develop this app such that the user does not require a Java plug-in
(to run an applet), as was the case for the HTML Grappher. So,
I ported the physics library to JavaScript.
The app does require HTML5 and I'm happy to say that most of the HTML5-enabled browsers appear to be playing well with the app.
Here is what I'm seeing to date: The app appears to be working well on Firefox (v 3.6.12), Opera (v 10.63), Safari (v 5.0.3), and Chrome (v 7.0.517 on Vista and 8.0.552 on Mac). It was not working well on IE8 (v 8.0.6001) - to be expected as IE8 doesn't support HTML5. On IE 9 (Beta, v 9.0.7930) the stuff does display but there are scroll bars placed around the graphical navigator. Apparently IE9 doesn't recognize the style="overflow-x: hidden; overflow-y: hidden;" that I'm using on the <frame> element for that section. I'll try to work around it (or maybe just give IE a little time to catch up). If you're on Windows, please try one of the other browsers for now. |
||||

References:
|
Hull Characteristics that affect Seakindliness/Seaworthiness - some interesting discussion |
Hmm. Regarding this project (well, all these projects), I see this as a form of self-expression. Sort of an intersection of three popular retirees' pursuits: writing, photography, and model building. I used to enjoy this sort of stuff at work.. a lot. Towards the end though, that got kind of knocked out of me. Too many co-workers asking, "Who asked you to do that/say that/think about that?". Now, I'm kind of enjoying it again. I need to say though that my manager for the last 7 or 8 years at work was very flexible and a pleasure to work for. She kept me from burning out until the very end (when she went on to a non-managerial position).
| Traer's physics library to Processing.js - Notes |
| Last updated: Man-O-War, 10 Feb 2011 | Download & samples |
For a graphical navigator for my Sailboat Characteristics Plotter I wanted to avoid the user needing to have a Java plugin to run an applet like with the HTML Grapher. I like the Processing IDE for the Arduino projects and came across Processing.js. I am using Jeffrey Traer's physics library and have now ported it to Processing.js. So a sketch using the Traer physics library API should be able to run in any HTML5 capable web browser without a Java plugin. It will run as JavaScript (supported by Processing.js) and not as an applet. All the current versions of the browsers (and IE9 Beta) appear to support HTML5 and my testcases all seem to run OK with them (some faster than others, but so far they all have functioned the same). Anyway, to port Traer's code, I made the following changes:
| Man-O-War, 9 Dec 2010 | ||||||||||||||||||||||||||||
| Downloaded the 3.0 source code from traer.cc/mainsite/physics/ (what is now murderandcreate.com/physics). Here are
the terms from his download page:
LICENSE - Use this code for whatever you want, just send me a link jeff [at] traer.cc |
||||||||||||||||||||||||||||
| Renamed class variables so that they are not the same as accessor methods of the class. The problem is that JavaScript apparently doesn't handle the situation where there is a method called "foo()" and a variable within the class also called "foo". | ||||||||||||||||||||||||||||
| Commented out the import java.util.* in ParticleSystem and RungeKuttaIntegrator. I thought I would need to do something with ArrayList, but thankfully that appears to be supported in Processing.js so there was nothing more I needed to do there. | ||||||||||||||||||||||||||||
| To remove particles and attractions from a ParticleSystem, I tried using the existing removeParticle(Particle) and removeAttraction(Attraction) methods. They seem to work OK in the IDE, but not in the Processing.js environment. I didn't spend any time investigating. Using the removeParticle(int) and removeAttraction(int) versions seem to work OK. I added a couple methods (marked in the code with "mrn") to make using the "int" versions a little easier. | ||||||||||||||||||||||||||||
| Man-O-War, 10 Feb 2011 | ||||||||||||||||||||||||||||
| Carl Pearson made some nice
improvements to the traer3.pde
which I am reposting here as traer3a.pde. In particular, (paraphrasing him) he 1. fixed a bug in the Euler integrators where they divided by time instead of multiplying by it in the update steps, 2. eliminated the Vector3D class - converting the code to use the native PVector class, 3. did some code compaction in the RK solver, 4. added a couple nice convenience classes, UniversalAttraction and Pulse, simplifying my Pendulums sample considerably. There is a small change to the Traer library API, namely change Vector3D to PVector.
|
||||||||||||||||||||||||||||
Here is the result (download the code):
| ||||||||||||||||||||||||||||
| Here is my previous version of the library and pendulums sample code for reference. | ||||||||||||||||||||||||||||
The pendulums sample displays the frames per second (fps). Here are some results from that (original Pendulums) sample:
| Viewer | Viewer's Version OS-X / Windows | Frames per Second for pendulums sample OS-X / Windows | ||
| F.R. Undefined (default) | F.R. Limited frameRate(60) | F.R. Unlimited frameRate(9999) | ||
| Processing IDE | 1.2.1 / 1.2.1 | 60 / 60 | 60 / 60 | 460 / 433 |
| Opera | 11.00 / 11.00 | 221 / 215 | 58 / 58 | 218 / 220 |
| Chrome | 8.0.552.231 / 8.0.552.224 | 202 / 223 | 61 / 60 | 201 / 220 |
| Safari | 5.0.3 / na | 98 / na | 60 / na | 99 / na |
| IE9 Beta | na / 9.0.7930.16406 | na / 58 | na / 53 | na / 58 |
| Firefox | 3.6.13 / 3.6.13 | 47 / 36 | 47 / 35 | 47 / 36 |
|
These were all run on a 2009 13" MacBook Pro (2.53 GHz Core 2 Duo w/ 4GB RAM) OS-X: Snow Leopard v10.6.4 Windows: Vista Home Premium SP2 on Bootcamp (sorry, that's all I have) | ||||
Or graphically:

I think whether the sample can do 400 fps is a little moot - it should be limited to say, 60 fps (by making a call to frameRate(60) in setup()) to make sure it looks OK across browsers. But, the questions IMO are:
- How well does the performance scale with the complexity of sketches using this library? That is, in a larger animation (more objects, a larger canvas), does performance become unacceptible on the browsers that are marginal on this (as yet) very simple sample?
- Are there easy changes to the application or library that result in good gains? -- the low-hanging fruit.
- Why is there such a big spread between browsers? Will some browsers/platforms do better on graphics applications because they have a better graphics library implementation/hardware assist/underlying support?
- Is this wide spread seen in the JavaScript benchmarks? Can the existing benchmarks help explain it?
|
processing.org processingjs.org Jeffrey Traer's physics library Raphaël—JavaScript Library |
Further Reading:
|
arborjs.org |
| Dromaeo Frontend |
| Man-O-War, 2 Feb 2011 | The tool (v20110112) / dromaeo.com |
Regarding the question (above),
- Is this wide spread seen in the JavaScript benchmarks? Can the existing benchmarks help explain it?
Applying the results in a more practical way may require profiling the application, doing hot-spot analysis, etc. So the questions,
- Are there easy changes to the application or library that result in good gains? -- the low-hanging fruit.
- Why is there such a big spread between browsers? Will some browsers/platforms do better on graphics applications because they have a better graphics library implementation/hardware assist/underlying support?
- How well does the performance scale with the complexity of sketches using this library? That is, in a larger animation (more objects, a larger canvas), does performance become unacceptible on the browsers that are marginal on this (as yet) very simple sample?
To address that question, I added a graphics benchmark to the tool. It is based on the pendulums sample.
| Here is a screen sample of the benchmark rendering the pendulums (here, 30 balls on a 200x200 canvas): |
![]() |
And here are some results that I'm seeing on the different browsers:

Config: Chrome 8.0.552, Firefox 3.6.13, IE 9.0.7930, Opera 11.00.1156, Safari 5.0.3. IE was run on Vista SP2 on Bootcamp, the rest were on OS-X 10.6.5. All runs were on a 2009 13" MacBook Pro. Click on the image to enlarge.
Each row is a different canvas size - from 50x50 to 400x400. The columns are browsers - labeled along the top. On each graph, the y-axis is fps (ave. over a 3 sec run), the x-axis is #balls, the red line is fps without actually drawing the balls and lines, the blue line is fps drawing the graphics (using Processing.js), and the green area is the difference between them (the cost, in fps, of the circle and line drawing).
The results from Chrome are interesting - the way it appears to degrade more dramatically than the other browsers as #balls increase when the graphics are rendered. It still ends up well above the others in all cases, and still comfortably over 60 fps.
The Opera results are also interesting - that is, the degradation at 100x100/10 balls/with graphics rendered (the fork on the left of that graph). And then at 200x200,
Opera makes a stronger showing than Chrome on the trivial end (small # objects/small canvas). Fixing their resource allocation problem (assuming it's not something basic that I'm not releasing in my code) will probably help in more complex animations. But, without further improvements to their code, on the more challenging end (large # objects) it will probably still be surpassed by Chrome's performance.
Man-O-War, 8 Jan 2011
I added an SVG variant to the Pendulums benchmark. Here are some results that I'm seeing:

Config: Chrome 8.0.552, Firefox 3.6.13, IE 9.0.7930, Opera 11.00.1156, Safari 5.0.3. IE was run on Vista SP2 on Bootcamp, the rest were on OS-X 10.6.5. All runs were on a 2009 13" MacBook Pro. Click on the image to enlarge.
Each row is a different canvas size - from 50x50 to 400x400. The columns are browsers - labeled along the top. On each graph, the y-axis is fps (ave. over a 10 sec run), the x-axis is #balls, the red line is fps without actually drawing the balls and lines, the green line is fps drawing the graphics using Processing.js, and the blue line is fps drawing the graphics using Raphael/SVG. The green and blue areas show the difference between not rendering and rendering using Processing.js and Raphael/SVG, respectively.
Man-O-War, 12,13 Jan 2011
I added a version of the SVG testcase that reuses the Raphael circle and line objects, rather than creating new ones for each frame. It is shown by the dashed blue line on these graphs:

Config: Chrome 8.0.552, **Firefox 3.6.13, ***Firefox 4.0b8, IE 9.0.7930, Opera 11.00.1156, Safari 5.0.3. IE was run on Vista SP2 on Bootcamp, the rest were on OS-X 10.6.5. All runs were on a 2009 13" MacBook Pro. Click on the image to enlarge.
Each row is a different canvas size - from 50x50 to 400x400. The columns are browsers - labeled along the top. On each graph, the y-axis is fps (ave. over a 10 sec run), the x-axis is #balls, the red line is fps without actually drawing the balls and lines, the green line is fps drawing the graphics using Processing.js. The solid blue line is fps drawing the graphics using Raphael/SVG creating new circle and line objects for each frame. The dashed blue line is reusing the objects from frame to frame - just changing their locations using Raphael's attr method on the objects. The green and blue areas show the difference between not rendering and rendering using Processing.js and Raphael/SVG, respectively. Please try it yourself.
The new and improved Raphael/SVG testcase (dashed blue line) generally performed better than my initial version. My initial version simply replaced the calls to Processing's ellipse() and line() with calls to Raphael's circle() and path(). The improved version allocates arrays of circle and path objects when the benchmark starts (before measuring fps starts) and then reuses them over the course of the benchmark, using Raphael's attr() method to change the locations. The odd exception is that on Safari and the 400x400 canvas on Opera, the performance got worse for the 10-ball case.
The other surprise was that with IE9 the benchmark stops during the 100x100 / 20 ball run. This occurred in the new testcase and happened on each of the 3 times I tried to run the benchmark. Ugh.
Opera showed the problem (reported above) in the first series (50x50). So it's results on the larger canvas sizes are probably degraded.
Man-O-War, 14 Jan 2011
Per a suggestion by timeu (post #11 in that thread), I ran the benchmark out to 400 balls (that's 1200 objects rendered - each pendulum is drawn as 2 circles and a line). I also changed the plots to show the Raphael/SVG testcase that reuses objects as the solid blue line (and blue area) and my original version that creates a new set of objects for each frame as the dashed blue line. Here are the current results:

Config: Chrome 8.0.552, Firefox 3.6.13, Firefox 4.0b8, Firefox 4.0b9, IE 9.0.7930, Opera 11.00.1156, Safari 5.0.3. IE was run on Vista SP2 on Bootcamp, the rest were on OS-X 10.6.5. All runs were on a 2009 13" MacBook Pro. Click on the image to enlarge.
Each row is a different canvas size - from 50x50 to 400x400. The columns are browsers - labeled along the top. On each graph, the y-axis is fps (ave. over a 10 sec run), the x-axis is #balls, the red line is fps without actually drawing the balls and lines, the green line is fps drawing the graphics using Processing.js. The dashed blue line is fps drawing the graphics using Raphael/SVG creating new circle and line objects for each frame. The solid blue line is reusing the objects from frame to frame - just changing their locations using Raphael's attr method on the objects. The green and blue areas show the difference between not rendering and rendering using Processing.js and Raphael/SVG, respectively.
On IE9, the benchmark stops during the 100x100 / 20 ball run. Opera showed the problem (reported above) in the first series (50x50). So it's results on the larger canvas sizes are probably degraded.
The benchmark is pretty simple. There are from 10 to 400 pendulums ("# balls"). Each is represented by a fixed point or particle and a free particle, as well as a spring between them. There is an attraction force (set to a negative value so they are repulsions) between all the free particles. For each frame refresh (tick of the physics system), the attraction forces are calculated between each particle and all the others. So it is an n² problem. The spring calculation and rendering are probably linear with n. So, I'd guess the complexity to be:
(n x n-1)/2 (forces) + n (springs) + n (rendering) = n²/2 - n/2 + 2n => n² + n
Man-O-War, 21 Jan 2011
|
To recap, the benchmark I used above (which was based on the pendulums sample) was dominated by
the calculations of the physics model - with a large non-linear component being figuring the attraction forces between the balls swinging
on the pendulums. To take a closer look at just the graphics performance, I made up a benchmark that just draws shapes - circles, rectangles, lines, and a short text string - in a simple loop. To the right is a screen sample. The benchmark varies from 4 to 4000 of these shapes (the datapoint of "4 shapes" renders one of each of these shapes, the datapoint for "4000 shapes" renders 1000 of each). The shapes are positioned and colored randomly from frame to frame. A table of random numbers is created at startup to avoid generating random numbers during the measurement. As before, the canvas size ranges from 50x50 to 400x400. |
![]() |
Here are the results from the different browsers:

Config: Chrome 8.0.552, Firefox 3.6.13, Firefox 4.0b9, IE 9.0.7930, Opera 11.00.1156, Safari 5.0.3. IE was run on Vista SP2 on Bootcamp, the rest were on OS-X 10.6.5. All runs were on a 2009 13" MacBook Pro. Click on the image to enlarge.
Each row is a different canvas size - from 50x50 to 400x400. The columns are browsers - labeled along the top. On each graph, the y-axis is fps (ave. over a 10 sec run), the x-axis is # shapes, the red line is fps without actually drawing the shapes, the green line is fps drawing them using Processing.js. The dashed blue line is fps drawing the graphics using Raphael/SVG creating new circle, line, rectangle and text objects for each frame. The solid blue line is reusing the objects from frame to frame - just changing their locations and color using Raphael's attr method on the objects. The green and blue areas show the difference between not rendering and rendering using Processing.js and Raphael/SVG, respectively.
Opera showed the problem (reported above) in the 500 shape testcase of the first series (50x50 canvas). So it's results on the larger canvas sizes are probably degraded. I have not included it in the plots below.
Here (v20110121) is this benchmark (called, "Just Shapes"). To run it, "Misc Graphics Tests" > "Run". There will be a log of the datapoints produced as well (in the split screen that should show up - copy & paste it into a .csv file if you want to import into a spreadsheet) The format of the data is as follows:
<m>,<n>,<# shapes>,<fps>
where <m> = canvas size; <n> = 0:wo/ rendering, 1:Processing.js, 2:Raphael/SVG V0(creates objects each frame), 3:Raphael/SVG (reuses objects)
Each datapoint is 2 seconds.
Man-O-War, 24 Jan 2011
Regarding Firefox appearing to get more efficient as #shapes increased, I wonder if they are doing some sort of clipping or z-buffer elimination of shapes that are say completely covered (and thus don't need to be rendered at all). To look at this, I made up a benchmark that draws 6x6 squares on a 400x400 canvas, with none of the squares overlapping. The result was a little disappointing because the behavior of the other browsers changed - IE9 even turned in the best SVG performance! I suspect I took too big a step away from the case I was examining - pertubating things a bit too much. Below is a screen sample from a run and the curves:
OK. I went back and made up a benchmark that is closer to the original "Just Shapes" benchmark. This time, I draw 6x6 rectangles, a 6-pixel diameter circle, an 8-pixel long line, and the letter "h" - again, none of them overlapping. The results are below. The IE9, Chrome and Safari SVG curves look very similar to the previous "Just Shapes" results of the 21st. And this time the Firefox SVG curves show modest growth as the #shapes increases. So, I suspect Firefox is doing some sort of clipping/z-buffering in it's rendering. Note that their SVG curves are again better than any of the other browsers. Kudos to their SVG rendering implementation.
Here (v20110123) is the "Tiny Squares" benchmark and here (v20110125) is the "Tiny Shapes" benchmark. To run either, "Misc Graphics Tests" > "Run". There will be a log of the datapoints produced as well (in the split screen that should show up - copy & paste it into a .csv file if you want to import into a spreadsheet) The format of the data is as follows:
<m>,<n>,<# shapes>,<fps>
where <m> = canvas size; <n> = 0:wo/ rendering, 1:Processing.js, 2:Raphael/SVG V0(creates objects each frame), 3:Raphael/SVG (reuses objects)
Each datapoint is 2 seconds.
Man-O-War, 27 Jan 2011
Here (v20110126) is this benchmark (called, "Tiny Shapes 2"). To run it, "Misc Graphics Tests" > "Run". There will be a log of the datapoints produced as well (in the split screen that should show up - copy & paste it into a .csv file if you want to import into a spreadsheet) The format of the data is as follows:
<n>,<# shapes>,<fps>
where <n> = 0:wo/ rendering, 3:All, 4:Circles, 5:Lines, 6:Rectangles, 7:Text
Each datapoint is 2 seconds. There may be points where IE9 blanks out or appears to freeze, but it *should* finish - just be patient. On Safari, you may need to disable the JavaScript long-running timeout ( Develop > Disable Runaway JavaScript Timer ). I did with the more demanding version of this (10 second datapoints, up to 4000 shapes). On the other browsers, I had no problems running the benchmark.
Please send any comments to or post to this Processing.js forum entry.
If you try the benchmark and see much different results - say, that IE9 performs OK on "Tiny Shapes" or that Text is not far off from Circle, Line and Rectangles in "Tiny Shapes 2", I'd like to hear about it along with something about your configuration (OS, hardware, version of IE9). All the other browsers showed slightly degraded results for Text compared with the other shapes in "Tiny Shapes 2", but nothing as dramatic as shown by IE9. Maybe it's my system.
Updates:
| 12 Jan 2011 | 1. Added a version of the SVG testcase that reuses the Raphael circle and line objects (rather than creating new ones) for each frame refresh. | ||
| 8 Jan 2011 | 1. Added an SVG testcase with comparison to rendering in Processing.js. | ||
| 3 Jan 2011 | 1. Added plots of the pendulums results. | ||
| 2 Jan 2011 |
1. Added an initial graphics benchmark - the pendulums (traer3.pde) sample. 2. Added the browser versions numbers to the output. |
||
| 26 Dec 2010 | Initial version |
Still to-do:
- Display testcase source code when user clicks on the testcase name
- Store results for a whole series using some sort of userid/password
- Look at profiling or "finger printing" a benchmark
- Look at adding hot-spot analysis
- Create a .csv format output of the results for use in a spreadsheet
|
Dromaeo wiki page (Last updated: 17 Aug 2010) Dromaeo benchmark automation script (2009) Microsoft's new IE9 triggers speed-test squabble (18 Nov 2010) Benchmark Results: JavaScript (21 Jul 2010) How Does Safari 5's JavaScript Performance Stack Up? (8 Jun 2010) |
| Man-O-War Heritage Museum Website |
| Man-O-War, 15 Mar 2011 |
This is a place to put my notes regarding the Man-O-War Heritage Museum website that we've put together. I think I'd like to develop some interactive family trees. Then it would be nice to mash that up with the historical context.
References:
|
Cyndi's Genealogy Homepage Construction Kit, GEDCOM macgenealogy.org/online-genealogy/ |
































