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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? roboproto.java

?? 一個由c轉成java的3D robot 仿真平臺
?? JAVA
?? 第 1 頁 / 共 5 頁
字號:
/************************************************************************//* File: ~/sopra/RoboPackII/RoboProto.java                              *//* This file consists of the main class which includes the user 	*//* interface and holds the specific values of the robot.		*//* The most important methods are also part of this file.		*//************************************************************************/package RoboPackII;import java.awt.*;import java.io.RandomAccessFile;import java.io.IOException;import java.applet.Applet;import java.net.MalformedURLException;import java.net.URL;public class RoboProto extends Applet{            // Constants:	private final double[][] realRobRestr =   // realRobotRestrictions	  { {  -0.88, 0.9  },     //angle1	    {  -2.38, -0.82},     //angle2	    { -0.686, 0.406},	  //angle3      	    {      0, 0    },     // useful dummy	    { -0.698, 0.698} };	  //angle4      	// Declaration of the graphics constants:	public final static int numberOfPoints = 154;	public final static int numberOfEdges = 211;	public final static int numberOfAreas = 100;			//Declaration of the variables specifying the robot:	public AreasPointsList[] apl = new AreasPointsList[numberOfAreas];	public Points light = null;	public long[][] colorTable = new long[7][31];	public double[] linkLengths = new double[4];	public int[] angleWeights = new int[6]; 	public int[] power = new int[6];	public AngleDates[] angles = new AngleDates[6];	public Points[] line = new Points[2];	public Edges gkl = null;	public int[] rpl = new int[14];	public Points[] coorpl = new Points[4];	public Edges coorc[] = new Edges[3];	public Points[] pl = new Points[numberOfPoints];	public Points[] PL = new Points[numberOfPoints];//vertices of the robot	public Edges[] el = new Edges[numberOfEdges];   //edges of the robot	public Areas[] al = new Areas[numberOfAreas];	private boolean robotIsReal = false; // signifies whether the existing					     // robot is simulated	public double[] target = { 0, 0, 0 };// for the auto control	// Some strange, but nevertheless needed variables:	private int errorcode, reminder, steps, stepNumber;	private double angleX, angleY, d, x, y, z, s_wx, h;	private double[] input = new double[9];	private double[] location = new double[3];	private double[] pos = new double[3];	private double[] angleNew = new double[6], angleOld = new double[6];	private double[] hw = new double[6];	private double[] wB = new double[6];	private double[] wE = new double[6];	private int n;	private int indx = -1;        public boolean crashIsActive = false;	private double[] locationNew = new double[3];	public Points[] BListe = new Points[361];	public short f_Z_B = 0;    	public short  f_Z_R = 0;	public int akt = 0;	public int errvariable = 0;	public short fFile = 0;	private double[][] T = new double[3][4];	private Points p1 = new Points(), p2 = new Points();	private int fAutoLine = 0;	private double m, mdiff, distance;	private boolean[] anglesLeftExtreme = { false, false, false, false,					        false, false };		// signifies whether the minimum of an angle had been reached	// Variables for the saving and loading of positions:	public double[][] savedAngles = new double[4][7];	private Button[] storeButtons = { new Button("Def.Init "),					  new Button("Def.Pos.1"),					  new Button("Def.Pos.2"), 					  new Button("Def.Pos.3") };	private Button[] loadButtons = { new Button("Go Init"),					 new Button("Go Pos.1"),					 new Button("Go Pos.2"),					 new Button("Go Pos.3") }; 		// Declaration of the user interface variables:		private Font headerFont = new Font("TimesRoman", Font.BOLD, 14);	public Canvas roboCanvas = new Canvas();	public final int canvasSize = 500; // as in the original program	public ThreeD animation = new ThreeD(roboCanvas, this);	  // the animation has to be started after the roboCanvas gets resized		public int xControl = 25; //controls the speed	private Scrollbar speedScroll = new Scrollbar(Scrollbar.HORIZONTAL, 					 		xControl, 10, 1, 82); 	   // 'speedScroll' represents 1 to 82	public boolean megaSpeed = true;// if 'megaSpeed' is true, the double					 // buffering is omitted        public  float zoomValue = 1.5f; // should be between 0.1 and 3.5	private final int zoomScrollScale = 100;	private Scrollbar zoomScroll = new Scrollbar(Scrollbar.HORIZONTAL, 			       (int)(zoomScrollScale * zoomValue), 10, 0, 350);	  // 'zoomScrollScale' times the representing value           	private Panel belowP = new Panel();	private Panel leftP = new Panel();	private Panel rightP = new Panel();	private Panel upP = new Panel();	private Button exampleButton = new Button("Example");	private Scrollbar[] manualScrolls = new Scrollbar[6]; 	private Label[] manualLabels = new Label[6];	private final int manualScrollScale = 30;		// ... * 30, so that the control is more sensitive	private Scrollbar[] linkScrolls = new Scrollbar[3];	private Label[] linkLabels = new Label[3];	private Label linkHeader = new Label("Linklengths:");	private Button linkExec = new Button("e x e c u t e");	private final double[] linkMax = { 15.0, 15.0, 15.0 };	private final double[] linkMin = { 4.5, 2.5, 2.5 };	private final int linkScrollScale = 30; 		private Scrollbar[] autoScrolls = new Scrollbar[3];	private Label[] autoLabels = new Label[3];	private final int autoScrollScale = 20;	private final int autoScrollRange = 50;        private Label autoHeader = new Label("Inverse Kinematics:");	private final String onLine = new String("Move on a straight line");	private final String notOnLine = new String("Move on arbitrary way");	private Choice lineButton = new Choice();	private Button autoExecButton = new Button("e x e c u t e");	private static ErrorWindow errWin = null;//the object instanciated in 					  // 'writeError'	private static Win helpWin = null; // the help / about text are shown	private static Win aboutWin = null;// in these windows		private Choice hand = new Choice();	private Label handLabel = new Label("Hand");	private Scrollbar handScroll = new Scrollbar(Scrollbar.HORIZONTAL, 			                 0, 10, 0, 50);//represents 0 to 1	private final int handScrollScale = 100;	private double handValue = 0.0;// must be between 0.0 and 0.5				// 0.5 is fully closed and 0.0 open	private boolean showTheMove = true; // necessary for the "hand move"	private CheckboxGroup whichRobotGroup = new CheckboxGroup();	private Checkbox realRobot = new Checkbox("Real Robot", 					whichRobotGroup, false);	private Checkbox virtualRobot = new Checkbox("Virtual Robot", 					whichRobotGroup, true);	private Button fileButton = new Button("Open File");	private final String teachStr = new String("Teach");	private final String enterStr = new String("Enter");	private Button teachButton = new Button(teachStr);	private Button stopButton = new Button("Stop");	private RandomAccessFile saveFile = null;	private TextField[] weightsText = new TextField[6];	private Button weightsExec = new Button("e x e c u t e");	private Button helpButton = new Button("Help");	private Button aboutButton = new Button("About");        private String netscape = new String("netscape");	 			public void init()    	{	   for (int i = 0; i < 6; i++)	     manualLabels[i] = new Label("  ");	   for (int i = 0; i < 3; i++)	     {	       linkLabels[i] = new Label("  ");	       autoLabels[i] = new Label("  ");	     }  // instanciation of the label-arrays	   Label manualHeader = new Label("Forward Kinematics:");	   manualHeader.setFont(headerFont);	   linkHeader.setFont(headerFont);	   autoHeader.setFont(headerFont);		   RobotInit.now(this); // the robot specific variables get its values	   setLayout(new BorderLayout());	   // Definition of the 'roboCanvas':	   roboCanvas.resize(canvasSize, canvasSize);	   roboCanvas.setBackground(new Color(200, 200, 200));// a nice gray 	   add("Center", roboCanvas);	   // Defintion of the 'upP'anel:	   	   upP.setLayout(new FlowLayout()); 	   upP.add(helpButton);	   Label title = new Label("RoboSim - A Robot Manipulator Simulator");	   Font titleFont = new Font("TimesRoman", Font.ITALIC, 30);	   title.setFont(titleFont);	   upP.add(title);	   upP.add(aboutButton);	   add("North", upP);	   	   	   // Definition of the 'leftP'anel:	   leftP.setLayout(new GridLayout(33, 1, 10, 1));	   leftP.add(manualHeader);	   for (int i = 0; i < 6; i++)	     {		manualScrolls[i] = new Scrollbar(Scrollbar.HORIZONTAL, 			   (int)(manualScrollScale  * angles[i].act),			   10 /* width */, 			   (int)(manualScrollScale * angles[i].min), 			   (int)(manualScrollScale * angles[i].max));		manualScrolls[i].resize(100, 10);		updateManualLabel(i);		leftP.add(manualLabels[i]);		leftP.add(manualScrolls[i]);	   	leftP.add(new Label(""));	     }	   leftP.add(new Label(" ")); // Distance to the next entries	   leftP.add(new Label(" ")); 	   Label speedHeader = new Label("Speed:");	   speedHeader.setFont(headerFont);	   leftP.add(speedHeader);	   leftP.add(new Label("slow           -->                fast"));	   leftP.add(speedScroll); 	   leftP.add(new Label(" ")); // Distance to the next entries	   Label zoomHeader = new Label("Zoom:");	   zoomHeader.setFont(headerFont);	   leftP.add(zoomHeader);	   leftP.add(new Label("out            -->                   in"));	   leftP.add(zoomScroll);  	   leftP.add(new Label(" "));	   handLabel.setFont(headerFont);	   leftP.add(handLabel);	   leftP.add(new Label("open          -->                closed"));	   leftP.add(handScroll);	   add("West", leftP);  	   // Definition of the 'rightP'anel:	   rightP.setLayout(new GridLayout(27, 1, 10, 1));		   rightP.add(autoHeader);  	 	   for (int i = 0; i < 3; i++)	     {		autoScrolls[i] = new Scrollbar(Scrollbar.HORIZONTAL, 			   autoScrollScale * (int)target[i], 10 /* width */,  		           autoScrollScale * (-autoScrollRange), 			   autoScrollScale * autoScrollRange);		autoScrolls[i].resize(100, 10);		updateAutoLabel(i);						rightP.add(autoLabels[i]);		rightP.add(autoScrolls[i]);		if (i != 2) 		  rightP.add(new Label(""));	     }	   actualizeAutoPanel(); // to initialize the default values	   lineButton.addItem(notOnLine);	   lineButton.addItem(onLine);	   rightP.add(lineButton);	   rightP.add(autoExecButton);	   rightP.add(new Label("")); 	   rightP.add(linkHeader); 	   for (int i = 0; i < 3; i++)	     {		linkScrolls[i] = new Scrollbar(Scrollbar.HORIZONTAL, 			   (int)(linkScrollScale * linkLengths[i]), 			   10 /* width */, 			   (int)(linkScrollScale * linkMin[i]), 			   (int)(linkScrollScale * linkMax[i]));		linkScrolls[i].resize(100, 10);		updateLinkLabel(i);						rightP.add(linkLabels[i]);		rightP.add(linkScrolls[i]);	        if (i != 2)		  rightP.add(new Label(""));	     }	   rightP.add(linkExec);	   rightP.add(new Label(" "));	   rightP.add(fileButton); 	   rightP.add(new Label(" "));	   rightP.add(virtualRobot);	   rightP.add(realRobot);  	  	 	  	 	   add("East", rightP);		   // Definition of the 'belowP'anel:	   belowP.setLayout(new GridLayout(2, 12));	   Label weightHeader = new Label("Weights of:");	   weightHeader.setFont(headerFont);	   belowP.add(weightHeader); 	   for (int i = 0; i < 6; i++)	     belowP.add(new Label("Angle " + String.valueOf(i + 1)));	   belowP.add(exampleButton);	   for (int i = 1; i < 4; i++) // storeButton[0] should be irreversible	     belowP.add(storeButtons[i]);		   belowP.add(teachButton);	   belowP.add(weightsExec);	   for (int i = 0; i < 6; i++)	     {	       weightsText[i] = new TextField(String.valueOf(angleWeights[i]));	       belowP.add(weightsText[i]);	     }	   for (int i = 0; i < 4; i++)	     belowP.add(loadButtons[i]);	   stopButton.disable();	   belowP.add(stopButton);	   add("South", belowP);	   // First robot calculations and first painting of the robot:	   AllAboutMoving.copyPointList(PL, pl, this);	   RefDouble refAngleX = new RefDouble(angleX);// reference paramaters	   RefDouble refAngleY = new RefDouble(angleY);// are needed	   RefDouble refD = new RefDouble(d);	   AllAboutMoving.angleCalculation(0.0, 10.0, 26.0, refAngleY, 				refAngleX, refD);	   angleX = refAngleX.in; // the real variables get the new values	   angleY = refAngleY.in;	   d = refD.in;	   location[0] = 0.0; // I don't know, why these initialisations are	   location[1] = 10.0;// not in the init part of this program	   location[2] = 26.0;	   AllAboutMoving.Nvector(pl, al, apl, 0, this); 	   animation.setScale(zoomValue);	   animation.start(); // now the animation can be started, a new thread			      // begins to work	   CinematicCalculations.calculatePos(angles, pos, this);	 	   repaint();	}	public void start()	{ 	   menuEnable();	   repaint();		   repaint();	   repaint();// if java doesn't want to paint the robot	   repaint();	   repaint();	} 	public void stop()	{	  if (errWin != null)	    errWin.dispose(); // tidies up the only window which can be open	}		public void repaint()	{	   animation.repaint();	}	public void menuEnable()	{	   // If another window, which has the panels disabled,is destroyed, 	   // the panels should be enabled by using this method	   if (!leftP.isEnabled()) 	     leftP.enable(); 	   if (!rightP.isEnabled()) 	     rightP.enable();	   if (!belowP.isEnabled()) 	     belowP.enable();	   if (!upP.isEnabled()) 	     upP.enable();	   repaint();	}	public void menuDisable()	{	   upP.disable();	   leftP.disable();	   rightP.disable(); 	   belowP.disable();	}	private double roundTo2(double arg)	{	   return Math.floor(arg * 100) / 100;	}	private String formatTo5(double number)	{

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品无码永久免费888| 色噜噜狠狠成人网p站| 亚洲国产毛片aaaaa无费看 | 天堂蜜桃91精品| 欧美高清在线一区二区| 2017欧美狠狠色| 久久久亚洲精华液精华液精华液| 日韩久久久精品| 亚洲精品一线二线三线| 久久久久99精品一区| 久久先锋影音av鲁色资源 | 国产99精品视频| 丁香天五香天堂综合| av不卡一区二区三区| 在线观看一区二区视频| 在线电影院国产精品| 精品剧情在线观看| 国产精品美女一区二区| 亚洲影院在线观看| 青青草国产精品亚洲专区无| 国产做a爰片久久毛片| 成人app在线观看| 在线精品国精品国产尤物884a| 欧美日本国产视频| 久久女同精品一区二区| 国产精品久久久久影院亚瑟| 亚洲国产日韩一级| 国产一区二区主播在线| 一本久道中文字幕精品亚洲嫩| 欧美久久一二三四区| 国产亚洲成年网址在线观看| 亚洲乱码国产乱码精品精小说| 石原莉奈一区二区三区在线观看 | 成人毛片视频在线观看| 欧美天天综合网| 中文一区二区完整视频在线观看| 一卡二卡欧美日韩| 久久精品999| 在线精品视频一区二区三四| 精品福利一区二区三区免费视频| 亚洲精品日韩综合观看成人91| 精品一区二区三区在线视频| 色8久久人人97超碰香蕉987| 精品国产一二三区| 亚洲永久精品国产| 成人精品高清在线| 精品国产乱码久久久久久浪潮| 一区二区三区av电影| 丁香天五香天堂综合| 日韩一区二区在线观看| 一区二区三区精品在线| 福利一区二区在线观看| 日韩精品一区二区三区三区免费 | 91精品国产美女浴室洗澡无遮挡| 亚洲国产精品激情在线观看| 午夜精品久久久久久久99水蜜桃| 成人激情小说网站| 国产性天天综合网| 韩日欧美一区二区三区| 日韩欧美在线一区二区三区| 亚洲欧美日韩中文字幕一区二区三区| 久久99热这里只有精品| 69堂成人精品免费视频| 亚洲成人中文在线| 欧美主播一区二区三区| 亚洲欧美日韩国产手机在线| 豆国产96在线|亚洲| 国产日本欧洲亚洲| 国产激情偷乱视频一区二区三区| 51精品久久久久久久蜜臀| 亚洲一区免费观看| av日韩在线网站| 中文字幕一区视频| av亚洲产国偷v产偷v自拍| 中文字幕一区三区| 色偷偷一区二区三区| 亚洲欧美视频在线观看视频| 91在线码无精品| 1000部国产精品成人观看| 91美女在线观看| 最新不卡av在线| 色综合天天在线| 亚洲第一狼人社区| 欧美精品精品一区| 久草中文综合在线| 国产视频一区在线观看 | 在线观看一区二区视频| 樱桃视频在线观看一区| 日本丶国产丶欧美色综合| 亚洲精品国产a久久久久久| 欧美亚洲自拍偷拍| 偷窥少妇高潮呻吟av久久免费| 91精品欧美福利在线观看| 美洲天堂一区二卡三卡四卡视频| 精品蜜桃在线看| 国产精品99久久久久久宅男| 国产精品三级视频| 欧美日韩一区高清| 精品一区二区久久| 国产精品久久久久一区二区三区| 色狠狠色噜噜噜综合网| 日韩精品一级中文字幕精品视频免费观看 | 国产精品久久99| 色综合久久综合中文综合网| 午夜一区二区三区视频| 欧美电视剧免费全集观看| 成人毛片视频在线观看| 一区二区三区不卡在线观看| 日韩视频国产视频| 99久久精品国产麻豆演员表| 国产精品视频线看| 欧美一区二区三区四区视频| 国产69精品久久久久毛片| 有码一区二区三区| 亚洲精品在线观看视频| 欧美亚洲国产一区在线观看网站| 国内精品免费在线观看| 亚洲精品国产成人久久av盗摄 | av一区二区不卡| 视频在线观看91| 国产精品久久久久久久蜜臀| 欧美三级在线播放| 成人黄色电影在线| 麻豆一区二区在线| 亚洲综合男人的天堂| 久久久久99精品一区| 欧美日韩精品一区二区三区| 成人激情开心网| 蜜桃av一区二区在线观看| 樱花影视一区二区| 亚洲丝袜自拍清纯另类| 欧美一级欧美三级| 欧亚洲嫩模精品一区三区| 成人午夜视频在线观看| 精品亚洲成a人在线观看| 一区二区三区电影在线播| 久久丝袜美腿综合| 欧美一级一级性生活免费录像| 色婷婷综合久久久| 成人av一区二区三区| 丁香一区二区三区| 精品一区二区影视| 亚洲欧美日韩国产一区二区三区| 中文字幕va一区二区三区| 日韩欧美国产精品一区| 欧美色综合天天久久综合精品| 7777精品伊人久久久大香线蕉经典版下载| 高清视频一区二区| 国内成人精品2018免费看| 蜜臀av性久久久久av蜜臀妖精| 午夜精品免费在线| 午夜亚洲福利老司机| 亚洲品质自拍视频网站| 亚洲品质自拍视频| 亚洲精品美腿丝袜| 亚洲国产欧美另类丝袜| 亚洲影院在线观看| 亚洲影院免费观看| 丝袜脚交一区二区| 麻豆精品视频在线观看| 中文字幕乱码久久午夜不卡 | 亚洲精品一二三| 亚洲欧美偷拍卡通变态| 一区二区三区在线观看欧美| 亚洲一区二区三区四区中文字幕| 亚洲综合网站在线观看| 午夜精品福利视频网站| 婷婷综合另类小说色区| 精品在线一区二区| 国产成人av网站| 99精品视频中文字幕| 91视频在线观看| 欧美精品久久一区| 国产亚洲成av人在线观看导航| 国产精品国产三级国产aⅴ原创 | 一区二区三区四区中文字幕| 亚洲在线观看免费视频| 日日夜夜精品视频免费| 黄色日韩网站视频| 91麻豆国产福利精品| 欧美一区三区二区| 国产亚洲精品中文字幕| 亚洲国产美女搞黄色| 精品综合久久久久久8888| av中文字幕不卡| 欧美一区二区免费| 国产精品久久久久婷婷| 天天亚洲美女在线视频| 国产河南妇女毛片精品久久久| 在线观看日韩国产| 久久久久国产精品麻豆| 亚洲制服丝袜一区| 国产福利一区二区三区| 欧美影片第一页| 国产亚洲精品精华液| 视频一区在线视频| 91小视频免费观看| 国产欧美va欧美不卡在线| 日韩精品1区2区3区| youjizz国产精品|