2.1    WebAssembly


WebAssembly (abbreviated Wasm) is a safe, portable, low-level code format designed for efficient execution and compact representation. Its main goal is to enable high performance applications on the Web, but it does not make any Web-specific assumptions or provide Web-specific features, so it can be employed in other environments as well. WebAssembly is an open standard developed by a W3C Community Group [ Ros2023 ].

The code generator of JaSIL (Section 2.9) has been improved to generate C/C++ code, which is then translated to WebAssembly with the help of Emscripten. With the following examples it is possible to compare the performance of Javascript and WebAssembly: preschern.org, dragon model, CSG example, Voronoi diagram on the sphere, WebGL-Demo, MaterialX-Demo, BMW-M6 (the BMW example does use a simple mark and sweep garbage collector).

2.2    MaterialX with WebGL


MaterialX is an open standard for representing rich material and look-development content in computer graphics, enabling its platform-independent description and exchange across applications and renderers. The support of the OpenGL ES Shading Language (GLSL Version 3.00 ES) enabled the integration of MaterialX in the Java-WebGL interface (Section 2.3).

The following links MaterialX-Demo and BMW-M6 show examples with MaterialX. This demos take some time to load and require a browser which does support the ,,Compression Stream API'' (in Firefox since version 113).

2.3    Java interface for WebGL


JaSIL (Section 2.9) has been used to implement a WebGL [ WebGL10, WebGL20 ] interface with Java. It has been used to build a viewer for 3D models stored with Universal 3D (see Section 2.6). The following links can be used to open the U3D viewer with the dragon model, the CSG example or the Voronoi diagram on the sphere.

The mouse wheel is used for zooming in the U3D viewer and dragging with the mouse does rotate the camera. A Phong shader is used to simulate light.

2.4    Content Management with LaTeX


The content of preschern.org is described with LaTeX [ Knu86, Lam94 ] and can be translated to different formats. In this way it is possible to create documents with a table of contents, a list of references, citations and more the like, with tools used for further processing. It is in example possible to create a PDF document and to embed 3D models with the help of the Universal 3D interface, described in Section 2.6.

A compiler, written with Java, does translate the LaTeX subset, used for the description of the content, including some special LaTeX macros (called "hints"), to XML. This XML description is then translated to DHTML, with the help of XML layout descriptions (so called "parts"). Via these layout descriptions, the content is connected to JavaScript, which has been created with JaSIL (Section 2.9) from Java.

Download preschern.org as PDF document: .

2.5    Solid Modeling with Implicit Surfaces


A signed distance field function assigns to every point |x,y,z| element of R 3 a distance with a positive sign for points outside the region enclosed by the represented surface, the value 0 for points on the surface and a negative sign for points inside the surface. Operations like point location or boolean operations for solid modeling (Constructive Solid Geometry [CSG]) can be implemented quite efficiently with such functions.

Dual Contouring [ JLSW02 ] has been used for the feature preserving extraction (polygonization) of surfaces. The following WebGL link shows a 3D model created with implicit functions and extracted with Dual Contouring: .

2.6    Universal 3D Interface


Visualization includes the notion of pluralism and perspectivism since there is an explicit attempt at representing one, often textual (i.e. mathematical), description in terms of a graphical one [ Fis03 ].

The standard ECMA-363 Universal 3D File Format (U3D) [ Ecma363 ] defines the structures for storing 3D models. An interface, implemented with Java, does support a subset of U3D for reading and storing 3D scenes, created with the graphics library described in Section 2.15.

With the help of the LaTeX "movie15" package multimedia content, like movies, sound and objects described with U3D, can be embedded in PDF documents, according to the Adobe PDF specification version 1.6. With appropriate software, i.e. the Acrobat Reader version ≥ 8, such objects are displayed in 3D. This enables a high quality representation of textual and graphical content.

2.7    3D Reconstruction with Implicit Surfaces


A surface can be described with an implicit function of the form f(x, y, z) = f(p) = 0. A point p is on the implicit surface if the result is zero when the point is inserted into the implicit function f.

A simple example is the unit sphere, which has f(x, y, z) = x 2 + y 2 + z 2 - 1 as its implicit function. Blending of implicit surfaces can be used for the reconstruction of surfaces from unoriented point sets. The basic idea is to blend simple primitives, such as spheres. Each sphere can be seen as an ''atom'', and a ''molecule'' is obtained by blending its atoms.

The following WebGL link shows a 3D model of two blended spheres: .

More in Section 3.1 ...

2.8    2D und 3D Delaunay Triangulation


