ProjectsForTest/WinForm.NET5TeeChart-NET-Pro-Samples/Walls/Wall_Transparency.cs

(开头部分) 1KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;

namespace Steema.TeeChart.Samples
{
	public class Wall_Transparency : Steema.TeeChart.Samples.BaseForm
	{
		private System.Windows.Forms.HScrollBar hScrollBar1;
		private System.Windows.Forms.Label label1;
		private System.Windows.Forms.Button button1;
		private Steema.TeeChart.Styles.Surface surface1;
		private System.Windows.Forms.Label label2;
		private System.ComponentModel.IContainer components = null;

		public Wall_Transparency()
		{
			// This call is required by the Windows Form Designer.
			InitializeComponent();

			for(int x=-10; x<=10; ++x)
				for(int z=-10; z<=10; ++z)
					surface1.Add(x,Calc(x,z),z);
		}

		private double Calc(double x,double y){
			const double a=3.0, b=10.0, c=5.0, 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;
		}

		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if (components != null) 
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。