UV Object
Overview
The UV object (new in Version 2.8) encapsulates numerous parameters used by the DrawImageUV method to render images mapped to 3D surfaces. This functionality is covered in Chapter 11.
Member List
Properties
Specifies the ambient light component. Only used if Shading is True, ignored otherwise. 0.4 by default.
See also: Section 11.5 - Shading.
Specify the mapping between shading values and the change in brightness for the corresponding pixels of the image being rendered.
See also: Section 11.5 - Shading.
Specifies the virtual camera's view angle (in degrees) which affects the degree of perspective. 30° by default.
See also: Section 11.4 - Surface Visualization.
Specify the location of the virtual camera. (5, 0, 0) by default.
See also: Section 11.4 - Surface Visualization.
Specifies the diffuse light component. Only used if Shading is True, ignored otherwise. 0.6 by default.
See also: Section 11.5 - Shading.
Specifies whether the pixels of the image being rendered should be displayed on the 3D surface. True by default. Can be set to False for debugging purposes so that the wireframe and/or shading can be viewed by themselves. This property and DisplayShading cannot both be True.
See also: Section 11.5 - Shading.
Specifies whether the shading pattern should be displayed on the 3D surface instead of the image. False by default. Useful for debugging purposes. This property and DisplayImage cannot both be True.
See also: Section 11.5 - Shading.
Specifies whether the wireframe should be displayed on the 3D surface in addition to, or instead of the image/shading. False by default. Useful for debugging purposes. This property cannot be False if DisplayImage and DisplayShading are both False. The color and thickness of the wireframe are specified via the WireframeColor and WireframeThickness properties.
See also: Section 11.3 - Specifying Parametric Equations via UV Object, Section 11.6 - Putting It All Together.
Specifies whether the direction of the normal vectors of all surface faces should be reversed. False by default. Depending on the way the surface is defined, the normals may be pointing towards, or away from, the camera by default. If they point in the "wrong" direction, the faces may not receive proper shading, and may also be wrongly hidden by the HideBackFace property. Set this property to True to fix those problems.
See also: Section 11.5 - Shading.
If set to True, hides the faces pointing away from the camera. False by default. This property is useful for displaying a surface that should appear wrapped around an object depicted on the background canvas, such as a pen, mug or baseball cap.
See also: Section 11.4 - Surface Visualization.
Specify horizontal and vertical scaling factors affecting the mapping of the image being rendered to the 3D surface on which it is rendered. (1, 1) by default. These properties cannot be 0 but can be negative. A number with the absolute value greater than 1 shrinks the image along the corresponding axis into a tiling pattern, and a number with the absolute value between 0 and 1 stretches it. A negative number for ScaleX flips the image horizontally, and for ScaleY vertically.
See also: Section 11.3 - Specifying Parametric Equations via UV Object.
Enables shading for the image being rendered. False by default. Shading greatly improves the visual perception of depth. Without it, the image may look flat.
See also: Section 11.5 - Shading.
Specify the horizontal and vertical displacement of the rendered image relative to the canvas. By default, the 3D view is transferred onto the canvas in such a way that its center is positioned right over the center of the canvas. For fine-tuning purposes, the image may need to be shifted slightly up, down or sideways to match the content of the canvas. These properties help with this task.
See also: Section 11.4 - Surface Visualization, Section 11.6 - Putting It All Together.
Specifies the "alpha" value in the Phong reflection model for the specular light component. This value affects the size of a specular highlight. Only used if Shading is True, ignored otherwise. 100 by default.
See also: Section 11.5 - Shading.
Specifies the specular light component. Only used if Shading is True, ignored otherwise. 0.3 by default.
See also: Section 11.5 - Shading.
Specify the inclusive range for the U parameter in the parametric equations defining the 3D surface. UMax must be greater than UMin. These properties are required.
See also: Section 11.2 - Parametric Representation of 3D Surfaces.
Specifies the number of steps for the U parameter. This property is required, and must be 1 or greater.
See also: Section 11.2 - Parametric Representation of 3D Surfaces.
Specify the inclusive range for the V parameter in the parametric equations defining the 3D surface. VMax must be greater than VMin. These properties are required.
See also: Section 11.2 - Parametric Representation of 3D Surfaces.
Specifies the number of steps for the V parameter. This property is required, and must be 1 or greater.
See also: Section 11.2 - Parametric Representation of 3D Surfaces.
Specifies the wireframe color. Only used if DisplayWireframe is True, ignored otherwise. White (&HFFFFFFFF) by default.
See also: Section 11.3 - Specifying Parametric Equations via UV Object, Section 11.6 - Putting It All Together.
Specifies the wireframe thickness. Only used if DisplayWireframe is True, ignored otherwise. 1 by default.
See also: Section 11.3 - Specifying Parametric Equations via UV Object, Section 11.6 - Putting It All Together.
Specify the X, Y and Z mathematical equations for the 3D surface being defined. The strings may contain numbers, arithmetic operations, parentheses, parameter names, special names, and function names. These properties are required.
See also: Section 11.3 - Specifying Parametric Equations via UV Object .
Methods
Resets the camera to its default location, orientation and view angle: the coordinates are reset to (5, 0, 0), lens vector to (-1, 0, 0) and view angle to 30°.
See also: Section 11.4 - Surface Visualization.
Rotates the camera around its center. Pitch is rotation around the lateral (left-to-right) axis. Bank is rotation around the longitudinal (front-to-back) axis. Yaw is rotation around the vertical axis. The method performs the rotations in the order Pitch-Bank-Yaw. The angles are specified in degrees.
See also: Section 11.4 - Surface Visualization.
Rotates the camera around the three coordinate axes X, Y and Z. The method performs the rotations in the order X-Y-Z. The angles are specified in degrees.
See also: Section 11.4 - Surface Visualization.
Specifies the direction of the light vector. By default the light vector is parallel to the X-axis and points in the opposite direction to it. The default vector values are (-1, 0, 0). The X, Y and Z values cannot all be 0. The light vector affects the way the surface is shaded.
See also: Section 11.5 - Shading.