What is Draw3D?
Draw3D is a 3D drawing package in Java. It gives you three axes and
the ability to draw all kinds of shapes, lines, and such. There are
two modes of using it:
Where do I get it and how do I install?
With the advent of Java-11, this has become a bit more complicated.
See below.
What documentation is available?
You can browse
What do I need to know for linear algebra?
The linear algebra examples in the modules are fully self-contained.
All you need is to get the jar file into your CLASSPATH. Thus, you
don't need to read the help file above, nor do you need the documentation.
They are here for other projects and courses. (This is the only
public webpage for Draw3D.)
Who is Bill Edison?
Bill is a former PhD student of mine, with a long and successful
career in software in the DC area, and with many different
intellectual interests including the intersection of math and
computer science. When I lamented the lack of a
solid and yet simple 3D package for Java-based courses, he
very graciously volunteered hours and hours of his time to develop
Draw3D.
Note: the instructions below are for Mac/Linux (you'll need to
modify for Windows)
Thus, there is a lib folder that will have a bunch of
jar files. You'll need to add this folder to CLASSPATH.
/Users/alice/Desktop/draw3d/javafx-sdk-11.0.2/lib
then you would add that to your CLASSPATH. For example, on Mac,
you would edit your .profile (older macs using bash)
or .zshrc (newer macs using z-shell) and add
export CLASSPATH=$CLASSPATH:/Users/alice/Desktop/draw3d/javafx-sdk-11.0.2/lib
NOTE: on Windows, you refer to an environment variable by surrounding
the variable with %, as in:
%CLASSPATH%C:\Users\alice\Desktop\draw3d\javafx-sdk-11.0.2\lib
Most often, you simply list all the paths separated by semicolons
(without the %CLASSPATH% part)
export PATH_TO_FX=/Users/alice/Desktop/draw3d/javafx-sdk-11.0.2/lib
For mac users, this needs to be in your
.profile (older macs using bash)
or .zshrc (newer macs using z-shell). Windows users
add environment variables with a GUI.
NOTE:
You might need the --module-path additional parameters
to javac as shown below for java.
java --module-path $PATH_TO_FX TestDraw3D
Or if that did not work
java --module-path $PATH_TO_FX --add-modules javafx.controls TestDraw3D
For compilation:
javac --module-path $PATH_TO_FX --add-modules javafx.controls TestDraw3D.java
javac --module-path %PATH_TO_FX% --add-modules javafx.controls TestDraw3D.java
and
java --module-path %PATH_TO_FX% --add-modules javafx.controls TestDraw3D
Some students have reported that they need to type
java -cp .\ --module-path %PATH_TO_FX% --add-modules javafx.controls TestDraw3D