亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
国产精品国产三级国产aⅴ入口| 欧美日韩一区二区三区四区五区 | 日韩成人免费电影| 欧美日韩中文字幕一区二区| 亚洲国产sm捆绑调教视频| 67194成人在线观看| 国产一区二区三区在线观看精品 | 日韩精品影音先锋| 国产在线一区二区| 国产精品第一页第二页第三页| 色婷婷久久99综合精品jk白丝| 亚洲国产精品视频| 久久奇米777| 色综合网站在线| 免费观看在线色综合| 欧美激情一区二区三区四区| 欧美做爰猛烈大尺度电影无法无天| 视频一区在线播放| 久久久91精品国产一区二区精品| 成人黄色片在线观看| 国产亚洲精品aa午夜观看| 日日摸夜夜添夜夜添国产精品| 精品国产91久久久久久久妲己| 国产一区欧美一区| 国产精品久久久久影院亚瑟| 在线免费观看一区| 免费人成精品欧美精品| 国产午夜精品久久久久久免费视 | 一区二区三区免费看视频| 欧美亚洲国产bt| 99麻豆久久久国产精品免费| 欧美肥妇毛茸茸| 精品一区二区免费在线观看| 国产亚洲成aⅴ人片在线观看| 99综合电影在线视频| 亚洲最大的成人av| 日韩午夜激情视频| eeuss鲁片一区二区三区在线观看 eeuss鲁片一区二区三区在线看 | 欧美成人三级电影在线| 成人福利视频网站| 偷窥少妇高潮呻吟av久久免费| 精品久久一二三区| 欧美制服丝袜第一页| 日韩高清中文字幕一区| 中文字幕在线不卡一区| 91精品国产麻豆国产自产在线 | 成人做爰69片免费看网站| 一区二区三区国产| 亚洲精品在线观看视频| 一本一道综合狠狠老| 久久国产麻豆精品| 成人欧美一区二区三区白人 | 中文字幕av资源一区| 欧美高清视频不卡网| 国产综合色视频| 天天综合网天天综合色| 中文字幕免费不卡| 欧美成人午夜电影| 欧美日韩精品一区二区| 大陆成人av片| 激情另类小说区图片区视频区| 亚洲男人的天堂av| 国产片一区二区三区| 3d成人h动漫网站入口| 95精品视频在线| 免费xxxx性欧美18vr| 国产精品卡一卡二卡三| 欧美视频第二页| 日本精品视频一区二区三区| 国产一区日韩二区欧美三区| 男女视频一区二区| 亚洲国产日韩综合久久精品| 亚洲视频小说图片| 亚洲国产精品二十页| 精品毛片乱码1区2区3区 | 欧美日韩成人在线| av午夜一区麻豆| 国产91精品久久久久久久网曝门| 精品一区二区在线观看| 蜜桃av一区二区在线观看| 石原莉奈在线亚洲二区| 国产精品的网站| 国产欧美日韩亚州综合| 日韩欧美一区二区久久婷婷| 欧美欧美欧美欧美| 欧美日韩久久久久久| 欧美日韩精品免费| 欧美午夜精品免费| 欧美日韩精品一二三区| 欧美综合亚洲图片综合区| 91国偷自产一区二区使用方法| 床上的激情91.| 成人看片黄a免费看在线| 懂色av噜噜一区二区三区av| 国产精品一线二线三线精华| 国产精品一级在线| 国产91丝袜在线播放| 国产99久久久精品| eeuss鲁一区二区三区| 91网上在线视频| 欧美亚洲国产怡红院影院| 欧美亚洲一区二区在线| 91精品国产综合久久精品麻豆| 日韩视频123| 久久精品视频在线看| 国产精品久久久爽爽爽麻豆色哟哟| 国产精品妹子av| 亚洲视频在线一区观看| 亚洲在线观看免费| 青青草精品视频| 国产美女久久久久| 91一区在线观看| 久久网站最新地址| 国产精品大尺度| 亚洲一二三专区| 日日夜夜精品视频免费| 国产成人一级电影| 色婷婷一区二区三区四区| 欧美日韩大陆一区二区| 欧美成人国产一区二区| 欧美国产精品中文字幕| 一区二区三区成人| 久久精品国产秦先生| 成人精品国产免费网站| 精品国产乱子伦一区| 国产欧美一区二区精品秋霞影院| 亚洲视频一区在线观看| 亚洲高清三级视频| 国产毛片精品国产一区二区三区| 不卡av电影在线播放| 3d动漫精品啪啪一区二区竹菊 | 91免费视频大全| 欧美电视剧免费全集观看| 国产精品网站在线播放| 日本欧美一区二区三区| 成人黄色免费短视频| 在线视频你懂得一区| 欧美大片在线观看| 久久久高清一区二区三区| 五月天激情小说综合| 精品在线免费观看| 色婷婷av一区二区三区软件| 精品久久久久久久久久久院品网 | 亚洲国产日日夜夜| 国产成人亚洲综合a∨婷婷| 欧美日本一区二区在线观看| 国产喷白浆一区二区三区| 亚洲亚洲人成综合网络| 国产在线观看一区二区| 一本大道久久a久久综合| 国产精品麻豆一区二区 | 欧美大片在线观看一区二区| 亚洲免费观看高清完整版在线观看| 久久国内精品自在自线400部| www.欧美.com| 久久综合色8888| 日韩精品一级中文字幕精品视频免费观看 | 美日韩一区二区三区| 久久综合一区二区| 亚洲伊人伊色伊影伊综合网| 夫妻av一区二区| 久久亚区不卡日本| 日本不卡一二三区黄网| 欧美中文字幕一区| 亚洲免费视频成人| 91在线你懂得| 亚洲欧洲三级电影| 国产美女娇喘av呻吟久久| 日韩午夜在线观看视频| 日韩中文字幕亚洲一区二区va在线 | 欧美精品色一区二区三区| 亚洲欧洲综合另类在线| 国产suv一区二区三区88区| 精品国产污网站| 奇米777欧美一区二区| 欧美精品日韩精品| 日韩国产成人精品| 欧美人xxxx| 性做久久久久久免费观看| 在线观看不卡视频| 亚洲一区二区三区国产| 在线观看一区不卡| 亚洲五月六月丁香激情| 欧美性受xxxx| 亚洲成人av福利| 8x8x8国产精品| 免费视频一区二区| 欧美一区二区二区| 一区二区三区日韩精品| 欧美手机在线视频| 午夜影院久久久| 日韩欧美中文一区| 精品一区二区三区免费播放| 精品久久久久久无| 国产精品2024| 亚洲色图自拍偷拍美腿丝袜制服诱惑麻豆| 国产高清一区日本| 国产精品久久久久久久久久久免费看| 成人激情黄色小说| 一区二区成人在线|