|
SOLUTIONS
|
MATHEMATICA IMPORT/EXPORT FORMAT
JVX (.jvx)
JavaView 3D geometry format.
Native format of the JavaView visualization software.
Used for the visualization of 2D or 3D geometries.
Can be embedded in web pages and viewed with the JavaView applet.
XML format.
Can store multiple geometries.
Represents 2D or 3D objects as a collection of polygons, lines, and points.
Native format of the JavaView visualization software.
Used for the visualization of 2D or 3D geometries.
Can be embedded in web pages and viewed with the JavaView applet.
XML format.
Can store multiple geometries.
Represents 2D or 3D objects as a collection of polygons, lines, and points.
Import and ExportImport and Export
- Import["file.jvx"] imports a JVX file as a Graphics or Graphics3D object.
- Export["file.jvx", expr] exports a Graphics or Graphics3D object to JVX.
- For JVX files containing 3D objects, Import["file.jvx"] returns an expression of the form Graphics3D[ GraphicsComplex[vertices, polygons, opts]], where vertices are given as a list of coordinates, and the polygons are represented as integer indices taken to be the corresponding vertices.
- 2D objects are imported as an expression of the form Graphics[ GraphicsComplex[...]].
- Import["file.jvx", elem] imports the specified element from a JVX file.
- Import["file.jvx", {elem, suba, subb, ...}] imports a subelement.
- Import["file.jvx", {{elem1, elem2, ...}}] imports multiple elements.
- The import format can be specified with Import["file", "JVX"] or Import["file", {"JVX", elem, ...}].
- Export["file.jvx", expr, elem] creates a JVX file by treating expr as specifying element elem.
- Export["file.jvx", {expr1, expr2, ...}, {elem1, elem2, ...}] treats each
as specifying the corresponding
. - Export["file.jvx", expr, opt1->val1, ...] exports expr with the specified option elements taken to have the specified values.
- Export["file.jvx", {elem1->expr1, elem2->expr2, ...}, "Rules"] uses rules to specify the elements to be exported.
- See the reference pages for full general information on Import and Export.
- ImportString and ExportString support the JVX format.
ElementsElements
- General Import elements:
-
"Elements" list of elements and options available in this file "Rules" full list of rules for each element and option "Options" list of rules for options, properties and settings - Data representation elements:
-
"Graphics" two-dimensional objects in a JVX file represented as Graphics objects "Graphics3D" 3D geometry represented as Graphics3D "GraphicsComplex" list of GraphicsComplex objects, each representing a geometry stored in the file "LineData" lines represented as lists of indices, referencing the vertices as given by the
element"LineObjects" list of Line primitives given in absolute coordinates "PointData" point data in indexed form "PointObjects" list of Point primitives given in absolute coordinates "PolygonData" polygon data in indexed form "PolygonObjects" list of Polygon primitives given in absolute coordinates "VertexColors" colors associated with each vertex, given as a list of color primitives "VertexData" list of vertex coordinates "VertexNormals" normal vectors corresponding to the vertices given by 
- Import and Export by default use
for the JVX files containing 3D geometries, and
for files that represent two-dimensional content. - When rendering a JVX file representing a color model, Import automatically uses the setting Lighting->"Neutral".
- Import elements, specifying meta-information:
-
"CreationDate" time and date when the file was exported "Creator" application that generated the file
OptionsOptions
- General Import options:
-
Background Automatic what background color to use ImageSize Automatic overall size of the graphics to display Lighting Automatic what simulated lighting to use in coloring 3D surfaces - All options of Graphics3D can be given when importing from JVX.
- Meta-information elements, available for Import and Export:
-
"Version" "" optional version information for the file content, given as a string "Keywords" {} keywords associated with the stored objects "ShortSummary" "" brief description of the file content "Summary" "" description of the file content "Title" "Mathematica Graphics" document title - Import option:
-
"ReadDTD" False whether to validate the file against the DTD format specification - Advanced options:
-
"InvertNormals" False whether to invert the orientation of vertex normals "VerticalAxis" {0,0,1} orientation to assume for the coordinate system used in the file - By default, Mathematica assumes that in the coordinate system used by the JVX format the vertical axis corresponds to the third coordinate.
- With the setting
, Mathematica will apply the transformation
to all graphics coordinates when importing from JVX, and the inverse transformation when exporting to JVX.
ExamplesExamplesopen allclose all
Basic Examples (3)Basic Examples (3)
Import a JVX sample file and render it as 3D graphics:
| In[1]:= |
| Out[1]= | ![]() |
This imports a JVX file representing 2D vector graphics:
| In[1]:= |
| Out[1]= | ![]() |
Create a 3D model using SphericalPlot3D, and export it to JVX:
| In[1]:= |
| Out[1]= | ![]() |
| In[2]:= |
| Out[2]= |
New in 6
Mathematica 9 is now available!
New to Mathematica?
Find your learning path »
Have a question?
Ask support »



