728x90
반응형
728x170
▶ MainForm.cs
using System;
using System.Drawing;
using System.Windows.Forms;
using Steema.TeeChart.Drawing;
using Steema.TeeChart.Styles;
namespace TestProject
{
/// <summary>
/// 메인 폼
/// </summary>
public partial class MainForm : Form
{
//////////////////////////////////////////////////////////////////////////////////////////////////// Constructor
////////////////////////////////////////////////////////////////////////////////////////// Public
#region 생성자 - MainForm()
/// <summary>
/// 생성자
/// </summary>
public MainForm()
{
InitializeComponent();
Text = "TChart 클래스 : Walls 속성을 사용해 벽 투명도 설정하기";
this.tChart.Aspect.View3D = true;
this.tChart.Panel.Pen = new ChartPen(Color.Black);
this.tChart.Walls.Left.Transparency = 90;
this.tChart.Walls.Left.Color = Color.Yellow;
this.tChart.Walls.Bottom.Transparency = 0;
this.tChart.Walls.Bottom.Color = Color.Yellow;
Surface surface = new Surface(this.tChart.Chart);
for(int x = -10; x <= 10; ++x)
{
for(int z = -10; z <= 10; ++z)
{
surface.Add(x, Calculate(x, z), z);
}
}
}
#endregion
//////////////////////////////////////////////////////////////////////////////////////////////////// Method
////////////////////////////////////////////////////////////////////////////////////////// Private
#region 계산하기 - Calculate(x, y)
/// <summary>
/// 계산하기
/// </summary>
/// <param name="x">X</param>
/// <param name="y">Y</param>
/// <returns>계산값</returns>
private double Calculate(double x, double y)
{
const double a = 3.0;
const double b = 10.0;
const double c = 5.0;
const double d = 1.0;
x = x / 3.0;
y = y / 3.0;
double result = a * Math.Pow(d - x, 2) * Math.Exp(-(x * x) - Math.Pow(y + d, 2)) -
b * (x / c - (x * x * x) - (y * y * y * y * y)) * Math.Exp(-Math.Pow(x, 2) - Math.Pow(y, 2)) -
(d / a) * Math.Exp(-Math.Pow(x + d, 2) - Math.Pow(y, 2));
return result;
}
#endregion
}
}
728x90
반응형
그리드형(광고전용)
'TeeChart > WinForm' 카테고리의 다른 글
[TEECHART/WINFORM] ThemeEditor 클래스 : 차트 테마 설정하기 (0) | 2022.04.05 |
---|---|
[TEECHART/WINFORM] ChartPartAnimation 클래스 : 차트 애니메이션 사용하기 (0) | 2022.04.05 |
[TEECHART/WINFORM] MarkSymbolEditor 클래스 : 마커 기호 속성 편집하기 (0) | 2022.04.05 |
[TEECHART/WINFORM] TChart 클래스 : Export 속성을 사용해 클립보드 복사하기 (0) | 2022.04.05 |
[TEECHART/WINFORM] TChart 클래스 : Aspect 속성을 사용해 3D 차트 회전시키기 (0) | 2022.04.05 |
[TEECHART/WINFORM] Bar 클래스 : Marks 속성을 사용해 마커 기호 표시하기 (0) | 2022.04.05 |
[TEECHART/WINFORM] CustomShapeEditor 클래스 : 마커 속성 편집하기 (0) | 2022.04.05 |
[TEECHART/WINFORM] Pie 클래스 : Marks 속성을 사용해 개별 마커 색상/폰트 크기 설정하기 (0) | 2022.04.05 |
[TEECHART/WINFORM] Bar 클래스 : 마우스 아래 막대의 마커 표시하기 (0) | 2022.04.05 |
[TEECHART/WINFORM] Bar 클래스 : Marks 속성을 사용해 마커 콜아웃 설정하기 (0) | 2022.04.05 |
댓글을 달아 주세요