Superplot3d: an open source GUI tool for 3d trajectory visualisation and elementary processing
© Whitehorn et al.; licensee BioMed Central Ltd. 2013
Received: 28 June 2013
Accepted: 28 August 2013
Published: 30 September 2013
When acquiring simple three-dimensional (3d) trajectory data it is common to accumulate large coordinate data sets. In order to examine integrity and consistency of object tracking, it is often necessary to rapidly visualise these data. Ordinarily, to achieve this the user must either execute 3d plotting functions in a numerical computing environment or manually inspect data in two dimensions, plotting each individual axis.
Superplot3d is an open source MATLAB script which takes tab delineated Cartesian data points in the form x, y, z and time and generates an instant visualization of the object’s trajectory in free-rotational three dimensions. Whole trajectories may be instantly presented, allowing for rapid inspection. Executable from the MATLAB command line (or deployable as a compiled standalone application) superplot3d also provides simple GUI controls to obtain rudimentary trajectory information, allow specific visualization of trajectory sections and perform elementary processing.
Superplot3d thus provides a framework for non-programmers and programmers alike, to recreate recently acquired 3d object trajectories in rotatable 3d space. It is intended, via the use of a preference driven menu to be flexible and work with output from multiple tracking software systems. Source code and accompanying GUIDE .fig files are provided for deployment and further development.
Comparatively recent developments in object trajectory capture allow easy acquisition of three-dimensional (3d) flight data from moving objects by capturing output from two fixed position cameras with overlapping x and y axes and applying on-the-fly conversion to Cartesian xyz co-ordinates [1–6]. One such commercially available tracking solution is Trackit 3D (SciTrackS, GmbH) . Trackit 3D allows the trajectories of very small objects to be tracked, including those of very small insects [3, 7, 8].
In an ordinary tracking event using a standard PAL analogue camera at 25 frames s-1, Trackit 3D utilises the 2 fields contained within each frame. Irrespective of whether tracking is correct, one second of recorded output equates to 50 textual lines of data with each line intended to represent the current position of the object being tracked. Acquisition of flight data by this method rapidly generates vast sets of Cartesian output that necessitates the use of 3d visualisation in order to make it meaningful and ensure tracking integrity remains consistent. For example, in a real world scenario, 22 minutes of insect tracking will create output that exceeds the bounds of an .xls file (65,536 rows). Whilst it is easy to interrogate such data with the plot3 command in MATLAB (The Mathworks, MA) or a free equivalent numerical computing environment such as GNU Octave , doing so provides very basic output and necessitates that the user apply specific syntax in order to format or interrogate plotted output or alter which points are plotted. Whilst this may be suitable for a short trajectory, it becomes increasingly arduous when the track duration is over several minutes or indeed if only a few seconds of the track are of interest. In addition, further analysis in such an environment requires considerable familiarisation with MATLAB or Octave.
Furthermore, inclusion of the source code and accompanying GUIDE .fig file allow the user to readily modify this program as necessary.
Methods and implementation
Superplot3d is a platform independent MATLAB .m file (available under creative commons license from http://superplot3d.slu.se) compatible with MATLAB R2010a (R14) and above. Moreover, if the MATLAB compiler toolkit is present on the development machine, it is deployable as a standalone executable. This allows a small self-contained application to be built enabling users with the appropriate MATLAB Compiler Runtime (MCR) installed on their system to use all functions without having a MATLAB installation present. Any built application is thus designed to neatly co-exist with the track acquisition software on the data acquisition workstation, allowing for near instantaneous trajectory inspection.
Calculations for track analysis
Distance between first point pair (point i and i-1)
P i - Pi - 1
Dependent upon original data
Same as above for i+1 and i
Same as above
Distance between point pair divided by time difference
Distance unit time unit -1
Idiothetic turning angle
Angle of 2nd point pair, relative to first point pair
Angle, relative to reference vector
w= reference vector
Superplot3d is a framework for rapidly evaluating object trajectory data. It is designed to form a platform for further development and in itself provides a useful tool for trajectory examination. It has been used for real world mosquito flight trajectory data at the Gibson laboratory, Natural Resources Institute, University of Greenwich UK.
IAND is a postdoctoral research fellow in chemical ecology at the Swedish University Of Agricultural Sciences, SLU Alnarp. LW is a visual effects artist and physics graduate. FMH is a postdoctoral research fellow at the University of Greenwich.
A previous non-GUIDE based version of this program was written by IAND to process mosquito flight data at the lab of Dr G Gibson (Natural Resources Institute) and Prof IJ Russell (University of Brighton). This project was thus partially funded by a BBSRC grant (BB/F003307/1) awarded to GG and IJR. IAND would like to thank both for their support during this time. We would also like to thank Dr S Young (Natural Resources Institute) for contributing idiothetic 3d turning angle code which was ported to MATLAB by IAND and LW. We thank A Pakyari (SLU Uppsala) for facilitating online hosting of this project. Lastly, we thank two anonymous reviewers for their valuable comments on the manuscript.
- Hardie J, Young S: Aphid flight-track analysis in three dimensions using video techniques. Physiol Entomol. 1997, 22: 116-122. 10.1111/j.1365-3032.1997.tb01148.x.View ArticleGoogle Scholar
- El-Sayed A, Gödde J, Arn H: A computer-controlled video system for real-time recording of insect flight in three dimensions. J Insect Behav. 2000, 6: 881-900.View ArticleGoogle Scholar
- Fry S, Bichsel M, Müller P, Robert D: Tracking of flying insects using pan-tilt cameras. Neurosci Meth. 2000, 101: 59-67. 10.1016/S0165-0270(00)00253-3.View ArticleGoogle Scholar
- Cooperband M, Cardé R: Orientation of Culex mosquitoes to carbon dioxide- baited traps: flight manoeuvres and trapping efficiency. Med Vet Entomol. 2006, 20: 11-26. 10.1111/j.1365-2915.2006.00613.x.View ArticlePubMedGoogle Scholar
- Spink A, Ballintijn M, Bogers N, Grieco F, Loijens L, Noldus L, Smit G, Zimmerman P: Proceedings of Measuring Behavior 2008. 2008, The Netherlands: MaastrichtGoogle Scholar
- Butail S, Manoukis NC, Diallo M, Ribeiro JMC, Lehmann T, Paley DA: The dance of male Anopheles gambiae in wild mating swarms. J Med Entomol. 2013, 50: 552-559. 10.1603/ME12251.View ArticlePubMedGoogle Scholar
- Müller P, Robert D: A shot in the dark: the silent quest of a free-flying phonotactic fly. J Exp Biol. 2001, 204: 1039-1052.PubMedGoogle Scholar
- Müller P, Robert D: Death comes suddenly to the unprepared: singing crickets, call fragmentation, and parasitoid flies. Behav Ecol. 2002, 13 (5): 598-606. 10.1093/beheco/13.5.598.View ArticleGoogle Scholar
- GNU Octave: Network Theory Limited. 2002,http://www.gnu.org/software/octave.Google Scholar
This article is published under license to BioMed Central Ltd. This is an Open Access article distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/2.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.