Sites

BingoDisk
Bookmarks
Complexity Digest
FRIAM
Joyent
NetLogo
RedfishGroup
RedfishTags
RePast
Santa Fe Institute
The Complex

Web Design

A List Apart
CSS and Standards
Eric Costello
Eric Meyer
Jeffrey Zeldman
TextBook
Textpattern
Textpattern Forum
WordPress

Math on the Web · 2008-07-20

One of my favorite challenges to my friends is “Send me an equation”. It sounds like a dumb thing, but after a bit of thought, you’ll agree that

Math Is A Second Class Citizen On The Web!

The Math Typesetting for the Internet page has a good discussion on the issues.

So what to do?! MathML? HTML/CSS? ASCII stunts? Equation Editors? LaTeX Tools? JavaScript?

The fact is that it’s not at all easy to make a choice. So here’s the road I took:

  1. Notation: I decided on TeX notation. It’s the standard and I decided I’d be ignorant not knowing it!
  2. Tools: LaTeXiT, TextMate and similar tools are good at equation creation, producing images/pdf helping visualize/debug the LaTeX source.
  3. Plugins: I decided to not use plugins: I’d need a different one for each blog, wiki, forum and so on. They also often require root access.
  4. Images: I similarly decided not to use static images: they are inflexible and hard to manage, and also loose the basic TeX source.
  5. LaTeX2HTML: I did not want to use LaTeX2HTML (or similar) because my blog (and wiki and forum) all have their own markdown language that I did not want to “escape” by inserting raw HTML.
  6. LaTeX Source: I wanted to retain the LaTeX source in the HTML so that in the future I might use the equation in a different tool.

This led fairly quickly to a very nifty solution: CodeCogs has created a LaTeX Equation Editor and a web service for rendering the results! Sixth Form Mathematics & Law blogs on using the CodeCogs facility for dynamic images created by a server.

The idea is quite elegant: send a LaTeX equation in a URL to a server which converts it, dynamically, to a tiny image. The LaTeX segment below is rendered into the equation following it.

\int_{-\infty}^{\infty}e^{-x^{2}}dx=\sqrt{\pi}

Click on the LaTeX code above to see the CodeCogs URL used and the result of its use as a stand-alone image.

Here’s the Textile markdown used in this article:

!http://www.codecogs.com/eq.latex?
\int_{-\infty}^{\infty}e^{-x^{2}}dx=\sqrt{\pi}!

The following can be used instead and allows blanks in the LaTeX source:

== <img src=
http://www.codecogs.com/eq.latex?
\int_{-\infty}^{\infty}e^{-x^{2}}dx=\sqrt{\pi}
/> ==

Note that the line breaks after the “?” in the above URLs are used to fit on the page, they do not occur in the HTML/Textile source.

Comment


Processing: .. with Jython · 2006-10-29

Last article showed how we could use Processing with Eclipse and Java 1.5. Heady with success, I decided to try to convert the near-trivial RandBoxes Processing demo to Jython.

Why?? Well, our group uses Blender quite a bit, and Blender uses Python as its scripting language. More generally, Python is quite popular within our scientific community.

Jython, a Python implementation using the JVM, has been surprisingly successful, having most of what we like about CPython. And its Java integration made it a natural for Processing. This presentation is a good overview.

read more..


Processing: .. with Eclipse · 2006-10-17

We at Redfish have been using Processing.org’s graphics system for models requiring fairly sophisticated 3D capabilities. Here’s an example prototype of the Pittsburgh PNC Baseball Stadium done with Processing. (Note: Our Redfish site has more information on the project page.

Processing is more than a graphics library, it has a delightful IDE which makes Java much easier, especially for the Java novice. The IDE has great tools such as a web-page builder with the project as an applet. It also can build an application version for Mac, Windows and Linux.

One difficulty we faced however, was that we wanted to commit to fairly complicated models that would benefit from Java 1.5 (Processing uses an earlier version) and an IDE familiar to Java programmers. We also are interested in interfacing Java to other languages such as Groovy, Python/Jython, Ruby/JRuby, and even JavaScript/Rhino.

So I decided to experiment with Processing, using Eclipse and Java 1.5. To do this, I made two models: RandBoxes, which is really simple .. just showing 1000 boxes and randomly jiggling them each step. The second model, RoadGrid, is more complicated: it draws a rectangular road grid and has “cars” (rectangles) moving along the roads. At each intersection, the cars randomly chose a new road segment.

read more..


MOTH: My way Or The Highway · 2005-08-19

Last year, Nick Thompson, Professor of Psychology and Ethology of Clark University, dropped by Santa Fe on Sabbatical. Nick brought with him a puzzle relating to the Prisoner's Dilemma.

The core idea of the Prisoner's Dilemma is a game where two folks choose to cooperate or not (defect). The scoring is such that if you cooperate and your opponent defects, you (the "sucker") get quite a low score. If you both cooperate, however, you get a reasonable score but not as high as a defector gets against a cooperator. This classic in game theory poses the paradox that your best move is to defect, even though if you both defect, you both get a very poor score. Grim.

Robert Axelrod was puzzled by this, and suggested that if the game were repeated (iterated), the best outcome would could vary according to the strategy of the players. This resulted in his now famous computer tournament pairing strategies against one another. The sweet result was that a firm but friendly strategy, Tit for Tat, which cooperated initially, then simply repeated the opponent's previous move from then on, was the overall winner.

Nick, looking at this, thought that it'd be nuts to stay in a series of Prisoner's Dilemma games if the opponent was clearly no fun to work with. Thus he introduced the idea of leaving the tournament. MOTH, My way Or The Highway, builds a new suite of strategies which have the additional capability of leaving an unpleasant encounter. This creates a pool of strategies without partners, so they are re-paired randomly, and the tournament continues.

The result is that Nick, along with several of our local Friam group here in Santa Fe, worked on a NetLogo model exploring this new approach. This model expanded upon and validated earlier work done by Nick and his colleagues David Joyce and John Kennison. This resulted in a paper delivered to the Lake Arrowhead Conference on Human Complex Systems.

The NetLogo Model we created is viewable by you, gentle reader. The explanation provided with the model presents considerable detail about the ideas behind the Moth strategy.

Not surprisingly, a quite successful strategy is a variation of Tit for Tat: play Tit for Tat and on the first defection by your opponent, leave the tournament to be paired with a (hopefully!) more cooperative player!

Comment


Open Source Research · 2004-11-23

A friend of mine, Michelle Aden, recently asked me to write about some aspect of Open Source for a conference on that topic. It occurred to me that research had recently enjoyed becoming part of the Open Source community, so I looked into writing about that.

Here is the resulting paper. It's also available in PDF and Word format.

I should note that considerable editorial help came from Sherrie Bolin, making it a much cleaner read!

Comment [1]


Older »