请教下大家TeeChart8画三维曲面的时候为什么提示:类型不匹配呀,下面是我的代码
m_chart.RemoveAllSeries();
m_chart.AddSeries(scIsoSurface);
CSeries linSeries = ((CSeries)m_chart.Series(0));
((CIsoSurfaceSeries)linSeries.get_asIsoSurface()).put_IrregularGrid(true);
double r = 5;
for (double i = -r; i <= r; i += 0.1)
{
for (double j = -r; j <= r; j += 0.1)
{
double k = r * r - i * i - j * j;
if (k >= 0)
{
k = sqrt(k);
((CIsoSurfaceSeries)linSeries.get_asIsoSurface()).AddXYZ(i, j, -k, NULL, NULL);
}
}
}