1

I'm working on a project for school and I've got some 3D vector data as well as surface plots. These are saved in .dat files outputted from a c++ program.

I'm able to plot these files in gnuplot as wanted, but I'd really like to make .u3d files so I can include them in a TeX document (using the movie15package).

How do I create u3d files? (I'm working on mac).

celavek
  • 5,575
  • 6
  • 41
  • 69
romeovs
  • 5,785
  • 9
  • 43
  • 74

3 Answers3

2

Here is a library on Sourceforge for working with the u3d format. This just came up on a quick search, never tried it so I cannot provide more detailed info.

celavek
  • 5,575
  • 6
  • 41
  • 69
1

You may use MeshLab, as it can import common 3D file formats, and exports U3D files.

From the main page:

  • imports: PLY, STL, OFF, OBJ, 3DS, COLLADA, PTX, V3D, PTS, APTS, XYZ, GTS, TRI, ASC, X3D, X3DV, VRML, ALN.
  • exports: PLY, STL, OFF, OBJ, 3DS, COLLADA, VRML, DXF, GTS, U3D, IDTF, X3D

Since that software can be used from command line to process files, the idea would be to generate a file using one of the formats it imports (for example, a X3D or PLY, both can be used to represent vector data and point sets) and let Meshlab convert it to U3D trough the command line.

Gabriel Cuvillier
  • 3,617
  • 1
  • 28
  • 35
  • the problem is I only have a .dat file, which lists the points in XYZ coordinates. I don't know any of these formats. – romeovs Apr 16 '11 at 13:11
  • If you only have points, the conversion of your .dat file to a .PLY file would then be trivial since that ASCII format was principally designed to store three dimensional data from 3D scanners. Have a look at http://en.wikipedia.org/wiki/PLY_%28file_format%29. As a side note, Meshlab supports quite well the "Points cloud" data type imported from .PLY files. – Gabriel Cuvillier Apr 16 '11 at 13:23
0

Wikipedia cites several applications can create .u3d files. Here are the specifications for all four versions of the u3d file format.

FreeAsInBeer
  • 12,937
  • 5
  • 50
  • 82