DAVID WEES

Thoughts from a 21st century educator.

php

Request for Animated GIF script

What this script does it allow the user to enter their text into a box, and when they click submit, it sends the information via Ajax to a server side script that processes the information and creates an animated gif from the information. The server side script (written in PHP) then sends back the location of the image, and the client side JavaScript updates the page with the image.

It doesn't have any features really, but it should pretty easy to add some.

Here is the link to the original post



Scrabble cheater

So I've created a script which takes some user input, and lets them search for all of the words in either the TWL06 or SOWPODS dictionary for words which match their input.

Some features:

1. The order that the user enters the letters doesn't matter.
2. The user can specify the exact location of some of the letters in the word
3. The user can use up to two wildcards in the letters (to represent blanks).



Mathematical Equations in Drupal

I'm the maintainer and creator of a filter module for Drupal where users can enter mathematical equations (using MimeTex.cgi created by John Forkosh) and create graphs which are built on the fly (using the JavaScript grapher created by Walter Zorn).

Some examples:

[tex]x^n+y^n=z^n[/tex]

[tex]x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}[/tex]

[graph]sin(x)[/graph]

[graph]1/(x^3+1)[/graph]

[graph xmin="-7" xmax="11" ymin="-10" ymax="20"]x^2+4x[/graph]



Logistic map

My friend was playing around with his TI-84, and he showed me a picture of a classic example of chaos theory at work. So I decided to port his algorithm to PHP and use it to output an image of the example. You can view it here.

Logistic map



LOGO Graphic user interface

Hey folks,

The title of this post is a bit misleading. The GUI isn't actually for LOGO, it's for a LOGO like 'computer language' I'm writing in PHP that takes some very specific instructions written by a user, and converts them into an image. So far there are some minor bugs to work out, but it has 6 commands so far and seems to run relatively quickly.

You can view it here.



Bouncing ball gif

I've created a script, with the assistance of the same PHP class as before (GifMerge.class.php) which allows the user to define some parameters (the initial velocity in both the vertical and horizontal directions, the elasticity of the ball, and the acceleration due to gravity) and watch the consequences on a bouncing ball.

View it here



Animated Gifs

So I discovered today how to create animated gifs using PHP, which means I can create dynamically generated GIFs. I'd let you all play with it, but the files are 200k or so each, and I can't really afford the server space.

However, I can show you an example.

educationalquote.gif



Histograms Online

There's a PHP library called 'Image_Graph' which allows you to create very nice looking graphs fairly easily using PHP functions, and simplifies the job of creating complicated functions. Unfortunately this isn't terribly Web 2.0, so I've created a very basic GUI which allows a user to enter in values and produce a histogram from those values. The plan is to allow more types of graphs to be created, but a histogram seemed like a relatively easy place to start.



Creating Dynamic Charts

So I've been playing with Image_graph, a PEAR extension library for PHP, and I've discovered how to manipulate it into creating dynamic charts that actually have a nice crisp appearance.

The idea is you have an XML file in the background that contains information about the graph, and rather than manipulate the code each time to create a new graph, you manipulate the XML graph, and then produce the graph you want. In fact, you should be able to set up a Cron job to manipulate the graph, and produce dynamic graphs that change based on whatever circumstances you can program.



Twitter Follow me on Twitter

Subscribe Subcribe to my blog