Hi,

There are 2 problems with your code:
1. The value for pts[4] is the same as for pts[6]. On the other side,
you
forgot the point (-1.0f, 1.0f, 1.0f). So, you will have to define pts[4]
as

pts[4] = new Point3f(-1.0f, 1.0f, 1.0f);

2. If you make this correction and run the program, you will only see a
white window.
This is because the cube is too big. You can either scale the cube or
move the view-point
away from it.

There would be one suggestion to make here:
  Do not instantiate the SimpleUniverse more than once per application
because with any
  instance of SimpleUniverse a new Frame-object is created by Java3D.

I've attached a corrected version of your class.

Regards,
Octavian Nasarimba

> "J�rgen Vansteelant" wrote:
>
> Hi,
>
> I have written a small program that renders a cube, but this is what I
> get:
>
>
>
>
> What would be my problem? If anyone could give me a hint!
>
> Thanx!
>


--
_____________________________________________________
Octavian Nasarimba         Tel. +49 711 / 96 72-113
KLEIN+STEKL GmbH           Fax  +49 711 / 96 72-1 30
Heusteigstrasse 41         http://www.klst.com
70180 Stuttgart/GERMANY    mailto:[EMAIL PROTECTED]
Amtsgericht Kirchheim/Teck HRB 180

Attachment: CubeTest.java
Description: application/unknown-content-type-javafile

Reply via email to