The Delaunay triangulation and the Voronoi diagram are dual structures and contain the same information in different form. They record everything about proximity of a set of objects in space.

These structures are used in applications for nearest neighbor queries, triangulations with maximized smallest angles, largest empty circles, minimum spanning trees or traveling salesperson paths.

More in Section 3.2 ...

2.9    JavaScript Image Linker


JaSIL is a compiler/linker which does translate Java classes to JavaScript and creates a optimized program, which can be executed in current web browsers. The JDK currently used is Apache Harmony. Furthermore a number of Java packages have been developed to create GUIs in web browsers and to support WebGL. Support for preemtive Java threads is available also, but optional. JaSIL does create a compact optimized JavaScript program which contains the necessary parts only. For memory management the system does use the garbage collector of JavaScript.

More in Section 3.3 ...

2.10    WEB-Dock


The WEB-Dock provides fast and direct access to important and/or frequently used web resources. Compared to similar solutions, like the task list (Task-Dock) of the 3D Desktops (Section 2.13) or Apple's Dock, the efficient image-based rendering approach makes it possible to use the WEB-Dock with current web browsers. The scaling of the icons, which can be used to increase the icon density, and drag & drop are realized with fast image switching, like in an animated cartoon. Stopping the cursor over one, in this way selected, icon shows a short tool tip (hover help).

2.11    JaRT - a Java Ray Tracer


JaRT is a ray tracer developed with Java, which is used to create GUI elements with 3D effects for web pages, like round corner boxes or frames with round edges. JaRT does support CSG operations for primitives like planes, boxes, spheres, cylinders, cones and for triangle meshes, including 3D text. Objects can be textured with planar, spherical and cylindrical texture projections. The ray tracer does use Phong/Blinn lightning equations with reflections and shadows. Image quality can be improved with supersampling.

2.12    3D Desktop Browser


The structure and the elements of the 3D Desktop (Section 2.13) can be described with XML. The desktop browser creates a 3D view from the XML description. Callbacks (i.e. for menus) can be written with JavaScript. The Document Object Model (DOM) of the desktop does provide an interface for accessing desktop elements.

2.13    3D Desktop


Based on the real-time rendering library, described in Section 2.15, a number of software components for a 3D desktop have been developed. The desktop components implement Swing drag and drop interfaces and context menus. Components which support circle lists, spiral lists and a 3D task list (Task Dock) to show activated functions, are available. The abstract list models are derived from the corresponding Swing models. A 3D folder instance provides a space for placing 3D objects around a center.

Screenshots in Section 3.4 ...

2.14    Generating 3D Icons in Real-Time


The real-time rendering library, described in Section 2.15, greatly improves the performance of the 3D icon generation. A complex model, which requires several hours of processing with the ray tracer is now transformed within minutes into an image with responsive 3D elements. To improve the image quality supersampling is used for antialiasing.

To integrate 3D models and web content, layouts are defined in XML. From these descriptions HTML and JavaScript is generated with functions for camera movements and animations.

2.15    Real-Time Rendering


Based on JOGL, a Java/OpenGL [ AGo96, SAk10 ] interface, a real-time rendering library has been implemented. The components support reflections and shadows. Shaders have been developed with the OpenGL Shading Language (GLSL) [ Kes10 ]. A simple text system is used to translate text dynamically into 2D textures. The picking of objects is accelerated by the graphics hardware. It is possible to build 3D models with constructive solid geometry (CSG) operations from primitives. Furthermore with Blender created 3D objects can be used.

2.16    Generating 3D Icons with Ray Tracing


Some tools have been developed for generating images of 3D models with responsive areas (3D icons) which can be used in web designs. Such 3D elements are defined with the Java programming language and the ray tracer POV-Ray is used for rendering. Sensitive areas are defined by assigning "sensors" to 3D objects for which corresponding HTML code is generated automatically. Special panorama camera abstractions are used to create wide angle views without distortions.

An example generated with POV-Ray.

2.17    Modula-3 for OS/2 and MS-DOS


The Modula-3 system (compiler, runtime and library), which has been developed by Digital's Systems Research Center ( DEC-SRC), has been ported to OS/2 (Warp and Merlin) and MS-DOS. Carsten Whimster has published an article about the Modula-3 for OS/2 project in the Electronic Development Magazine, OS/2 edition (EDM/2).

2.18    Modula-2 to C Translator


The Modula-2 to C translator developed during this project is able to translate itself to C. The very portable translator is available for MS-DOS, UNIX and VMS.
  • An introduction to parsing in German .
  • A comprehensive project report in German .
  • More information about Modula-2 and some references [ BPR86, Wir85 ].