亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? contour.java

?? java 作圖的程序
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
package graph;import java.awt.*;import java.applet.*;import java.net.URL;import java.util.*;import java.io.InputStream;/*******************************************************************************    Class  Contour******************************************************************************    Copyright (C) 1996 Leigh Brookshaw****    This program is free software; you can redistribute it and/or modify**    it under the terms of the GNU General Public License as published by**    the Free Software Foundation; either version 2 of the License, or**    (at your option) any later version.****    This program is distributed in the hope that it will be useful,**    but WITHOUT ANY WARRANTY; without even the implied warranty of**    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the**    GNU General Public License for more details.****    You should have received a copy of the GNU General Public License**    along with this program; if not, write to the Free Software*    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.****************************************************************************** This class extends the interactive graphics class to incorporate** contours.***************************************************************************//** * This class extends the interactive graphics class G2Dint to incorporate * contouring. * * @version  $Revision: 1.11 $, $Date: 1996/08/12 23:37:08 $. * @author   Leigh Brookshaw */public class Contour extends G2Dint {/******************* Constants***************/	/***   The minimum length of a curve before it gets a label*/	 static final int MINCELLS = 30;/***   Default number of contour levels*/	 static final int NLEVELS = 12;	 /************************** Protected Variables*************************/	 /** *   Dimension of the contour grid in the X direction */     protected int nx;/** *   Dimension of the contour grid in the Y direction */     protected int ny;/** *   Vector array containing the Contour curves. *   Each index in the array contains curves at a given *   contour level */     protected Vector curves[];/** *   If set the class calculates the contour levels based on *   the data minimum and maximum. Default value <i>true</i>. */     protected boolean autoLevels;/* *   If true the contour levels are calculated in *   logarithmic intervals */     protected boolean logLevels;/* *   If true the limits of the plot are the limits of the *   data grid not the limits of the contours! */     protected boolean gridLimits;/* *   The array of contour levels */     protected double levels[];/** *   The label for each contour level */     protected TextLine labels[];/** *   Font to use in drawing Labels */     protected Font labelfont;/** *   Color to use in drawing Labels */     protected Color labelcolor;/** *   Style to use in drawing Labels. TextLine.SCIENTIFIC or *   TextLine.ALGEBRAIC. */     protected int labelStyle;/** *   Precision to use in drawing Labels. */     protected int labelPrecision;/** *   Number of Significant figures to use in drawing Labels. */     protected int labelSignificant;/** *   Which levels will get labels. If it is equal to 1 every level *   gets a label, equal to 2 every second level etc. If it is equal to 0 *   no labels are displayed.    */     protected int labelLevels;/** *   If false labels are not drawn */     protected boolean drawlabels;/** *   If true the labels will be calculated for each *   contour level. These might not look all that hot. */     protected boolean autoLabels; /**  *  Color to draw non labelled contour line  */     protected Color contourColor; /**  *  Color to draw labelled contour line  */     protected Color labelledColor; /** *   The data grid, a 2D array stored in linear form. *   It is assumed that [0,0] is the bottom left corner *   and the data is ordered by row. */     protected double grid[];/** *   The X minimum limit of the data grid */     protected double xmin;/** *   The X maximum limit of the data grid */     protected double xmax;/** *   The Y minimum limit of the data grid */     protected double ymin;/** *   The Y maximum limit of the data grid */     protected double ymax;/** *   The minimum value of the grid values */     protected double zmin;/** *   The maximum value of the grid values */     protected double zmax;  /**   * Boolean value if true Contours will not be calculated   */     public boolean noContours = false;/********************** Constructors******************/  /**   * Instantaite the class   */     public Contour() {           grid = null;           xmin = 0.0;           xmax = 0.0;           ymin = 0.0;           ymax = 0.0;           zmin = 0.0;           zmax = 0.0;           nx = 0;           ny = 0;           levels = new double[NLEVELS];           labels = new TextLine[NLEVELS];           autoLevels  = true;           logLevels   = false;           gridLimits  = false;           autoLabels  = true;           labelfont   = new Font("Helvetica",Font.PLAIN,12);           labelcolor  = Color.blue;           labelLevels = 1;           labelStyle       = TextLine.ALGEBRAIC;           labelPrecision   = 2;           labelSignificant = 3;           drawlabels = true;           contourColor  = null;           labelledColor = null;           curves = null;     }/***************** Methods*************/  /**   *  Load the grid to contour from a URL. There are 2 formats for the data   *  optionally the limits of the grid can be parsed.<BR>   *  <PRE>   *  The expected format of the data    *           1st Number:   nx   *           2nd Number:   ny   *           nx*ny numbers following   *   *  Optionally   *           1st Number:   nx   *           2nd Number:   ny   *           3rd Number:   xmin   *           4th Number:   xmax   *           5th Number:   ymin   *           6th Number:   ymax   *           nx*ny numbers following   *  </PRE><BR>   *  If xmin, xmax, ymin, ymax are not specified they are assumed   *  to be [1.0,nx,1.0,ny]   *   * @param file URL of the file to load   * @return <i>true</I> of the load was successful.   *   */    public boolean loadGrid( URL file) {           byte b[] = new byte[50];           int nbytes = 0;           int max  = 100;           int inc  = 100;           int n    = 0;           double data[] = new double[max];           InputStream is = null;           boolean comment    = false;           int c;           try {                 is = file.openStream();                 while( (c=is.read()) > -1 ) {                                          switch (c) {                                              case '#':                                    comment = true;                                    break;                         case '\r': case '\n':                                    comment = false;                         case ' ': case '\t':                                if( nbytes > 0 ) {                                   String s = new String(b,0,0,nbytes);                                   data[n] = Double.valueOf(s).doubleValue();                                   n++;                                   if( n >= max ) {                                       max += inc;                                       double d[] = new double[max];                                       System.arraycopy(data, 0, d, 0, n);                                       data = d;                                   }                                   nbytes = 0;                                }                                break;                         default:                                   if( !comment ) {                                        b[nbytes] = (byte)c;                                        nbytes++;                                   }                                   break;                      }                  }                if (is != null) is.close();        } catch(Exception e) {          System.out.println("Failed to load Grid from file ");          e.printStackTrace();          if (is != null) try { is.close(); } catch (Exception ev) { }          return false;        }        if(n < 1 ) {           System.out.println("Failed to load Grid from file ");           return false;	 }        nx = (int)(data[0] + 0.5);        ny = (int)(data[1] + 0.5);        if( n == nx*ny+6 ) {            xmin = data[2];            xmax = data[3];            ymin = data[4];            ymax = data[5];            grid = new double[nx*ny];            System.arraycopy(data, 6, grid, 0, nx*ny);	} else         if( n == nx*ny+2 ) {            xmin = 1.0;            xmax = (double)(nx);            ymin = 1.0;            ymax = (double)(ny);                    grid = new double[nx*ny];            System.arraycopy(data, 2, grid, 0, nx*ny);	} else {            System.out.println("Error loading grid, Wrong number of points ");            grid = null;            return false;	  }        zrange();        calcLevels();        detachCurves();        curves = null;        return true;             }       /**   *  Set the range of the grid   * @param xmin Minimum X value   * @param xmax Maximum X value   * @param ymin Minimum Y value   * @param ymax Maximum Y value   */     public void setRange(double xmin,double xmax,double ymin,double ymax) {            if( xmin >= xmax || ymin >= ymax ) return;            this.xmin = xmin;            this.xmax = xmax;            this.ymin = ymin;            this.ymax = ymax;     }  /**   *  Return the range of the grid   * @return An array contining xmin,xmax,ymin,ymax.   */     public double[] getRange() {            double d[] = new double[4];            d[0] = xmin;            d[1] = xmax;            d[2] = ymin;            d[3] = ymax;            return d;      }  /**   *  return the dimensions of the grid   * @return An array containing the number of columns, number of rows.   */     public int[] getDim() {            int i[] = new int[2];                     i[0] = nx;            i[1] = ny;            return i;      }  /**   *  Return the grid   * @return An array of size nx by ny contining the data grid.   */     public double[] getGrid() { return grid; }  /**   * Manually set the contour levels.   * @param levels An array containing the contour levels   * @param nl The number of contour levels in the arrray   */     public void setLevels(double levels[], int nl) {           int i;           if( levels == null || nl <= 0 ) return;           detachCurves();           curves = null;           autoLevels = false;           this.levels = new double[nl];                      System.arraycopy(levels,0,this.levels,0,nl);           labels = new TextLine[nl];           for(i=0; i<labels.length; i++) {             labels[i] = new TextLine( String.valueOf( (float)levels[i] ) );           }      }  /**   * Manually set the Contour labels.   * @param labels An array containing the labels.   * @param nl Number of labels in the Array.   */     public void setLabels(TextLine labels[], int nl) {           if( labels == null || nl <= 0 ) return;           autoLabels = false;           this.labels = new TextLine[nl];                      System.arraycopy(labels,0,this.labels,0,nl);     }  /**   * Set the font to be used with All the labels   * @param f Font   */     public void setLabelFont(Font f) {           labelfont = f;     }  /**   * Set the Color to be used with all the labels.   * @param c Color   */     public void setLabelColor(Color c) {           labelcolor = c;     }       /**   *  Set the grid to be contoured.   * @param grid Array of values   * @param nx   Number of columns   * @param ny   Number of rows   */     public void setGrid(double grid[],int nx,int ny) {        this.grid = grid;        this.nx   = nx;        this.ny   = ny;        zrange();        calcLevels();     }  /**   * Delete all the Contours   */     public void deleteContours() {          if(curves == null) return;          detachCurves();          curves = null;     }  /**   * Detach contours so that they will not be plotted.   */     public void detachContours() {          if(curves == null) return;          detachCurves();     }  /**   * Attach contours so that they will be plotted.   */     public void attachContours() {          if(curves == null) return;          attachCurves();     }       /**

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美视频一区二区三区四区| 色欧美乱欧美15图片| 亚洲视频1区2区| 91精品视频网| 91一区二区三区在线观看| 麻豆精品新av中文字幕| 夜夜精品视频一区二区| 国产欧美精品日韩区二区麻豆天美| 精品视频在线视频| av不卡免费电影| 国产美女精品一区二区三区| 日本欧美肥老太交大片| 亚洲综合免费观看高清在线观看| 日本一区二区三区国色天香| 欧美一区二区三级| 欧美亚洲图片小说| 91网址在线看| 成人免费看黄yyy456| 国产麻豆午夜三级精品| 久久国产尿小便嘘嘘尿| 天天操天天干天天综合网| 樱桃国产成人精品视频| 亚洲国产成人一区二区三区| 精品国产乱码久久久久久老虎| 欧美亚洲高清一区| 色综合久久久久久久久久久| 成人性生交大片免费看在线播放| 精品一区二区三区日韩| 蜜臂av日日欢夜夜爽一区| 日本aⅴ精品一区二区三区 | 国产亚洲视频系列| 欧美成va人片在线观看| 91精品国产综合久久精品麻豆 | 亚洲一级片在线观看| 亚洲欧美视频在线观看| 中文字幕亚洲一区二区av在线| 国产欧美一区二区三区在线看蜜臀 | 亚洲激情一二三区| 国产精品福利一区二区三区| 中文字幕第一区二区| 国产欧美日产一区| 国产精品久久久久久久裸模| 国产精品丝袜黑色高跟| 国产午夜精品一区二区三区四区| 久久久久99精品国产片| 国产欧美视频在线观看| 久久精品视频在线免费观看| 久久久久久久久久久久久久久99 | 26uuu国产一区二区三区| 精品久久久久久久一区二区蜜臀| 日韩精品一区二区三区三区免费 | 色先锋aa成人| 欧美伊人精品成人久久综合97 | 亚洲欧美日韩一区二区三区在线观看| 亚洲欧洲一区二区在线播放| 成人免费小视频| 亚洲综合丝袜美腿| 日韩国产精品大片| 精品中文av资源站在线观看| 国产一区二区网址| 99精品1区2区| 欧美日韩黄色一区二区| 日韩欧美国产综合一区| 国产女主播在线一区二区| 国产精品短视频| 午夜精品视频一区| 狠狠网亚洲精品| 99精品国产视频| 欧美日韩精品一区二区| 精品久久一区二区| 亚洲欧洲日韩在线| 午夜伦欧美伦电影理论片| 久久精品国产精品亚洲红杏| 成人午夜视频免费看| 欧美综合一区二区| 欧美电视剧在线看免费| 中文字幕一区二区视频| 天天色综合成人网| 国产**成人网毛片九色 | 天堂精品中文字幕在线| 国产乱对白刺激视频不卡| 91首页免费视频| 在线综合亚洲欧美在线视频| 久久久久久久久蜜桃| 亚洲国产欧美日韩另类综合| 国产一区二区h| 欧洲一区二区av| 久久久久久久久免费| 亚洲成人中文在线| 国产91精品一区二区麻豆网站 | 精品日韩一区二区三区免费视频| 中文字幕欧美日韩一区| 舔着乳尖日韩一区| 成av人片一区二区| 日韩美女主播在线视频一区二区三区 | 蜜臀久久99精品久久久画质超高清| 成人少妇影院yyyy| 欧美一二三在线| 一区二区三区在线观看动漫| 国产乱理伦片在线观看夜一区| 欧美日韩国产影片| 中文字幕佐山爱一区二区免费| 国产最新精品精品你懂的| 欧美日韩一卡二卡三卡 | 国产亚洲欧美日韩在线一区| 午夜久久久影院| 91亚洲精品久久久蜜桃| 国产亚洲精品aa| 乱中年女人伦av一区二区| 日本伦理一区二区| 国产精品传媒视频| 国内精品写真在线观看| 日韩女优毛片在线| 婷婷开心激情综合| 在线观看免费一区| 亚洲色图在线看| 成人听书哪个软件好| 久久综合精品国产一区二区三区 | 欧美日韩的一区二区| 亚洲色图欧美激情| 成人高清免费在线播放| 久久精品视频网| 国产一区高清在线| 欧美www视频| 日本免费在线视频不卡一不卡二| 欧美在线免费视屏| 亚洲精品ww久久久久久p站| 99久久精品费精品国产一区二区| 欧美激情中文不卡| 国产·精品毛片| 国产精品看片你懂得| 成人手机电影网| 亚洲欧洲99久久| 色播五月激情综合网| 一区二区三区在线影院| 色吊一区二区三区| 亚洲h在线观看| 欧美精品日韩一区| 男人的天堂亚洲一区| 日韩免费看网站| 国产麻豆一精品一av一免费| 国产欧美日韩另类视频免费观看| 东方aⅴ免费观看久久av| 亚洲国产精品传媒在线观看| 波多野结衣在线一区| 日韩毛片高清在线播放| 一本色道久久综合亚洲aⅴ蜜桃 | 秋霞成人午夜伦在线观看| 日韩视频国产视频| 国产在线播放一区二区三区| 欧美激情一区二区三区不卡| 99riav久久精品riav| 亚洲成人手机在线| 99久久99久久精品免费观看 | 91福利在线观看| 91在线精品一区二区| 99久久精品免费看国产 | 亚洲va欧美va人人爽| 国产精品欧美经典| 国产欧美精品一区| 91亚洲永久精品| 日韩精品一区第一页| 欧美大片在线观看一区二区| 国产酒店精品激情| 久久久99精品久久| 91亚洲精品久久久蜜桃| 日韩制服丝袜av| 久久久亚洲精品一区二区三区 | 欧美日韩精品综合在线| 狠狠久久亚洲欧美| 亚洲人成网站色在线观看| 欧美日本不卡视频| 国产高清成人在线| 一区二区三区免费看视频| 日韩一卡二卡三卡四卡| 国产精品一区二区久久不卡| 亚洲精品乱码久久久久久黑人| 91精品国产乱| 成人午夜电影久久影院| 日韩一区精品视频| 蜜桃久久av一区| 欧美日韩一级黄| 成人毛片老司机大片| 偷拍一区二区三区四区| 国产免费成人在线视频| 欧美日韩一区视频| 成人性色生活片免费看爆迷你毛片| 亚洲第一电影网| 国产精品伦理一区二区| 欧美一级国产精品| 91精品欧美一区二区三区综合在 | 欧美国产视频在线| 欧美精选在线播放| av一区二区三区| 国产一区二区三区免费播放| 亚洲第一电影网| 亚洲日本va在线观看| 国产日韩欧美精品在线| 欧美一级日韩一级| 欧洲精品视频在线观看|