to be too powerful in some situation and very strict
security measures are necessary if it is used as a web
application, and those security measures make using
Java much less comfortable now than it was 20 years
ago. Moreover, Java Virtual Machine must be instal-
led in a web browser or in a computer that would run
visualizations off-line, and this, even if it is a relati-
vely simple task, restricts the scope of users.
This is why we are moving the system from Java
to JavaScript using the fact that the latter language
is essentially ubiquitous - it is difficult to imagine a
personal computer without a web browser (Chrome,
Mozilla, Explorer, Opera, etc.), and all standard web
browser come with a JavaScript interpreter (which is
enabled by default). A user does not need to do more
than to find the proper web page and perform 3 ob-
vious clicks to open a selected visualization of our
collection. In this way, our system is going to be avai-
lable to literally any user of the web and requires no
installation of any software (assuming that a browser
is available).
At the present time we have moved the most com-
putationally difficult item of our collection - visua-
lization of Fortune’s algorithm for finding a Voronoi
diagram in the plane - from Java to JavaScript. The
visualization of Fortune involves a very complex 3D
visualization of a surface composed of a number of
cones under light coming from the left. It is substan-
tially more difficult that other 3D visualization of our
collection. The application allows a user to rotate the
surface in two directions and animate sweeping the
surface by an inclined plane, and we have found that
a JavaScript code is executed sufficiently fast even
on smart-phones and tablets (which, fortunately, have
smaller displays, which limits the size and complexity
of the displayed scene).
The reviewer is kindly invited to play with the vi-
sualization of Fortune algorithm at the URL (Ku
ˇ
cera,
) to see that the speed of simulation might be limi-
ting if the number of sites is too high, but it is quite
sufficient for the standard educational use.
Thus, the first condition has a threshold nature - if
the hardware is fast enough to compensate the inter-
preter slow-down for inputs of sizes typical for educa-
tional purposes, it is possible to forget it and concen-
trate on the third condition that can be fully satisfied
by a graphical script language that is embedded into
all standard web browsers.
There is still the second condition - how much pro-
grammer’s time and effort is needed. The second con-
dition is also in contradiction to the last one - simple
interpreted script languages are designed for writing
simple applications, but good algorithm visualization
with educational value could be quite complex soft-
ware products of thousands code lines. It would be
much more convenient to write such large codes in
an object-oriented language with a strict type control
(like Java and C++) that is supported by advanced de-
velopment tools (like Eclipse and Net Beans). There
are also extensions of script languages that bring at
least a part of the comfort of more advances systems.
However, we have found another tool that makes
writing JavaScript algorithm visualizations relatively
easy and fast - a strong programmer’s discipline. An
experienced programmer that is able to write natural
and easy readable programs, does not need to be ob-
served and directed by a development environment,
and avoids seductions of ‘easy’ tricks of script langua-
ges, is not much less productive in JavaScript than,
e.g., in Java. A benefit is a code that can be run by
essentially each web user without any system instal-
lations.
REFERENCES
Algoanim. algoanim.ide.sk.
AlgoLiang. cs.armstrong.edu/liang/animation/animation.html.
Algomation. www.algomation.com.
Algoviz. www.algoviz.org/biblio/authors; (a super-
reference: a web page containing several hundreds
of references to algorithm visualizations and anima-
tions).
bassat Levy, R. B. and Ben-Ari, M. (2007). We work so hard
and they don’t use it: acceptance of software tools by
teachers. In ITiCSE ’07: Proceedings of the 12th an-
nual SIGCSE conference on Innovation and techno-
logy in computer science education, Dundee, Scot-
land. ACM Press.
Brown, M. and Sedgewick, R. (1985). Techniques for algo-
rithm animation. IEEE Software, 2:28–39.
Brown, M. H. (1988). Algorithm Animation. MIT Press.
Cormen, T. H., Leiserson, C. E., Rivest, R. L., and Stein, C.
(2001). Introduction to Algorithms, 2nd edition. The
MIT Press, Cambridge, Massachusetts, and McGraw
Hill, Boston.
DD1. A demo in en.wikipedia.org/wiki/dijkstra’s algorithm.
DD11. jhave.org/algorithms/graphs/dijkstra/dijkstra.shtml.
DD2. www.cs.usfca.edu/ galles/visualization/dijkstra.html.
DD3. people.ok.ubc.ca/ylucet/ds/dijkstra.html.
DD4. www-m9.ma.tum.de/graph-algorithms/spp-
dijkstra/index en.html.
DD5. qiao.github.io/pathfinding.js/visual/.
DD6. pckujawa.github.io/portfolio/net-dijkstra/.
DY1. www.youtube.com/watch?v=pvfj6mxhdmw.
DY10. www.youtube.com/watch?v=kvrwplnioem.
DY11. www.youtube.com/watch?v=cl1bylngb5q.
DY12. www.youtube.com/watch?v= lhsawdgxpi.
DY13. www.youtube.com/watch?v=wt5cqvfdyxg.
DY14. www.youtube.com/watch?v=0nvyi3o161a.
Visualization of Abstract Algorithmic Ideas
503