C# 如何绘制包含立方体的三维图表
我有这样的数据(x_pos,y_pos,z_pos,长度,高度,深度)。我需要使用这些信息来绘制立方体。谁能帮我画一张这张图吗。给我一些示例代码。是的,您可以使用TChart的AfterDraw事件中的Cube(矩形r,int z0,int z1)方法使用自定义画布绘制,例如:C# 如何绘制包含立方体的三维图表,c#,asp.net,.net,webforms,teechart,C#,Asp.net,.net,Webforms,Teechart,我有这样的数据(x_pos,y_pos,z_pos,长度,高度,深度)。我需要使用这些信息来绘制立方体。谁能帮我画一张这张图吗。给我一些示例代码。是的,您可以使用TChart的AfterDraw事件中的Cube(矩形r,int z0,int z1)方法使用自定义画布绘制,例如: void tChart1_AfterDraw(object sender, Steema.TeeChart.Drawing.Graphics3D g) { int x = 100; int y = 100;
void tChart1_AfterDraw(object sender, Steema.TeeChart.Drawing.Graphics3D g)
{
int x = 100;
int y = 100;
int z = 0;
int width = 50;
int height = 50;
int depth= 10;
DrawCube(x, y, z, width, height, depth, g);
}
private void DrawCube(int x, int y, int z, int width, int height, int depth, Steema.TeeChart.Drawing.Graphics3D g)
{
Rectangle r = new Rectangle(x, y, width, height);
g.Cube(r, z, z + depth);
}
您正在使用哪种开发环境或语言?我正在使用C语言进行可视化研究哪种类型的应用程序:winforms、webforms、wpf、silverlight、windows phone、xamarin.android、xamarin.ios等。?谢谢。对于延迟回复,我深表歉意。见下面的答案。