Hi John,
> I want to show only data points in 3D space. I have used the following
> code to do that:
>
> Irregular3DSet testset = new Irregular3DSet(xyz,testsamples);
>
> DataReferenceImpl points_ref = new DataReferenceImpl("points_ref");
> points_ref.setData((Set)testset);
>
> ConstantMap[] pointsCMap = { new ConstantMap( 1.0f, Display.Red ),
> new ConstantMap( 0.0f, Display.Green ),
> new ConstantMap( 0.0f, Display.Blue ),
> new ConstantMap( 5.50f, Display.PointSize ) };
>
> display.addReference( points_ref, pointsCMap );
>
> However, this method is very slow. Is there another function or better
> method to accomplish this?
Here's a much faster way, if you only want to show points:
RealType index = new RealType("index");
FunctionType fxyz = new FunctionType(index, xyz);
Integer1DSet set = new Integer1DSet(testsamples[0].length);
FlatField field = new FlatField(fxyz, set);
field.setSamples(testsamples);
points_ref.setData(field);
. . .
Since you are only showing points, the considerable time
to compute the Delaunay triangulation topology in the
Irregular3DSet constructor is not necessary.
Good luck,
Bill