ComponentOne Chart 8.0 for ActiveX
Creating a Shaded-Relief Map

 

Creating a Shaded-Relief Map

The CreateShaded method creates a new Chart3DData object from an existing object, filling it with a shaded-relief map of the original chart data, suitable for draping over the original data as the data's fourth dimension (as described in Displaying 4D Data.)

CreateShaded is passed the following five arguments:

·      The sweep angle

·      The rise angle (used along with the sweep angle to locate the light source)

·      The scale, which determines the difference in units between the “ground” coordinates in the XY-plane and those of the Z-values. (If the scale is set to 0, a default value will be computed based on the average slope of the facets.)

·      The base amount of ambient light (must be between 0 and 1)

·      The brightness of the light (must be between 0 and 1)

Here is an example of code that calls CreateShaded:

Dim Shaded As Object

...

With Chart3D1.ChartGroups(1).ElevationData

       Set Shaded = .CreateShaded 45#, 45#, 0, 0.25, 0.5

End With

For a more detailed example, refer to the shader demo program.

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback