Purpose
Creates a 3DMap with the desired parameters. You can issue this statement from the MapBasic window in MapInfo Pro.
Syntax
Create Map3D
[ From Window window_id | MapString mapper_creation_string ]
[ Camera [ Pitch angle | Roll angle | Yaw angle | Elevation angle ] |
[ Position ( x, y, z ) | FocalPoint ( x, y, z ) ] |
[ Orientation ( vu_1, vu_2, vu_3, vpn_1, vpn_2, vpn_3,
clip_near, clip_far )]]
[ Light [ Position ( x, y, z ) | Color lightcolor ] ]
[ Resolution ( res_x, res_y ) ]
[ Scale grid_scale ]
[ Background backgroundcolor ]
[ Units unit_name ]
window_id is a window identifier a for a Map window which contains a Grid layer. An error message is displayed if a Grid layer is not found.
mapper_creation_string specifies a command string that creates the mapper textured on the grid.
Camera specifies the camera position and orientation.
angle is an angle measurement in degrees. The horizontal angle in the dialog box ranges from 0-360 degrees and rotates the maps around the center point of the grid. The vertical angle in the dialog box ranges from 0-90 and measures the rotation in elevation from the start point directly over the map.
Pitch adjusts the camera's current rotation about the x axis centered at the camera's origin.
Roll adjusts the camera's current rotation about the z axis centered at the camera's origin.
Yaw adjusts the camera's current rotation about the y axis centered at the camera's origin.
Elevation adjusts the current camera's rotation about the x axis centered at the camera's focal point.
Position indicates the camera/light position.
FocalPoint indicates the camera/light focal point.
Orientation specifies the cameras ViewUp (vu_1, vu_2, vu_3), ViewPlane Normal (vpn_1, vpn_2, vpn_3), and Clipping Range (clip_near, clip_far) (used specifically for persistence of view).
Resolution is the number of samples to take in the x and y directions. These values can increase to a maximum of the grid resolution. The resolution values can increase to a maximum of the grid x, y dimension. If the grid is 200x200 then the resolution values will be clamped to a maximum of 200x200. You cannot increase the grid resolution, only specify a subsample value.
grid_scale is the amount to scale the grid in the z direction. A value >1 will exaggerate the topology in the z direction, a value <1 will scale down the topological features in the z direction.
backgroundcolor is a color to be used to set the background and is specified using the RGB() function.
unit_name specifies the units the grid values are in. Do not specify this for unit-less grids (for example, grids generated using temperature or density). This option needs to be specified at creation time. You cannot change them later with the Set Map3D statement or the Properties dialog box.
Description
Once it is created, the 3DMap window is a standalone window. Since it is based on the same tables as the original Map window, if these tables are changed and the 3DMap window is manually "refreshed" or re-created from a workspace, these changes are displayed on the grid. The creation fails if the window_id is not a Map window or if the Map window does not contain a Grid layer. If there are multiple grids in the Map window, each will be represented in the 3DMap window.
A 3DMap keeps a Mapper creation string as its texture generator. This string will also be prevalent in the workspace when the 3DMap window is persisted. The initialization will read in the grid layer to create 3D geometry and topology objects.
Example
Create Map3D Resolution(75,75)
Creates a 3DMap window of the most recent Map window. It will fail if the window does not contain any Continuous Grid layers. Another example is:
Create Map3D From Window FrontWindow() Resolution(100,100) Scale 2
Background RGB(255,0,0) Units "ft".
Creates a 3DMap window with a Red background, the z units set to feet, a Z scale factor of 2, and the grid resolution set to 100x100.
See Also:
Set Map3D statement