Virtual Models

Lights in MuPAD and JavaView

Fractal Staircase

Parametric surface with spot light

In this example I use three spot lights with red, green and blue color respectively. Although, xvc2jvx converts the spot light from MuPAD into spot light in JavaView, all spot light parameters are not saved into the JVD file. Therefore, the raw JVD file obtained from this conversion does not have some important parameters, like light cone angle, fall off, etc. JavaView will use default values of these parameters. All spot light parameters can be easily changed inside of JavaView.

MuPAD

The original image developed in MuPAD. The spot light in MuPAD is too dark, and spot lights are not intensive enough. I used here intensity of lights equal to 1 and I expected to get much stronger lighting:

SL1 :=plot::SpotLight(
  [0,-2,0], [0,0,0], PI/3, 1, 
  LightColor = RGB::Red
)

JavaView

The same model converted to JavaView without any changes of light parameters obtained from MuPAD.

JavaView

Again the same model with a number of adjustments. I have modified the original spot light as follows:

shading changed to halfsphere,
angle to 25 deg,
corona to 45 deg,
falloff to 10 units, and
highlight on.

All three lights have fixed position in the camera coordinate system.

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