MatlabColorToObj:

Path: AerospaceUtils/CAD

% Convert Matlab color parameters to obj parameters.

 Type MatlabColorToObj for a demo.
--------------------------------------------------------------------------
   Form:
   [Ns, d, illum, Kd, Ks, Ka] = MatlabColorToObj( faceColor, specularStrength,
   specularExponent, diffuseStrength, specularColorReflectance )
--------------------------------------------------------------------------

   ------
   Inputs
   ------
   faceColor                (1,3) Face color
   specularStrength         (1,1) Specular strength
   specularExponent         (1,1) Specular exponent
   diffuseStrength          (1,1) Diffuse exponent
   specularColorReflectance (1,1) Specular color reflectance

   -------
   Outputs
   -------
   Ns                       (1,1) Shininess 10 = 91% shininess
   d                        (1,1) Flag indicating transparency (0 to 1)
   illum                    (1,1) 1 = flat shading, 2 = specular
   Kd                       (1,3) Diffuse color
   Ks                       (1,3) Specular color
   Ka                       (1,3) Ambient color

--------------------------------------------------------------------------

Back to the AerospaceUtils Module page