Authors
JavaView is software written by Konrad Polthier with contributions of Klaus Hildebrandt, Eike Preuß, Ulrich Reitebuch, and others, see the list of contributors in the About menu of JavaView. Program xvc2jvx was developed by Klaus Drescher. All examples and documents in this web site by Mirek Majewski
Experiments with colors and transparency
In this series of examples we show how color and transparency from MuPAD are transformed to JavaView. In most of examples colors in MuPAD and JavaView are identical. There is one issue that cannot be solved globally and each model should be treated individually. This is transparency of mesh lines. MuPAD, for displaying mesh on surfaces, uses black color with 25% opacity, while the surface elements can be totally opaque. In JavaView opacity of mesh and the surface elements is the same. In order to simulate opacity of mesh the xvc2jvx converter converts MuPAD mesh into gray, [64, 64, 64], lines. This setting works perfectly for most of examples. However, in some specific situations, user should tune mesh lines colors by hand. For example on very dark surfaces the gray color [20,20,20] of mesh might look better. On transparent surfaces color of lines should be always black. JavaView will automatically use for them the same transparency as for the surface elements. Due to different transparency implementation in MuPAD and JavaView, some transparent objects in MuPAD and JavaView may look different. This is in particular related to models with opacity below 30% or opacity above 90%.
Basic examples
- Standard MuPAD colors
- Red color, FillColorType=Flat
- Red color, FillColorType=Monochrome
- White color, FillColorType=Flat
- White color, FillColorType=Monochrome
- White-blue color, FillColorType=Dichromatic
Rainbow colors
- Standard colors, FillColorType=Rainbow
- White-red color, FillColorType=Rainbow
- Red-white color, FillColorType=Rainbow
- Yellow-red color, FillColorType=Rainbow
Functional colors
- FillColorType=Functional, function f(x,y,z)
- FillColorType=Functional, function f(u,t)
Using colors for background
- Scene3d with blue-gray BackgroundColor
- Canvas with teal BackgroundColor
Opacity
- Standard MuPAD colors, opacity 25%
- Standard MuPAD colors, opacity 50%
- Standard MuPAD colors, opacity 75%
- Standard MuPAD colors, opacity 95%
Random colors and random transparency
- Random boxes, with random colors and random opacity
- Simplified example with random boxes, with random colors and opacity
©2005 Miroslaw Majewski (created in Sep. 2004, last update 30/09/2005)