Virtual Models

Colors and transparency

Fractal staircase

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

  1. Standard MuPAD colors
  2. Red color, FillColorType=Flat
  3. Red color, FillColorType=Monochrome
  4. White color, FillColorType=Flat
  5. White color, FillColorType=Monochrome
  6. White-blue color, FillColorType=Dichromatic

Rainbow colors

  1. Standard colors, FillColorType=Rainbow
  2. White-red color, FillColorType=Rainbow
  3. Red-white color, FillColorType=Rainbow
  4. Yellow-red color, FillColorType=Rainbow

Functional colors

  1. FillColorType=Functional, function f(x,y,z)
  2. FillColorType=Functional, function f(u,t)

Using colors for background

  1. Scene3d with blue-gray BackgroundColor
  2. Canvas with teal BackgroundColor

Opacity

  1. Standard MuPAD colors, opacity 25%
  2. Standard MuPAD colors, opacity 50%
  3. Standard MuPAD colors, opacity 75%
  4. Standard MuPAD colors, opacity 95%

Random colors and random transparency

  1. Random boxes, with random colors and random opacity
  2. Simplified example with random boxes, with random colors and opacity

 

©2005 Miroslaw Majewski (created in Sep. 2004, last update 30/09/2005)