Image
Use an Image plot () to add an image as a plot. You can add it to 3D and 2D plot groups as an image on the surfaces of the plot. You can also add Image (Plot Attribute) subnodes directly to a 2D or 3D plot group. Right-click the Image node to add Deformation, Material Appearance, Translation, or Transparency (3D only) subnodes if desired.
Go to Common Results Node Settings for links to information about these sections: Data, Selection, Title, Quality, and Inherit Style.
File
Click the Browse button () to browse to and select an image to add. Select it in the Image file browser window and then click Open. You can also click the downward arrow beside the Browse button and choose Browse From () to open the fullscreen Select File window. Click the downward arrow for the File Location Actions menu () to choose Show in Auxiliary Data () to move to the row for this file in the Auxiliary Data window, Copy File Location (), and (if you have copied a file location) Paste File Location (). Click the Plot button () to add the image to the plot. Click the Refresh button () to update the image plot with the latest version of the image file. Click the Import button () to store the image in the model. You then get information about the imported image file (the filename and its width and height). Click Export to export the image to a file, and click the Discard button to remove the imported image file and return to the original settings in this section.
Mapping
This section controls how the image is mapped to the 2D and 3D surfaces; you can choose an automatic or manual mapping as well as predefined planar, cylindrical, and spherical mappings for 3D surfaces and a rectangular mapping for 2D surface.
When the Mapping list is set to Auto, an automatic planar projection algorithm is used to map the image to the surfaces. The Auto setting always finds the best fitting plane and projects on it while choosing a suitable projection size. If the Preserve aspect ratio check box is selected (the default), then the image’s aspect ratio is preserved by the automatic mapping algorithm. If the image and the data have aspect ratios, then some padding must be added. The images are centered in the dimension where padding is needed.
When you select Manual from the Mapping list, you get access to more detailed control over the mapping. Each point on the surface is mapped to a pixel in the image. This functionality can be used for more advanced mappings. The following example provides a mapping that embeds a world map that uses an equirectangular projection on a sphere of radius r centered at the origin (when using a relative coordinate interpretation):
-
For the u-coordinate field, enter 0.5+atan2(y,x)/(2*pi).
-
For the v-coordinate field, enter 1-acos(z/r)/pi.
The default setting for the Coordinate interpretation list is Relative (a value in the range of 0–1). Choose Pixels to instead enter the coordinates using absolute pixels coordinates.
The following mapping types are available in 3D:
When you select Planar from the Mapping list, you can define a plane for the image to be mapped to. From the Plane type list, choose one of the following planes: xy-plane, yz-plane, zx-plane, yx-plane, zy-plane, xz-plane, Auto (the default), or General. For Auto, the software chooses the plane type that best suits the selected surfaces.
Enter a Width under Size, which is the side length that the image will have, interpreted in the length unit of the geometry that the solution dataset refers to. The Height will be computed based on the image’s size. Also, provide the coordinates for an anchor point in the x, y, and z fields under Anchor point. For General, specify a normal vector in the x, y, and z fields under Normal. The default is (0, 0, 1); that is, the positive z-direction). Also specify a rotation angle, in degrees, if desired, in the Rotation field.
When you select Cylindrical from the Mapping list, you get a cylindrical mapping of the image. Specify the position of the cylinder (center of the bottom circle) in the x, y, and z fields under Position, and from the Axis type list under Axis, choose X-axis, Y-axis, Z-axis (the default), Cartesian, or Spherical. For Cartesian, specify the axis direction in the x, y, and z fields. For Spherical, specify the axis direction in the theta and phi fields as θ and ϕ angles in degrees. Under Angle, specify a rotation angle, in degrees, if desired, in the Rotation field and a an angle range, in degrees. for which you want to apply the mapping (default: 360 degrees). Under Height, choose one of the following options from the Mode list: Auto (the default), Fit to object, or Manual. If you choose Manual, enter a height and a displacement in the Height and Displacement fields, both in coordinates in the geometry’s coordinate system and its length unit. The displacement is the shift along the axis measured from the middle.
When you select Spherical from the Mapping list, you get a spherical mapping of the image. Specify the position of the sphere’s center in the x, y, and z fields under Position, and from the Axis type list under Axis, choose X-axis, Y-axis, Z-axis (the default), Cartesian, or Spherical. For Cartesian, specify the axis direction in the x, y, and z fields. For Spherical, specify the axis direction in the theta and phi fields as θ and ϕ angles in degrees. Also specify a rotation angle, in degrees, if desired, in the Rotation field.
The following mapping type is available in 2D:
When you select Rectangular from the Mapping list, you define a rectangle for the image to be mapped to. Enter a Width under Size, which is the side length that the image will have, interpreted in the length unit of the geometry that the solution dataset refers to. The Height will be computed based on the image’s size.
From the Extrapolation list under Tiling, choose Repeat (the default), Repeat mirrored, or Clamp to edge to control the type of extrapolation to use. The effect of the Clamp to edge option is that each coordinate is mapped to the closest valid value at an edge of the image. The Extrapolation list is not available when you have selected the Cylindrical or Spherical mapping from the Mapping list.
The coordinate names above are the default names: x, y, and z, but they can vary depending on the physics and setup of the current model.