The software used to generate magic squares and hyper cubes is written in
JAVA.
JAVA defines two types of programs: applications and applets. Programs
that operate inside a web browser are known as applets. Programs that
operate in a java virtual machine (JVM) are known as applications. A JVM
is a software program that controls the execution of JAVA applications.
This website supports both applets and applications. However, you must
download the JAVA runtime environment (JRE) to use either. The JRE for
Windows 95, Windows 98, and NT 4.0 (or higher) is available at http://java.sun.com/products/jdk/1.2/jre
***************************
There is one more option for generating Magic Squares and Hyper Cubes.
That is to download the java development kit (JDK). This is a large file,
but it will allow you to write your own JAVA programs, and modify the source
code for the Magic Squares and Hyper Cubes program. You can download the
JDK from http://java.sun.com/products/jdk/1.2/
If you have downloaded the JDK, you can generate magic squares and hypercubes by downloading the
generator software
from this site:
- Download the file magic.jar
- Extract 9 "class" files. (by executing "jar xvf
magic.jar").
- Run the generator (by executing "java HyperMagic01")
Alternatively, you can download and compile the JAVA source
code for the application,
or the source code for the applet.
The following are instructions for the application:
- Compile the source code (by executing "javac
HyperMagic01.java")
- Run the generator (by executing "java HyperMagic01")
If you would like to run or modify the applet, duplicate the HTML code on
the "generator.htm" page from this web.
When executing the commands above, don't use the quotation marks and pay
attention to upper and lower case letters. If you have problems, let me
know at Charlie.Kelly@broadband-inc.com.
Required Inputs
 | Dimensions: An ordinary magic square has 2 dimensions. A magic cube has
three dimensions. Magic hyper-cubes have 4 or more dimensions. |
 | Row Size: The number of cells in each row of the hyper-cube. 3 is the
row size for an ordinary magic square in the form of a "tic-tac-toe" that has
three rows and three columns. Row Size should be an odd number. If you
use an even number, the program will increase your value by 1. |
 | Offset: The default offset is calculated so that the "middle
cell" will be zero, and the sum for each row, column, and principal
diagonal will also be zero. To generate a "standard" magic
square, select the "custom" button and set the offset to 1. |
 | Generator Button: After you input the number of dimensions, click
the "Make Magic" button to generate your magic hyper-cube. |