common attributes for primitives
Prev | Chapter 3. XML elements and attributes | Next

## common attributes for primitives

### Description

Common attributes for ATOMs, BONDs, COILs, RIBBONs, SHAPEs, OBJ3Ds, and LABELs.

### Attributes

width (abbr.:w) (type:Float)

  width/radius of the object. It is radius for ATOM(sphere), BOND(cylinder), COIL(tube), and is width for RIBBON(curved plane). In LABELs, this parameter is used as the textfield size. This attribute might be more important than "fontsize". In SHAPEs, this parameter is not used and is simply ignored. In OBJ3Ds, the meaning depends on its type. See OBJ3D.

  Defaults:

  ATOM : 4.0, BOND : 3.0, COIL : 3.0, RIBBON : 8.0, LABEL : 130.0, OBJ3D : 1.0

radius (abbr.:r) (type:Float)

  alias to width above

color (abbr.:c) (type:Color)

  Color of the object or the text.

  Defaults:

  ATOM : 0x00FF00 (lime), BOND : 0x00FF00 (lime), COIL : 0x00FF00 (lime), RIBBON : 0xFF0000 (red), LABEL : 0xFFFFFF (white), SHAPE : 0x00FF00 (lime), OBJ3D : 0x00FF00 (lime)

color0 (abbr.:c0,col0) (type:Color), , color1 (abbr.:c1,col1) (type:Color)

  For BONDs, COILs, and RIBBONs, objects can be drawn using two colors if you specify these two variables. In BONDs, one side of the cylinder is painted with color0, and the other side is painted with color1. In COILs and RIBBONs, the object is drawn in the gradation of these two colors.

alpha (abbr.:a) (type:Float)

  Alpha value ranging 0.0(transparent)-1.0(opaque). The default value is 1.0 for all the primitives.

quality (abbr.:q,qua) (type:Int)

  Quality of the object. Increasing the quality increases the number of polygons for this object. This attribute is available for ATOMs, BONDs, COILs, and OBJ3Ds. Too large quality is not recommended.

  Defaults:

  ATOM : 3, BOND : 2 (pentagon), COIL : 0 (triangle pole), OBJ3D : 3,

ambient (abbr.:am,amb) (type:Float)

  Intensity of ambient for Gouraud and Phong shadings. The color of ambient is the same as "color" above. White-colored ambient is not implemented. This attribute is ignored for LABELs. The value should be 0.0-1.0. Too large value will make the scene very whity.

  Defaults:

  ATOM : 0.35, BOND : 0.3, COIL : 0.3, RIBBON : 0.3, SHAPE : 0.3, OBJ3D : 0.35

diffuse (abbr.:d,dif,diff) (type:Float)

  Intensity of diffuse for Gouraud and Phong shadings. This attribute is ignored for LABELs. The value should be 0.0-1.0.

  Defaults:

  ATOM : 0.7, BOND : 1.0, COIL : 0.7, RIBBON : 0.7, SHAPE : 0.5, OBJ3D : 0.7

diffuse (abbr.:d,dif,diff) (type:Float)

  Intensity of diffuse for Gouraud and Phong shadings. This attribute is ignored for LABELs. The value should be 0.0-1.0.

  Defaults:

  ATOM : 0.7, BOND : 1.0, COIL : 0.7, RIBBON : 0.7, SHAPE : 0.5, OBJ3D : 0.7

specular (abbr.:s,spe,spec) (type:Float)

  Intensity of specular for Phong shading. Half vector of the light direction and the camera direction is used as the reflection direction. This attribute is ignored for LABELs. The value should be 0.0-1.0.

  Defaults:

  ATOM : 0.8, BOND : 0.6, COIL : 0.8, RIBBON : 0.8, SHAPE : 0.2, OBJ3D : 0.8

gloss (abbr.:g) (type:Float)

  Specular gloss of Phong shading. This attribute is ignored for LABELs.

  Defaults:

  ATOM : 20.0, BOND : 20.0, COIL : 10.0, RIBBON : 10.0, SHAPE : 20.0, OBJ3D : 20.0

shading (abbr.:shade,shader) (type:String)

  Shading method. Valid entries are "simple", "gouraud", and "phong". "Simple" never consider lights and is very light-weighted. "Gouraud" is a popular gouraud shading, ambient and diffuse are considered. In "phong", specular reflection is also considered. This attribute is ignored for LABELs. The default is "phong" for all the primitives.

Prev | Up | Next
TRI | Home | Chapter 4. Non-standard function