26 January 2012
PhyloPic Is Back!
08 March 2011
To Flash or not to Flash
Because I love Flash, I have a tendency to want to build everything in it. But over the years I've learned that this tendency must be curbed whenever possible. There are definite downsides to Flash, and especially to doing entire websites in Flash. (The now-defunct March of Man website and some abandoned versions of the Dinosauricon are testaments to this.)
For PhyloPic, it was pretty clear to me that there would be no significant advantage to building it in Flash. Load times would be increased without any functionality enhancement. I wouldn't be able to use it on my iPhone. And all the functionality I needed was easily available in plain old HTML/JavaScript/CSS.
With one exception.
The Submission Tool is built as a Flex app. There is one primary reason for this: image processing. Processing the silhouettes on the server side was an option, but one that could have potentially bogged the server down. (It's already starting to buckle a bit as is, pending some optimizations.) But, by using Flash's BitmapData class, I can do that bit of work on the client side before the silhouettes are shipped off to the database.
Of course there are some other benefits as well. In descending order of importance:
- Flash allows for a more unified experience for the submitter. No page reloads and no cross-browser differences.
- SPAM bots are much more capable of cracking HTML forms than cracking custom AMF web services. SWF files are generally opaque to them.
- It was easier for me to build and test.
UPDATE (2012 Jan 26): The Submission Page still uses Flash but is not a Flex app.
12 October 2010
What I Do For A Living: TRONiverse
It pulls posts from Twitter, Facebook, and Flickr and displays them orbiting a 3D globe. You can click on the globe to find posts near that area. Post about TRON and your post might appear, too!
Also, we added a neat little Easter egg: click on the globe and then hold down the "M", "C", and "P" keys. (People who've seen the original film might have an idea what to expect....)
27 July 2010
Yet Another 3D Visualization of Mangani Fossils
26 July 2010
3D Visualization of the Fossil Distribution of the Human-Chimpanzee Total Clade
![]() |
| Click on the image to open the visualization. |
Some data is missing, notably a lot of entries for our own species. Other data needs to be refined—some of the better-known species (ahem, Neandertals) are big clouds that need to be tied down to specific sites. Also, I obviously need to do more work on that present-day distribution map. But it's a decent start.
Fun things to do:
- See if you can find the oldest individual (the lone specimen of Sahelanthropus tchadensis).
- Try to find its Chadian compatriots.
- Find the earliest non-African individuals (hint: East Europe and the Malayan Archipelago).
- Wonder what the heck that thing in India is.
- Look for the single cluster of extinct chimpanzees (Pan sp.).
- Find the three subspecies of Homo sapiens other than our own. (Note: these may not be distinct from each other—I just prefer to err on the side of splitting for projects like these. Easier to revise later.)
- Marvel at how easy it is to become sympathetic to multiregionalism when you just view the distribution data without any morphological context and ignore the fact that not all regions are good for preservation.
- Wonder how people can possibly believe in baraminology in the face of such ample evidence. (Adding morphological data to this would help a lot—there really aren't any good "cutoff" points for our lineage.)
27 May 2010
Upcoming Names on Nodes Presentation
I have my work cut out for me....Names on Nodes: Automating the Application of Taxonomic Names within a Phylogenetic Context
Names on Nodes1 is an open-source2 Flex application which utilizes a mathematical approach to automate the application of phylogenetically-defined names to phylogenetic hypotheses. Phylogenetic hypotheses are modeled as directed, acyclic graphs, and may be read from bioinformatics or graph files (Nexus, NexML, Newick, and GraphML) or created de novo. Hypotheses may also be merged from multiple sources. Names on Nodes stores hypotheses as MathML, an XML-based language for representing mathematical content and presentation. Phylogenetic definitions may be constructed using a visual editor and exported in MathML. Thus, it is possible to create a dictionary of defined names and automatically apply them to phylogenetic hypotheses. In the current version of the application, such dictionaries exist only as MathML files, but in future versions definitions may also be loaded from databases (e.g., RegNum).
Additional functionality in Names on Nodes includes the ability to coarsen a phylogenetic graph (thereby simplifying it while still reflecting the overall structure) or to export it as an image file (raster or vector, potentially with semantic annotations).
- Source code available at: http://bitbucket.org/keesey/namesonnodes-sa/
- MIT license
12 May 2010
Why HTML 5 Canvas Will Not Be Replacing Flash That Soon
Not only are the arrowheads missing (as they are on Safari on all platforms, not just the iPhone), but the labels have bizarrely been placed outside the canvas, flipped upside-down! The tool works fine on Firefox and Chrome. (Internet Explorer has not implemented <canvas> yet, and I haven't played enough with the interim solution, ExplorerCanvas, to get it working.)
I think the <canvas> element is a cool idea, and I'll continue to play with it. But it has a long way to go to compete with a cross-platform tool like Flash. HTML 5 may be "open"—but it also needs to "work".
06 May 2010
PhyloPainter: Happy Little Trees
I'll probably write more on the topic later, but suffice to say for now that working HTML 5 feels like I've traveled in time back to 2001, the days of ActionScript 1.0. JavaScript is a poor language for anything complicated. Canvas has covered the basics of vector drawing well, but little else. That said, I see potential and I'm pretty certain the tools will improve.
For my first HTML 5 app, I ported some basic functionality from Names on Nodes, namely, the ability to read Newick tree strings and the ability to draw graphs. I give you:
It's a bit rough right now. For one thing, it doesn't work in Internet Explorer (despite the inclusion of a workaround JavaScript tool—the current version of IE doesn't support HTML 5 Canvas). But it's a start.
Give it a try—paint some happy little trees!
08 April 2010
Viewing Phylogenies at Different Graph Resolution
- Look through all nodes that have children, and find the ones whose children are all terminal (sinks).
- Merge each of those nodes with their children to create a "supernode".
- Merge all overlapping supernodes. (This is important for graphs where nodes may have multiple ancestors, although it doesn't come into play in this example.)
- Remove the supernodes from the graph and repeat from step 1. Keep going until no nodes are left.
- Add the supernodes to a new graph. A supernode is ancestral to another supernode if any of its subnodes are ancestral to any of the other supernode's subnodes.
20 November 2009
What I Do For a Living, Part 312: Dr. Facilier's Parlour
This is my first completed project using certain technologies:
- Facebook API
- Spark components (Flex 4 beta)
- Code Igniter PHP framework
Also see the Shadow Shakedown game therein for an example of how
DisplacementMapFilter can be useful. (I also got to do a tiny bit of character animation there.)I have to say I was very pleased with all of these new technologies. In particular, the Spark component set is a huge improvement over the previous Halo components. Skinning components is so easy now it's hard to imagine that it was ever difficult. Adobe has acted on the "Favor composition to inheritance" maxim, and it has paid off. Also, props to Code Igniter, with its flexible tools and strong emphasis on the MVC pattern, for making PHP development (something I had all but sworn off) actually kind of fun.
Enjoy!
24 August 2009
Online NEXUS File Viewer
- You must have a NEXUS file stored locally on your computer to use this.
- That file should have a TREES section. (If not, the viewer should just display a list of operational taxonomic units.)
- This could get messy for NEXUS files with lots of trees. (Although it's kind of neat-looking.)
- You can move the nodes around by clicking on them, or click anywhere else to move the entire diagram.
- I would dearly love to know if, for some reason, it does not work for a given file.
23 July 2009
Two "Names on Nodes"-Related Launches
30 June 2009
New Useless Utility: Text Tree Maker
Have you ever been discussing phylogeny online and wished there was an easy way to make a readable cladogram? (95% of readers leave.) Those of you who are left, check this out: Text Tree Maker. Just type in a Newick tree string, and voilá! Okay, so typing in a Newick tree string is not that easy in the first place, but it is easier.
Well, I'll be using it, anyway. Check this one out!
Ardipithecus
|--ALA-VP 2/10
`--+--ARA-VP 6/1
|--KNM-T1 13150
`--Praeanthropus
|--KNM-KP 29281
`--+--AL 288-1
|--KNM-WT 40000
|--KT 12/H1
|--LH 4
`--+--BOU-VP 12/130
|--Australopithecus
| |--Taung 1
| |--Australopithecus (Paranthropus)
| | |--SK 6
| | `--TM1517
| `--Australopithecus (Zinjanthropus)
| |--KNM-WT 17000
| |--OH 5
| `--Omo 18
`--Homo
|--KNM-ER 1470
|--KNM-ER 1813
|--OH 7
|--OH 9
`--Homo (Homo)
|--D 2600
|--KNM-ER 992
|--LB 1
`--+--Ceprano 1
|--Trinil 2
`--Homo (sapiens)
|--ATD 6-5
`--+--Mauer 1
`--+--Neandertal 1
`--+--Florisbad 1
|--Kabwe 1
`--Uppsala domkyrka: Carolus Linnaeus
NOTE: Right-click on the application and select "View Source" if you want to see some of the code behind it.
05 May 2009
'Nother Toolshop Animatic: The Head Map
Still clunky, but I'm just fleshing out the ideas at this point. Enjoy!
04 May 2009
March of Man: The Toolshop
I'm going to leave the site up as is, but I am also going to be working on a CG animation. I've made a new area of the website called "The Toolshop" where I'll be posting progress. Here are the first two mockups, using vector animation (click on the image to see the animation):
16 December 2008
My Yuletide Gift: Open Source ActionScript 3.0 Libraries!
Merry Solsticetime, everyone!
10 December 2008
Uncle Sam wants YOU!
This is a project I worked on with several other developers. (Well, I still am working on it—there are a couple of revisions we'll be rolling out before too long.) I also did some work on the main Army Experience Center website.
I believe this is the first project I've worked on involving Papervision3D that has made its way online. Hoo-ah!
17 August 2008
Sets for ActionScript
One of the things keeping me busy is, of course, Names on Nodes, the web application I am developing that will automate phylogenetic nomenclature. As part of that project, I have developed a mathematics package that I would eventually like to release as its own package. One class, however, is so useful that I have decided to jump the gun and offer it on its own.
We (ActionScript programmers) all know how useful the Array class is. It can be used to store a sequence of anything, so it can be repurposed as a list, a vector, an edge—all manner of collections.
Well, not all manner of collections. Just ordered collections that allow duplicate elements. What if you want a set: an unordered collection with no duplicates? I find I need sets all the time, but I have to use arrays. And arrays are not optimal for looking up an element's membership, or preventing duplication. As lists they're great, but as sets they suck.
For a while I used a class I'd made called ArraySet that wrapped an array, but this was only an improvement in API, not in performance. Then I took a cue from Java and created: HashSet.
The HashSet class wraps a Dictionary object, which it uses as a hash table. If an element belongs to the set, then that element is a self-referential key in the dictionary. If it doesn't, then there is no such key in the dictionary. And HashSet extends Proxy, so you can use bracket notation for many operations,. You can also use for..in and for each..in loops.
Here's a quick example:
// Create and populate the set.
var s:HashSet = HashSet.fromObject([1, 2, 3]);
trace(s.size); // 3
trace(s[1]); // 1
trace(s[2]); // 2
trace(s[0]); // undefined
trace(s.has(1)) // true
// Trace all elements of the set.
for each (var i:int in s)
{
trace(i);
}
// Trace all elements of the set (different method).
for (var x:* in s)
{
trace(x);
}
trace(s); // {1, 2, 3}
s.add(1);
trace(s); // {1, 2, 3}
s.add(4);
trace(s); // {1, 2, 3, 4}
s.remove(1);
trace(s); // {2, 3, 4}
delete s[2];
trace(s); // {3, 4}
s[3] = undefined;
trace(s); // {4}
...and so on. Full documentation is in the class itself, so you can figure out the details for yourself. I will mention that HashSet also has a number of functions in common with Array (every, filter, forEach, map, some) and others that are unique to sets (get empty, diff, intersect, prSubsetOf, subsetOf, union). It also has a few functions that Array really ought to have (clone, equals, remove).
Download it and try it! The full version is integrated into the mathematics package that I'm still tweaking, but this is too useful to keep to myself any longer. At least, I think so—let me know what you think.
06 June 2008
Three-Pound Monkey Brain: The Open Source Project
net.tmkeesey. But someone pointed out to me this morning that a better name was staring me in the face all this time. Thus, I have changed the packages from net.tmkeesey to ... threelbmonkeybrain! (A bit long-winded, but unfortunately you cannot start package names with numerical digits.)Along with this much-better name is a new location for the code. Point your Subversion clients to:
(Or, if you just want the code itself without unit tests, etc.:
http://svn3.cvsdude.com/keesey/PROJECTS/ threelbmonkeybrain/as3/trunk/src/threelbmonkeybrain)I've added a lot of new packages under the rubrics of
threelbmonkeybrain.load and threelbmonkeybrain.net, but I have not had time to build full unit tests for them. Once that's done, I'll write more about those.
04 June 2008
More Additions to Open Code: Collections and Connectivity
net.tmkeesey. SVN repository here.)net.tmkeesey.utils.mxStatic classes with utilities for handling Flex objects.
net.tmkeesey.utils.mx.ArrayCollectionUtilContains a convenience method for converting arrays to
ArrayCollection objects with filters and/or sorts.net.tmkeesey.utils.mx.FiltrationContains handy functions which can be used for
ICollectionView.filterFunction.net.tmkeesey.utils.mx.ListCollectionViewUtilContains a convenience method for converting
ListCollectionView objects to arrays, using filters and/or sorts.net.tmkeesey.utils.netStatic classes with utilities for handling
flash.net objects.net.tmkeesey.utils.net.URLRequestHeaderUtilContains methods for cloning and comparing
URLRequestHeader objects.net.tmkeesey.utils.net.URLRequestUtilContains methods for cloning and comparing
URLRequest objects.net.tmkeesey.utils.net.URLVariablesUtilContains methods for cloning and comparing
URLVariables objects.As always, I commit nothing until I've created ASDoc comments and flexunit tests for everything.
(O.K., not the most exciting update, but....)


