StdDraw3D: Importing StdDraw3D


In this tutorial we will be importing the StdDraw3D class into a new project and making a sphere appear on the screen.

What You Will Need to Start

For this tutorial you will need to have completed the basic setup for a Java3D application, you will need to import all of the libraries that Java3D applications require. If you haven’t done that and don’t know how to do that, click here to find out how.


Now, you’re going to need the source code for the StdDraw class. Click here to get the code. In your IDE create a new class and call it “StdDraw3D”. Delete all of the code in that class and copy the code from the from the link above.

Now create a new class, call this class “Main”.  Create a main method within this class and write these three lines of code within the main method.


Now run the application and you should see a sphere being outputted to the screen.


That is it, as you can see this is a much simpler way of creating quick Java3D applications. I advise you to read through the methods within the StdDraw3D class and maybe render some different shapes to the screen.

In the next tutorial we will look into animation and positioning objects within 3D space.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s