logo
Up  Jvx  Bd  Byu  Obj  Off 

JavaView JVX File Format

An Example with Detailed Comments

This page discusses a sample JVX geometry file in detail. The discussed example can be downloaded as a separate file without comments.

The JavaView JVX file format is an xml format. It was developed for storing geometric shapes platform and application independent, and with a special emphasis on the automatic validation of the syntactic and semantic correctness of a JVX file. Below is an example which can also be downloaded and viewed with JavaView. Further examples are contained in the model collection of JavaView, or can be generated with JavaView.

The formal specification of the JVX file format is publicly available. The DTD specification of JVX allows the automatic validation of a JVX file, for example, using the validation service at www.javaview.de/validator/. Every model submitted to EG-Models is automatically validated against the DTD specification.

Example JVX file (without comments) jvxSample.jvx
DTD specification of JVX www.javaview.de/rsrc/jvx.dtd

The tags below are linked to their explanations. So if you want to know about the structure just take a look at the example and if you want to know about the meaning or purpose of some tag just click on it and you will go right to the explanation. Tags without the remark "optional" at the right end of the line are necessary.

<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<!DOCTYPE jvx-model SYSTEM "http://www.javaview.de/rsrc/jvx.dtd">
<jvx-model>
   <meta generator="JavaView v.2.00" />                  - optional -
   <meta date="Thu Jan 18 00:10:21 GMT+01:00 2001" />    - optional -
   <version type="final">2.00</version>                  - optional -
   <title>deLoreon Surface</title>
   <authors>                                             - optional -
      <author>
         <firstname>Emmett</firstname>
         <lastname>Brown</lastname>
         <affiliation>
            <organization>Time Travel Labs</organization>
            <address>
               <line>parking lot</line>
               <line>12345 Twin Pines Mall</line>        - optional -
                         - here may follow additional address lines -
            </address>
         </affiliation>
         <email>Brown@TimeTravelLabs.org</email>
         <url>http://www.TimeTravelLabs.org/</url>       - optional -
      </author>
                           - here may follow additional author tags -
   </authors>
   <description>                                         - optional -
      <abstract>Very difficult 2.5 dimensional surface.</abstract>
      <detail>                                           - optional -
         This surface was evolved while working on the
         verification of the concept of a flux capacitor
         and it was necessary to increase the energy to
         exactly 1.21 giga watts of electricity.
      </detail>
      <keywords>                                         - optional -
         <keyword>flux capacitor</keyword>
         <keyword>deLoreon</keyword>                     - optional -
         <keyword>plutonium</keyword>                    - optional -
                              - here may follow additional keywords -
      </keywords>
      <msc2000>                                          - optional -
         <primary>83E99</primary>
         <secondary>86A15</secondary>                    - optional -
                        - here may follow additional secondary tags -
      </msc2000>
      <software>Geometry Creator 3.14</software>         - optional -
   </description>
               - There are several possible forms for geometries:   -
               -  * point set + vector fields + material            -
               -  * point set + line set + vector fields + material -
               -  * point set + face set + vector fields + material -
   <geometries>
      <geometry name="flux">        - pointSet+vectorField+material -
         <pointSet dim="3" point="show" color="show">
            <points>                                     - optional -
               <p>-0.7 0.  1.4</p>                       - optional -
               <p>-0.4 0.  0.7</p>                       - optional -
               <p>-0.1 0.  0. </p>                       - optional -
               <p>-0.1 0. -0.7</p>                       - optional -
               <p>-0.1 0. -1.4</p>                       - optional -
               <p> 0.1 0. -1.4</p>                       - optional -
               <p> 0.1 0. -0.7</p>                       - optional -
               <p> 0.1 0.  0. </p>                       - optional -
               <p> 0.4 0.  0.7</p>                       - optional -
               <p> 0.7 0.  1.4</p>                       - optional -
                                - here may follow additional p tags -
               <thickness>5</thickness>                  - optional -
            </points>
            <colors>                                     - optional -
               <c>255   0   0</c>                        - optional -
               <c>255 127   0</c>                        - optional -
               <c>255 255   0</c>                        - optional -
               <c>127 255   0</c>                        - optional -
               <c>  0 255   0</c>                        - optional -
               <c>  0 255   0</c>                        - optional -
               <c>  0 255 127</c>                        - optional -
               <c>  0 255 255</c>                        - optional -
               <c>127 255 255</c>                        - optional -
               <c>255 255 255</c>                        - optional -
            </colors>
                                    - here may follow a normals tag -
                                   - here may follow a textures tag -
         </pointSet>
         <vectorField name="forward flux" arrow="show" base="vertex">
            <vectors>
               <v>0.08 0. -0.18</v>                      - optional -
               <v>0.08 0. -0.18</v>                      - optional -
               <v>0.   0. -0.2 </v>                      - optional -
               <v>0.   0. -0.2 </v>                      - optional -
               <v>0.2  0.  0.  </v>                      - optional -
               <v>0.   0.  0.2 </v>                      - optional -
               <v>0.   0.  0.2 </v>                      - optional -
               <v>0.08 0.  0.18</v>                      - optional -
               <v>0.08 0.  0.18</v>                      - optional -
               <v>0.08 0.  0.18</v>                      - optional -
               <color>255 255 0</color>                  - optional -
            </vectors>
         </vectorField>
         <vectorField>                                   - optional -
            <vectors>
               <v>-0.08 0.  0.18</v>                     - optional -
               <v>-0.08 0.  0.18</v>                     - optional -
               <v>-0.08 0.  0.18</v>                     - optional -
               <v> 0.   0.  0.2 </v>                     - optional -
               <v> 0.   0.  0.2 </v>                     - optional -
               <v>-0.2  0.  0.  </v>                     - optional -
               <v> 0.   0. -0.2 </v>                     - optional -
               <v> 0.   0. -0.2 </v>                     - optional -
               <v>-0.08 0. -0.18</v>                     - optional -
               <v>-0.08 0. -0.18</v>                     - optional -
               <color>255 0 255</color>                  - optional -
            </vectors>
         </vectorField>
                      - here may follow additional vectorField tags -
      </geometry>
                             - following geometry tags are optional -
      <geometry name="case">- pointSet+lineSet+vectorField+material -
         <pointSet dim="3" point="hide">
            <points>                                     - optional -
               <p>-0.8 -.2 -2.</p>                       - optional -
               <p> 0.8 -.2 -2.</p>                       - optional -
               <p> 0.8  .2 -2.</p>                       - optional -
               <p>-0.8  .2 -2.</p>                       - optional -
               <p>-1.  -.2  2.</p>                       - optional -
               <p> 1.  -.2  2.</p>                       - optional -
               <p> 1.   .2  2.</p>                       - optional -
               <p>-1.   .2  2.</p>                       - optional -
                                - here may follow additional p tags -
            </points>
         </pointSet>
         <lineSet line="show">
            <lines>
               <l>0 1</l>                                - optional -
               <l>1 2</l>                                - optional -
               <l>2 3</l>                                - optional -
               <l>3 0</l>                                - optional -
               <l>0 4</l>                                - optional -
               <l>1 5</l>                                - optional -
               <l>2 6</l>                                - optional -
               <l>3 7</l>                                - optional -
               <l>4 5</l>                                - optional -
               <l>5 6</l>                                - optional -
               <l>6 7</l>                                - optional -
               <l>7 4</l>                                - optional -
                                - here may follow additional l tags -
               <color>255 255 0</color>                  - optional -
            </lines>
         </lineSet>
                            - here may follow some vectorField tags -
      </geometry>
                            - pointSet+faceSet+vectorField+material -
      <geometry name="backplate">
         <pointSet dim="3" point="hide">
            <points>                                     - optional -
               <p>-1.5 1.0 -2.5</p>                      - optional -
               <p> 1.5 1.0 -2.5</p>                      - optional -
               <p> 1.5 1.2 -2.5</p>                      - optional -
               <p>-1.5 1.2 -2.5</p>                      - optional -
               <p>-1.5 1.0  2.5</p>                      - optional -
               <p> 1.5 1.0  2.5</p>                      - optional -
               <p> 1.5 1.2  2.5</p>                      - optional -
               <p>-1.5 1.2  2.5</p>                      - optional -
                                - here may follow additional p tags -
            </points>
         </pointSet>
         <faceSet face="show" edge="hide">
            <faces>
               <f>3 2 1 0</f>                            - optional -
               <f>4 5 6 7</f>                            - optional -
               <f>0 1 5 4</f>                            - optional -
               <f>2 3 7 6</f>                            - optional -
               <f>0 4 7 3</f>                            - optional -
               <f>1 2 6 5</f>                            - optional -
                                - here may follow additional f tags -
               <color>63 63 255</color>
            </faces>
         </faceSet>
      </geometry>
                         - here may follow additional geometry tags -
   </geometries>
</jvx-model>
© 1997-2017 Last modified: 22.06.2017 --- www.javaview.de --- The JavaView Project