最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

講解.NET環(huán)境下繪制模糊數(shù)學(xué)中隸屬函數(shù)分布圖第1/5頁

 更新時(shí)間:2007年11月23日 17:13:15   作者:  
 繪制模糊數(shù)學(xué)中隸屬函數(shù)分布圖
  using System; 
  using System.Collections.Generic; 
  using System.ComponentModel; 
  using System.Data; 
  using System.Drawing; 
  using System.Text; 
  using System.Collections; 
  using System.Windows.Forms; 
  using System.Drawing.Imaging; 
  using System.Drawing.Drawing2D; 
  namespace ImageFuzzy 
  ...{ 
  public partial class Form1 : Form 
  ...{ 
  private int type1; 
  private int type2; 

  private string item1; 
  private string item2; 
  private float a; 
  private float b; 
  private float c; 
  private float d1; 
  private float k; 
  private float l; 
  private float tempx; 
  private float tempy; 
  public void InitArray() 
  ...{ 
  type1 = 0; 
  type2 = 0; 
  k = 2; 
  item1 = this.comboBox1.Text.ToString(); 
  item2 = this.comboBox2.Text.ToString(); 
  this.groupBox1.Text = item1 + item2 + "圖形"; 
  a = float.Parse(this.tbA.Text.Trim().ToString()); 
  b = float.Parse(this.tbB.Text.Trim().ToString()); 
  c = float.Parse(this.tbC.Text.Trim().ToString()); 
  d1 = float.Parse(this.tbD.Text.Trim().ToString()); 
  k = float.Parse(this.tbK.Text.Trim().ToString()); 
  l = float.Parse(this.tbL.Text.Trim().ToString()); 
  type1 = this.comboBox1.SelectedIndex+1; 
  type2 = this.comboBox2.SelectedIndex+1; 
  } 
  private void delete() 
  ...{ 
  a = 0; 
  b = 0; 
  c = 0; 
  d1 = 0; 
  k = 0; 
  l = 0; 
  } 
  private void set1() 
  ...{ 
  this.tbA.Text = "1"; 
  this.tbB.Text = "2"; 
  this.tbC.Text = "3"; 
  this.tbD.Text = "4"; 
  this.tbK.Text = "1"; 
  this.tbL.Text = "2"; 
  } 
  private void set2() 
  ...{ 
  this.tbA.Text = "1"; 
  this.tbB.Text = "1.5"; 


  this.tbC.Text = "2"; 
  this.tbD.Text = "2.5"; 
  this.tbK.Text = "1"; 
  this.tbL.Text = "2"; 
  } 
  private void set3() 
  ...{ 
  this.tbA.Text = "0.5"; 
  this.tbB.Text = "1.5"; 
  this.tbC.Text = "2"; 
  this.tbD.Text = "3"; 
  this.tbK.Text = "3"; 
  this.tbL.Text = "2"; 
  } 
  private void set4() 
  ...{ 
  this.tbA.Text = "1.5"; 
  this.tbB.Text = "1.5"; 
  this.tbC.Text = "2"; 
  this.tbD.Text = "2.5"; 
  this.tbK.Text = "0.5"; 
  this.tbL.Text = "2"; 
  } 
  private void set5() 
  ...{ 

  this.tbA.Text = "2"; 
  this.tbB.Text = "2.5"; 
  this.tbC.Text = "3"; 
  this.tbD.Text = "3.5"; 
  this.tbK.Text = "4"; 
  this.tbL.Text = "6"; 
  } 
  private void set6() 
  ...{ 
  this.tbA.Text = "0.5"; 
  this.tbB.Text = "1.5"; 
  this.tbC.Text = "2"; 
  this.tbD.Text = "2.5"; 
  this.tbK.Text = "2"; 
  this.tbL.Text = "4"; 
  } 
  public Form1() 
  ...{ 
  InitializeComponent(); 
  } 
  private void Form1_Load(object sender, EventArgs e) 
  ...{ 
  //set1(); 
  } 
  private void Form1_Paint(object sender, PaintEventArgs e) 
  ...{ 
  } 
  private void pictureBox1_Paint(object sender, PaintEventArgs e) 
  ...{ 
  float d; 
  float x1; 
  float x2; 
  float y1; 
  float y2; 
  PointF p1; 
  PointF p2; 
  int unit = 40;//放大倍數(shù) 
  Font font = new Font("MS UI Gothic", 12); 
  SolidBrush brush = new SolidBrush(Color.Black); 
  float interval = 0.001F; //步進(jìn)刻度,值越小越精確(必須大小0),但速度也越慢 
  PointF o = new PointF(this.pictureBox1.Width / 2, this.pictureBox1.Height / 2); 
  e.Graphics.DrawLine(Pens.Red, 0, this.pictureBox1.Height / 2, this.pictureBox1.Width, this.pictureBox1.Height / 2); 
  e.Graphics.DrawLine(Pens.Red, this.pictureBox1.Width / 2, 0, this.pictureBox1.Width / 2, this.pictureBox1.Height); 
  e.Graphics.DrawString("O", font, brush, o); 
  if (type1 == 0) 
  ...{ 
  for (d = -6.28F; d < 6.28F; d += interval) 
  ...{ 
  x1 = o.X + d * unit; 
  x2 = o.X + (d + interval) * unit; 
  y1 = o.Y - (float)(unit * System.Math.Sin(d)); 
  y2 = o.Y - (float)(unit * System.Math.Sin(d + interval)); 
  p1 = new PointF(x1, y1); 
  p2 = new PointF(x2, y2); 
  e.Graphics.DrawLine(Pens.Black, p1, p2); 
  } 
  } 
  else if (type1 == 1) 
  ...{ 
  //set1(); 
  PointF o1 = new PointF(this.pictureBox1.Width/2, this.pictureBox1.Height / 4); 
  e.Graphics.DrawString("1", font, brush, o1); 


  if (type2 == 1) 
  ...{ 
  for (d = 0; d < a; d += interval) 
  ...{ 
  x1 = o.X + d * unit; 
  x2 = o.X + (d + interval) * unit; 
  y1 = o.Y - (float)(this.pictureBox1.Height / 4); 
  y2 = o.Y - (float)(this.pictureBox1.Height / 4); 
  p1 = new PointF(x1, y1); 
  p2 = new PointF(x2, y2); 
  e.Graphics.DrawLine(Pens.Black, p1, p2); 
  tempx = x2; 
  tempy = this.pictureBox1.Height/2; 
  } 
  PointF o2 = new PointF(tempx, tempy); 
  e.Graphics.DrawString(a.ToString(), font, brush, o2); 
  } 
  else if (type2 == 2) 
  ...{ 
  for (d = a; d < 2*a; d += interval) 


  ...{ 
  x1 = o.X + d * unit; 
  x2 = o.X + (d + interval) * unit; 
  y1 = o.Y - (float)(this.pictureBox1.Height / 4); 
  y2 = o.Y - (float)(this.pictureBox1.Height / 4); 
  p1 = new PointF(x1, y1); 
  p2 = new PointF(x2, y2); 
  e.Graphics.DrawLine(Pens.Blue, p1, p2); 
  } 
  PointF o2 = new PointF(tempx, tempy); 
  e.Graphics.DrawString(a.ToString(), font, brush, o2); 
  } 
  else if (type2 == 3) 
  ...{ 
  for (d = a; d  
  ...{ 
  x1 = o.X + d * unit; 
  x2 = o.X + (d + interval) * unit; 
  y1 = o.Y - (float)(this.pictureBox1.Height / 4); 


  y2 = o.Y - (float)(this.pictureBox1.Height / 4); 
  p1 = new PointF(x1, y1); 
  p2 = new PointF(x2, y2); 
  e.Graphics.DrawLine(Pens.Blue, p1, p2); 
  } 
  PointF o2 = new PointF(tempx, tempy); 
  e.Graphics.DrawString(a.ToString(), font, brush, o2); 
  } 
  } 
  else if (type1 == 2) 
  ...{ 
  //set2(); 
  PointF o1 = new PointF(this.pictureBox1.Width/2, this.pictureBox1.Height / 4); 
  e.Graphics.DrawString("1", font, brush, o1);

相關(guān)文章

  • 深入解析C#中的async和await關(guān)鍵字

    深入解析C#中的async和await關(guān)鍵字

    C#語言中的async和await關(guān)鍵字使得編寫異步代碼變得更加簡(jiǎn)潔和易讀,本文將深入解析C#中的async和await,幫助您更好地理解它們的工作原理和用法,,需要的朋友可以參考下
    2024-05-05
  • C#使用FileStream復(fù)制一個(gè)任意文件

    C#使用FileStream復(fù)制一個(gè)任意文件

    這篇文章主要為大家詳細(xì)介紹了C#使用FileStream復(fù)制一個(gè)任意文件,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下
    2019-05-05
  • C#科學(xué)繪圖之使用scottPlot繪制多個(gè)圖像

    C#科學(xué)繪圖之使用scottPlot繪制多個(gè)圖像

    ScottPlot是基于.Net的一款開源免費(fèi)的交互式可視化庫,支持Winform和WPF等UI框架,本文主要為大家詳細(xì)介紹了如何使用scottPlot實(shí)現(xiàn)繪制多個(gè)圖像,需要的可以參考下
    2023-12-12
  • C# 匿名方法基礎(chǔ)回顧

    C# 匿名方法基礎(chǔ)回顧

    本篇文章主要介紹了C#的匿名方法的參數(shù)使用范圍以及委托示例。具有一定的參考價(jià)值,下面跟著小編一起來看下吧
    2017-01-01
  • 淺談Visual C#進(jìn)行圖像處理(讀取、保存以及對(duì)像素的訪問)

    淺談Visual C#進(jìn)行圖像處理(讀取、保存以及對(duì)像素的訪問)

    本文主要介紹利用C#對(duì)圖像進(jìn)行讀取、保存以及對(duì)像素的訪問等操作,介紹的比較簡(jiǎn)單,希望對(duì)初學(xué)者有所幫助。
    2016-04-04
  • 詳解C# 結(jié)構(gòu)體

    詳解C# 結(jié)構(gòu)體

    這篇文章主要介紹了C# 結(jié)構(gòu)體的的相關(guān)資料,文中示例代碼非常細(xì)致,幫助大家更好的理解和學(xué)習(xí),感興趣的朋友可以了解下
    2020-06-06
  • 不用IDE寫C#的Hello World的方法

    不用IDE寫C#的Hello World的方法

    這篇文章主要介紹了不用IDE寫C#的Hello World的方法,文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下
    2015-10-10
  • 簡(jiǎn)單實(shí)現(xiàn)winform編輯器

    簡(jiǎn)單實(shí)現(xiàn)winform編輯器

    這篇文章主要教大家如何簡(jiǎn)單實(shí)現(xiàn)winform編輯器,功能很簡(jiǎn)單,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下
    2017-08-08
  • C#實(shí)現(xiàn)系統(tǒng)托盤通知的方法

    C#實(shí)現(xiàn)系統(tǒng)托盤通知的方法

    這篇文章主要介紹了C#實(shí)現(xiàn)系統(tǒng)托盤通知的方法,涉及C#系統(tǒng)api調(diào)用的相關(guān)技巧,需要的朋友可以參考下
    2015-06-06
  • 如何使用C#中的Lazy的使用方法

    如何使用C#中的Lazy的使用方法

    這篇文章主要介紹了如何使用C#中的Lazy的使用方法,文中通過示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧
    2021-01-01

最新評(píng)論

阿图什市| 汤原县| 华阴市| 离岛区| 蛟河市| 庐江县| 昌邑市| 阿城市| 嘉定区| 娄烦县| 乡城县| 九江市| 双辽市| 陕西省| 天津市| 洪泽县| 海宁市| 武汉市| 蓬溪县| 临夏县| 秀山| 沁源县| 兰考县| 仪征市| 福海县| 敦化市| 获嘉县| 安吉县| 淳安县| 天峨县| 三门县| 洛扎县| 三台县| 莎车县| 墨竹工卡县| 师宗县| 翁牛特旗| 太康县| 前郭尔| 绥滨县| 望城县|