Contenuto principale

RayTraceVisual

R2026b

Ray trace visual

Since R2026b

    Description

    Add-On Required: This feature requires the 3D Scenarios add-on.

    A RayTraceVisual object controls the appearance of a RayTraceAnalysis object in a scenario viewer.

    Creation

    When you add a ray trace analysis to a scenario with open viewers, the scenario automatically creates an RayTraceVisual object and stores the object in the Visual property of the corresponding RayTraceAnalysis object.

    You can access an RayTraceVisual object by using the getvisual function or by querying the Visual property of the RayTraceAnalysis object.

    Properties

    expand all

    Metric for the ray path colors, specified as one of these values:

    • "num-interactions" — Apply color to the ray paths based on the number of interactions. By default, the RayTraceVisual object sets the color limits to the minimum and maximum number of interactions, and the number of interactions map directly to colors in the colormap.

    • "distance" — Apply color to the ray paths based on the propagation distance.

    Colormap for the ray paths, specified as an m-by-3 array of RGB triplets that define m individual colors or as a colormap name from this table.

    Colormap NameColor Scale

    parula

    Colorbar showing the colors of the parula colormap. The colormap starts at dark blue and transitions to lighter blue, green, orange and yellow. The transitions between colors are more perceptually uniform than in most other colormaps.

    turbo

    Colorbar showing the colors of the turbo colormap. The colormap starts at dark blue and transitions to lighter blue, bright green, orange, yellow, and dark red. This colormap is similar to jet, but the transitions between colors are more perceptually uniform than in jet.

    hsv

    Colorbar showing the colors of the hsv colormap. The colormap starts at red and transitions to yellow, bright green, cyan, dark blue, magenta, and bright orange.

    hot

    Colorbar showing the colors of the hot colormap. The colormap starts at dark red and transitions to bright red, orange, yellow, and white.

    cool

    Colorbar showing the colors of the cool colormap. The colormap starts at cyan and transitions to light blue, light purple, and magenta.

    spring

    Colorbar showing the colors of the spring colormap. The colormap starts at magenta and transitions to pink, light orange, and yellow.

    summer

    Colorbar showing the colors of the summer colormap. The colormap starts at medium green and transitions to yellow.

    autumn

    Colorbar showing the colors of the autumn colormap. The colormap starts at bright orange and transitions to yellow.

    winter

    Colorbar showing the colors of the winter colormap. The colormap starts at dark blue and transitions to bright green.

    gray

    Colorbar showing the gray colormap. The colormap starts at black and transitions to white.

    bone

    Colorbar showing the bone colormap. This colormap has colors that are approximately gray with a slight blue color tint. The colormap starts at dark gray and transitions to white.

    copper

    Colorbar showing the copper colormap. This colormap starts at black and transitions to a medium orange, similar to the color of copper.

    pink

    Colorbar showing the pink colormap. This colormap starts at dark red and transitions to dark pink, tan, and white.

    sky (since R2023a)

    Colorbar showing the sky colormap. This colormap starts at a very light shade of blue and transitions to a darker shade of blue.

    abyss (since R2023b)

    Colorbar showing the abyss colormap. This colormap starts at a very dark shade of blue and transitions to a lighter shade of blue.

    nebula (since R2025a)

    Colorbar showing the nebula colormap. This colormap starts at a medium shade of blue and transitions to a bright shade of red.

    jet

    Colorbar showing the colors of the jet colormap. The colormap starts at dark blue and transitions to light blue, bright green, orange, yellow, and dark red.

    lines

    Colorbar showing the colors of the lines colormap. The colormap contains a repeating pattern of colors: dark blue, dark orange, dark yellow, dark purple, medium green, light blue, and dark red.

    colorcube

    Colorbar showing the colors of the colorcube colormap. The colormap is a course sampling of the RGB colorspace.

    prism

    Colorbar showing the colors of the prism colormap. The colormap contains a repeating pattern of colors: red, orange, yellow, green, blue, and purple.

    flag

    Colorbar showing the colors of the flag colormap. The colormap contains a repeating pattern of colors: red, white, blue, and black.

    white

    Colorbar showing the white colormap, which is entirely white.

    Color limits for the ray paths, specified as a two-element vector of the form [cmin cmax]. This property determines how data values map to the colors in the colormap, where:

    • cmin specifies the data value that maps to the first color in the colormap.

    • cmax specifies the data value that maps to the last color in the colormap.

    The RayTraceVisual object interpolates data values between cmin and cmax across the colormap. Values outside this range use either the first or last color, whichever is closest.

    Calculation mode for the color limits, specified as one of these values:

    • "auto" — The RayTraceVisual object automatically selects the limits based on the value of the ColorMetric property. The object recalculates the color limits each time the simulation advances.

    • "manual" — Manually specify the color limit values. To specify the values, set the ColorLimits property. The color limit values do not change as the simulation advances.

    Line width, in pixels, specified as a positive scalar. This value specifies the width of the lines that make up the ray paths.

    Radius of the endpoint markers, in pixels, specified as a positive scalar.

    Ray path transparency, specified as a scalar in the range [0, 1]. A value of 1 is opaque and a value of 0 is completely transparent.

    Option to show the color legend, specified as "on" or "off", or as numeric or logical 1 (true) or 0 (false). A value of "on" is equivalent to true, and "off" is equivalent to false. Thus, you can use the value of this property as a logical value. The value is stored as an on/off logical value of type matlab.lang.OnOffSwitchState.

    • "on" — Show the color legend.

    • "off" — Do not show the color legend.

    The viewer can display a maximum of one legend at a time.

    Option to show the ray path lines, specified as "on" or "off", or as numeric or logical 1 (true) or 0 (false). A value of "on" is equivalent to true, and "off" is equivalent to false. Thus, you can use the value of this property as a logical value. The value is stored as an on/off logical value of type matlab.lang.OnOffSwitchState.

    • "on" — Show the ray path lines.

    • "off" — Do not show the ray path lines.

    Option to show the endpoint markers, specified as "on" or "off", or as numeric or logical 1 (true) or 0 (false). A value of "on" is equivalent to true, and "off" is equivalent to false. Thus, you can use the value of this property as a logical value. The value is stored as an on/off logical value of type matlab.lang.OnOffSwitchState.

    • "off" — Do not show the endpoint markers.

    • "on" — Show the endpoint markers.

    The color of the source endpoint is white with a black outline. The color of each destination endpoint corresponds to the highest value for the specified color metric among the ray paths.

    Option to show circular point markers at the interaction locations, specified as "on" or "off", or as numeric or logical 1 (true) or 0 (false). A value of "on" is equivalent to true, and "off" is equivalent to false. Thus, you can use the value of this property as a logical value. The value is stored as an on/off logical value of type matlab.lang.OnOffSwitchState.

    • "off" — Do not show markers at the interaction points.

    • "on" — Show markers at the interaction points.

    The color of each interaction point matches the color of the corresponding ray path.

    State of visibility, specified as "on" or "off", or as numeric or logical 1 (true) or 0 (false). A value of "on" is equivalent to true, and "off" is equivalent to false. Thus, you can use the value of this property as a logical value. The value is stored as an on/off logical value of type matlab.lang.OnOffSwitchState.

    • "on" — Show the visual object in the viewer.

    • "off" — Do not show the visual object in the viewer.

    Version History

    Introduced in R2026b