回复 5楼linjianpin的帖子
是否能够显示为平滑曲面取决于你的数据源,比如下面的数据:
- public MainPage()
- {
- InitializeComponent();
- var values = "0 6 10 12 12 10 6 0,-6 0 4 6 6 4 0 -6,-10 -4 0 2 2 0 -4 -10,-12 -6 -2 0 0 -2 -6 -12,-12 -6 -2 0 0 -2 -6 -12,-10 -4 0 2 2 0 -4 -10,-6 0 4 6 6 4 0 -6,0 6 10 12 12 10 6 0".Split(new Char[] { ',' });
- double[,] data = new double[8, 8];
- int r = -1;
- int c = -1;
- foreach (var row in values)
- {
- ++r;
- foreach (var value in row.Split(new Char[] { ' ' }))
- {
- ++c;
- data[r, c] = double.Parse(value);
- }
- c = -1;
- }
- c1Chart3D1.ChartType = C1.Silverlight.Chart3D.Chart3DType.SurfaceZone;
- c1Chart3D1.Children[0].ZData = data;
- }
复制代码 |