Visualization of Blocks World(System Perspective)
Command Line Version:
The command line version of the tool is a perl script "to-vrml.pl". This
script takes the output of the blocks program which is obtained by executing
the script command. The name of this file should be typescript. The perl
script reads each line from this file and identifies the various objects
(blocks) and then generates the VRML world accordingly. The VRML code is
generated in a file named "temp.wrl". The user can thus view the world
by opening the file "temp.wrl" through a web browser which has the cosmo
player plugin.
Web-based Version:
The web-based version of this tool also uses the same logic to generate
the world. In this version of the tool, the user can submit his output
of the blocks program through a HTML form. The HTML form contains three
different fields that the user has to enter. The first field is the name
field where the user enters his name. The second field is a comment field
where the user can enter any comment relevant to the program. The third
field is a file upload field where the user enters the full path of the
file to be uploaded. After pressing the submit button, all the data is
passed to the cgi script which saves the uploaded file. This saved uploaded
file is used for processing. After the processing is done, the VRML code
is generated and written to a file "temp.wrl". The user can view the VRML
world by clicking the "View_VRML" button in the second form.