logo

Sample Configurations of the Display with Applet Parameters

Applet parameters may be used to configure the JavaView display. The standalone version of JavaView accepts the same parameters as command line arguments.

The following order of increasing priority is applied when configuring the display:

Foreground Image (with Transparent Interior)

A foreground image is painted over the scenery after all other rendering has been performed.

The foreground image must have transparent regions through which the scene and background image is visible.

Here the foreground image has a transparent interior rectangle. The image is resized to fill the whole display area.

<param name="foregroundImage" value="images/jvFrameDefault_sgl.gif">
<param name="foregroundImageFit" value="resize">

<param name="background" value="0 180 150">
<param name="border" value= "hide">< /p>


Background Image (and Color)

A background image is painted before any other rendering has been performed.

Transparent regions of the image will allow the background color of the display to be visible.

Here the background image is resized to fit in the display area by keeping its aspect ratio.

<param name="backgroundImage" value="images/JavaViewLogo.gif">
<param name="backgroundImageFit" value="fit">

<param name="background" value="255 255 0">


Z-Buffer Resolves Intersection Problems

The z-buffer mode <shift-z> resolves a correct visibility of intersecting faces.

In z-buffer mode the JavaView display renders pixels on the screen with a different, slower algorithm than in its default rendering mode. When enabled then PostScript files will contain a raster image.

Z-buffered rendering is automatically switched on when transparent or textured geometries are encountered in a scene.

<param name="zbuffer" value="show">

Depth-Coloring to Resolve Ordering of Overlapping Edges

Depthcueing <shift-d> draws geometry items further away with a fog like color to increase the impression of depth in a scene.

This is a faster rendering technique for depth visibility than the z-buffer mode or the hallow effect.

Switching off depthcueing in this example will completely hide the depth ordering of the edges.

<param name="depthcue" value="show">

Hallow-Effect to Resolve Ordering of Overlapping Edges

The hallow effect <shift-a> shows the bottom edge of two crossing edges interrupted slightly before the crossing. In practice, the effect is obtained by drawing an aura in background color around each edge.

This visualization effect is known from pencil drawing to emphasize the ordering of crossing lines.

The effect is automatically switched off on surfaces whose faces are shown.

Often the effect becomes more striking when enabling smooth rendering <shift-s> too.

<param name="edgeAura" value="show">

Smooth Edges with Anti-Aliasing

Smoothing edges <shift-s> avoids the jaggy artifacts resulting from rasterization of edges.

The process of anti-aliasing reduces the drawing speed quadratic to the image size. When enabled then PostScript files will contain a raster image.

Anti-aliased drawing is often enabled just before saving an image, say, for publication.

<param name="antiAlias" value="show">

Title of Display and Copyright

The copyright statement <shift-r> at the bottom of a display provides information about the current version of JavaView.

The name of a display can be shown as title of the display.

<param name="copyright" value="show">
<param name="title" value="Display with Soccerball">

Coordinate Frame and Bounding Box

The coordinate frame <shift-f> on the lower left side of a display shows the current orientation of the scene. If the camera performs modelling or ambient transformations then the frame switches to the respective coordinate system of the currently selected geometry.

The bounding box <shift-b> encloses all geometry objects of a scene. If the camera is in modelling or ambient transformation mode then the bounding box of the currently selected geometry is shown.

<param name="boundingBox" value="show">
<param name="frame" value="show">

Coordinate Axes

The coordinate axes <shift-x> have a separate inspector <ctrl-x> to adjust the density of ticks and the visibility of labels and other attribute. The axes may either be located at the bounding box, in a corner or centralized at the origin.

An option in the axes inspector enables the creation of grid lines in the xy, yz, or zx plane.

Note, in this 2D example we load a display file to adjust the camera settings.

<param name="axes" value="show">

Camera Direction, Interest and Perspective

The orientation of a camera is determined by several parameters. The <interest> is a point in 3D space towards the camera is directed. The <viewDir> is a 3D (unit-) vector showing the direction of a camera towards its interest. The <upDir> is another 3D (unit-) vector which determines the vertical reference direction of a camera. It is orthogonal to the viewing direction. The actual vertical direction of a camera is changed against the upDir by the angle <roll> measured in [-180,180]. The actual vertical direction of a camera becomes the vertical in a display. The <distance> determines the size of a visible scene, and the <perspective> value determines the perspective distortion.

Note, it is often more convenient to load the camera settings from a display configuration file *.JVD.

<param name="interest" value="1. 1. 0.">
<param name="viewDir" value="0.2 0.6 -0.3">
<param name="upDir" value="0. 0. 1.">
<param name="roll" value="0.">
<param name="distance" value="3.">
<param name="perspective" value="0.5">

Rendering Order of Geometry Items

The display applies several sorting techniques like painter's algorithm or z-buffer to determine which shape are visible and which are hidden by other shapes.

In this example all polygon lies in a 2D plane including some rectangular which cover the full domain. Here the automatic sorting can be switched off and the display renders one polygon after another in the order in which they appear in the geometry.

<param name="sorting" value="hide">

Loading a Display Configuration File

The preferred way to configure the display in an applet is to use a display configuration file *.JVD. These files contain all settings of a display.

Note, display settings specified in a JVD file may be overwritten by applet parameters.

<param name="model" value="doc/models/sampleTorus.jvx">
<param name="displayFile" value="doc/models/sampleTorus.jvd">

Surface with Semi-Transparent Material

Transparency is a material property of a geometry and can be adjusted in its material inspector.

The visibility and intensity of a transparency is stored in a JVX file.

<param name="model" value="models/surfaces/kleinBottleRaw.jvx">

Surface with Transparent Texture

Texture is a material property of a geometry and must be controlled in its material and texture inspector.

The texture information are is stored in a JVX file, including a reference to the texture image which is stored in a separate image file.

The texture of the upper surface is transparent in the interior rectangle.

<param name="antialias" value="show">
<param name="model" value="models/graph/graphWithDomain.jvx">
© 1997-2017 Last modified: 22.06.2017 --- www.javaview.de --- The JavaView Project