#!/usr/bin/perl -T #This program allows users to render SVG renditions of L-systems. #It produces either an HTML interface to allow the user to set #the axiom, rules, and parameters of the L-system or renders #the corresponding SVG, depending on the user agent's request. # #This code is at a pre-alpha stage of development. # #David Faden #dfaden@cs.iastate.edu #March 11, 2004 # #This code is released under the Creative Commons Attribution 1.0 #license: http://creativecommons.org/licenses/by/1.0/ #use warnings; #use strict; use CGI; $CGI::POST_MAX = 2048; $CGI::DISABLE_UPLOADS = 1; my $pi = 3.1415926535897931; my $max_number_of_segments = 2000; my $max_expansion_length = 10000; my $cgi = new CGI; if ($cgi->param('svg')) { print_svg(); } else { print_html(); } sub print_html { print $cgi->header('text/html'); print $cgi->start_html('Render L-system'), $cgi->h1('Render L-system'), "