此为 Mathematica 7 文档,内容基于更早版本的 Wolfram 语言
查看最新文档(版本11.2)
Import/Export 导入/导出 格式

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.
  • 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.
  • 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 expri as specifying the corresponding elemi.
  • 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.
"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 "VertexData" 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 "VertexData"
  • Import and Export by default use "Graphics3D" for the JVX files containing 3D geometries, and "Graphics" 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
BackgroundAutomaticwhat background color to use
ImageSizeAutomaticoverall size of the graphics to display
LightingAutomaticwhat simulated lighting to use in coloring 3D surfaces
  • All options of Graphics3D can be given when importing from JVX.
"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
"ReadDTD"Falsewhether to validate the file against the DTD format specification
  • Advanced options:
"InvertNormals"Falsewhether 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 "VerticalAxis"->{0, 1, 0}, Mathematica will apply the transformation {x, y, z}->{x, -z, y} to all graphics coordinates when importing from JVX, and the inverse transformation when exporting to JVX.
Import a JVX sample file and render it as 3D graphics:
In[1]:=
Click for copyable input
Out[1]=
 
This imports a JVX file representing 2D vector graphics:
In[1]:=
Click for copyable input
Out[1]=
 
Create a 3D model using SphericalPlot3D, and export it to JVX:
In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=