Scripted thumbnail generation: security perspective

Money gone!
While searching for something on the net, I came across some scripts that generate image thumbnail on the fly.

For example: http://tech.mikelopez.info/2006/03/02/php-image-resize-script/.

While using such scripts we should be aware of the security point of view: your site can easily become a proxy for other people or websites. Continue reading “Scripted thumbnail generation: security perspective”

Share

The Spirograph

I became a kid again and purchased a Spirograph set. The Spirograph is a mathematical toy, which you can use for drawing nice figures. In the simplest case it exists of a fixed circle, used as a template, and a smaller rolling circle with holes. The result of my experiment is at the end of this post.
Thereafter, I turned my attention to mathematical generation of the Spirograph figures, and to my surprise I was able to find a number of good resources on the net.
The parametric equations for a Spirograph are:
x(t)=(R+r)cos(t) + p*cos((R+r)t/r)
y(t)=(R+r)sin(t) + p*sin((R+r)t/r)

More explanation here:
http://www.mathematische-basteleien.de/spirographs.htm

A digital spirograph can be created using, for example, the following equations:
(5-1.02)*cos(1.02*x/5)+2*cos((5-1.02/5)*x)
(5-1.02)*sin(1.02*x/5)+2*sin((5-1.02/5)*x)
with HSB Grapher.

An applet, and some data to play with it can be found here.
However, what I found more useful and interesting is this page: http://linuxgazette.net/133/luana.html. It provides a Spirograph compiler (an awk script). This awk script takes a Spirograph specification and generates a gnuplot script to create the Spirograph. Go try it – its very interesting. If you are on windows, read these to help you get started on awk and gnuplot.

Spirograph
Spirograph

Share