先看看效果图:
这个花了很长时间:
现在贴出代码免费分享:
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>华金矿业-实时总图</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<link rel="stylesheet" type="text/css" href="css/index.css">
<link rel="stylesheet" type="text/css" href="css/total.css">
<script type="text/javascript">
function hide(){
var id=document.getElementById("center_img");
var name=id.getAttribute("name");
var left=document.getElementById("center-left");
if(name=="block"){
left.setAttribute("style", "display:none;");
id.setAttribute("name", "none");
}if(name=="none"){
left.setAttribute("style", "display:block;");
id.setAttribute("name", "block");
}
}
function display(a){
var elements=[];
//获得所有的li标签
var list=document.getElementsByTagName("li");
var len=list.length;//获得长度
//把class=sub-menu的li都放在集合里面
for(var i=0;i<len;i++){
if(list[i].className== "sub-menu"){
elements[elements.length]=list[i];
}
}
/*把所有的隐藏 */
for(var i=0;i<elements.length;i++){
//获得下面的ul
var ul=elements[i].childNodes[3];
/* 设置属性为隐藏 */
ul.setAttribute("style","display:none");
/* 点击当前元素的Ul设置可见 */
}
/* 对所有的input背景颜色设置 */
var tree=document.getElementsByName("tree");
for(var i=0;i<tree.length;i++){
tree[i].setAttribute("style", "background-color:#E1F1FD;");
}
var input=document.getElementById(a);
input.setAttribute("style", "background-color:#5094D6;");
var ula=input.parentNode;
var lla=ula.childNodes;
for(var i=0;i<lla.length;i++){
if(lla[i].nodeName=='UL'){
lla[i].setAttribute("style","display:block");
}
}
}
/*获取当前的日期和时间 */
function tm(){
var today = new Date();
var year=today.getFullYear();
var month=today.getMonth()+1;
var day=today.getDay();
var tm=year+"年"+month+"月"+day+"日"+" "+today.getHours() + ":"
+ today.getMinutes() + ":" + today.getSeconds(); ;
var rq=document.getElementById("rq");
rq.innerHTML=tm;
}
</script>
</head>
<body onload="tm();">
<!-- 上 -->
<div id="up" style="width:119%;">
<div id="up_left">
<ul>
<li style="font-size:12px;">铜陵华金矿业有限责任公司</li>
<li>井下综合监管系统</li>
</ul>
</div>
<table id="up_right">
<tr>
<td class="prompt">您好!<%=request.getParameter("username") %></td>
<td class="prompt">[华金矿业]:</td>
<td class="prompt" id="rq"></td>
</tr>
<tr>
<td class="prompt">密码</td>
<td class="prompt">桌面</td>
<td class="prompt">注销</td>
</tr>
</table>
</div>
<div style="width:119%;height: 50px;background-color: #4891C6;position: relative;margin-top: -14px;margin-left: -7px;"></div>
<!--中 -->
<div id="centers">
<div id="center-left">
<input type="button" value="功能菜单" class="view">
<ul id="all">
<!-- 第一个菜单 -->
<li class="sub-menu">
<input type="button" value="图形展现" class="button" name="tree" id="jpg" onclick="display(this.id);">
<ul style="display: none;">
<li><a href="total_picture.jsp">实时总图</a></li>
<li><a href="role_position.jsp" >轨迹定位</a></li>
</ul>
</li>
<!-- 第二个菜单 -->
<li class="sub-menu">
<input type="button" value="人员定位" class="button" name="tree" id="people" onclick="display(this.id);">
<ul style="display: none;">
<li>井下人员状况</li>
<li>LED通知管理</li>
<li>LED显示管理</li>
<li>大屏幕输出</li>
<li>人员定位搜索</li>
<li>人员考勤搜索</li>
<li>调度统计</li>
</ul>
</li>
<!-- 第三个菜单 -->
<li class="sub-menu">
<input type="button" value="环境监测" class="button" name="tree" id="supervise" onclick="display(this.id);">
<ul style="display: none;">
<li>环境测试总图</li>
<li>环境监测数据查询</li>
<li>环境报警数据查询</li>
</ul>
</li>
<!-- 第四个菜单 -->
<li class="sub-menu">
<input type="button" value="查询统计" class="button" name="tree" id="select" onclick="display(this.id);">
<ul style="display: none;">
<li>人员报警查询</li>
<li>超时人员查询</li>
<li>设备工作状况</li>
<li>设备工作状态查询</li>
</ul>
</li>
<!-- 第五个菜单 -->
<li class="sub-menu">
<input type="button" value="基础信息管理" class="button" name="tree" id="information" onclick="display(this.id);">
<ul style="display: none;">
<li>基站定义</li>
<li>采集基站定义</li>
<li>采集设备定义</li>
<li><a href="/Socket/Personnel_definition">人员定义</a></li>
<li>工种定义</li>
<li>职务定义</li>
<li>带班领导定义</li>
</ul>
</li>
<!-- 第六个菜单 -->
<li class="sub-menu">
<input type="button" value="系统管理" class="button" name="tree" id="system" onclick="display(this.id)">
<ul style="display: none;">
<li>机构定义</li>
<li>用户定义</li>
</ul>
</li>
</ul>
<!--隐藏下面的具体字节 -->
</div>
<!--左边 中间 右边 -->
<div id="mycenter">
<!-- 左边 -->
<div class="cup">
<embed src="images/one.svg" type="image/svg+xml" style="width:884px;height: 880px;" />
</div>
<iframe class="cdown" name="testFrame" src="dwg.jsp" scrolling="no" frameborder="no" ></iframe>
</div>
</div>
</body>
</html>
dwg.jsp:
<%@page import="java.io.OutputStream"%>
<%@page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="java.awt.*"%>
<%@page import="java.io.IOException"%>
<%@page import="java.awt.image.BufferedImage"%>
<%@page import="javax.imageio.ImageIO"%>
<%@page import="cn.com.gj.*"%>
<%@page import="java.util.List"%>
<%@page import="com.sun.image.codec.jpeg.*"%>
<%@ page contentType="image/png" import="cn.com.servlet.*"%>
<%@page import="java.io.File"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>绘图的java界面</title>
<!-- 嵌套在其他的jsp中,不是独立的jsp页面-->
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<meta name="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
</head>
<style>
body {
background-color: rgba(244, 250, 253, 0.2);
}
</style>
<body>
<%
int width=890;
int height=800;
//创建一个宽500高500的背景不是透明色的图片缓冲区----目的就是保存图片在内存
BufferedImage bi=new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
//几何图形类新建对象----绘制图片
Graphics2D gh = bi.createGraphics(); // 创建Graphics2D对象
// ---------- 增加下面的代码使得背景透明 -----------------
bi = gh.getDeviceConfiguration().createCompatibleImage(width, height, Transparency.TRANSLUCENT);
gh.dispose();
gh= bi.createGraphics();
// ---------- 背景透明代码结束 -----------------
//绘制路径直线图示意图
Dw.drawline(gh);//----执行多次无所谓
gh.setColor(Color.green);
gh.dispose();
// encode:
response.reset();
ServletOutputStream sos=response.getOutputStream();
if(sos!=null){
ImageIO.write(bi, "png",sos);
sos.close();
out.clear();
out = pageContext.pushBody();
return;
}
%>
</body>
</html>
DW.java
package cn.com.gj;
import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.image.BufferedImage;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import cn.com.lf.JdbcUtils;
public class Dw {
public static List<String> select_num(String id, String start_time,
String end_time) {
List<String> ll = new ArrayList<String>();
SimpleDateFormat sim = new SimpleDateFormat("yyyy-MM-dd");
String dd = sim.format(new Date());
String sql = "select bs from yh where number=? and time BETWEEN ? and ? order by time asc";
String[] sz = {id, start_time, end_time };
ResultSet rs = JdbcUtils.select(sql, sz);
List<String> list = new ArrayList<String>();
try {
rs.last();
int c = rs.getRow();
int j = 0;
rs.beforeFirst();
if (start_time == "" || end_time == "") {
}
if (c == 0) {
} else {
while (rs.next()) {
list.add(rs.getString(1));
j++;
}
ll.add(list.get(0));
for (int i = 0; i < j; i++) {
if (i + 1 < j) {
if (!(list.get(i).endsWith(list.get(i + 1)))) {
ll.add(list.get(i + 1));
}
}
}
}
JdbcUtils.closeAll();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return ll;
}
public static void drawline(Graphics g) {
Graphics2D gh = (Graphics2D) g;
gh.setColor(Color.yellow);
gh.setStroke(new BasicStroke(1));
gh.drawLine(71,96,72,281);//30#����
gh.drawLine(145,86,148,275);//17#--22#
gh.drawLine(72,281,337,281);//1�����--20#
gh.drawLine(148,275,189,281);//22#--20#--1
gh.drawLine(189,281,337,281);//22#--20#--2
gh.drawLine(337,281, 396, 282);//20#--12#
gh.drawLine(352,80, 420, 71);//28#--14#
gh.drawLine(420, 71, 441, 70);//14#--23#
gh.drawLine(441, 70, 509, 58);//23#--29#
gh.drawLine(148,275, 149,462);//22#--24#
gh.drawLine(149,462, 149,560);//24#--40#
gh.drawLine(149,462,622,463);//24#--27#
gh.drawLine(392, 282,441,326);//12#--13#
gh.drawLine(441,326,503,378);//13#--19#
gh.drawLine(503,378,602,463);//19#--27#
gh.drawLine(602,463,734,460);//27#--38(1)#
gh.drawLine(734,460,734,561);//38(1)#--38(2)#
gh.drawLine(337,281,507,286);//20#--21#
gh.drawLine(507,286,580,286);//21#--15#
gh.drawLine(441, 70, 443,547);//23#--n#
gh.drawLine(149,560, 656,564);//40#--31/34#
gh.drawLine(656,564,734,561);//31/34#--38#
gh.drawLine(736,561,695,575);//38#--33#
gh.drawLine(443,547, 444,596);//#n--#37
gh.drawLine(444,596,444,649);//#37---#16
gh.drawLine(444,596,567,591);//#37---#32(1)
gh.drawLine(567,591,739,620);//#32(1)---#32(2)
gh.drawLine(739,620,696,626);//#32(2)---#32(3)
gh.drawLine(690,626,690,678);//#32---#11
gh.drawLine(690,575,690,626);//#33---#32
gh.drawLine(444,649,549,642);//#16---#26/36
gh.drawLine(549,642,756,670);//##26/36---#11(1)
gh.drawLine(756,670,694,678);//#11(1)---#11(2)
gh.drawLine(443,546,577,544);//#n--#38(1)
gh.drawLine(577,544,734,561);//#38(1)--#38(2)
gh.setColor(Color.red);
gh.drawString("基站30", 71, 96);
gh.drawString("基站17", 145,86);
gh.drawString("基站22", 72,281);
gh.drawString("基站20", 320,281);
gh.drawString("基站28", 352,80);
gh.drawString("基站12", 396, 282);
gh.drawString("基站14", 394,65);
gh.drawString("基站23", 434,60);
gh.drawString("基站29", 509, 58);
gh.drawString("基站13", 441,334);
gh.drawString("基站19", 503,378);
gh.drawString("基站27", 622,463);
gh.drawString("基站24", 161,462);
gh.drawString("基站40", 151,560);
gh.drawString("基站38", 725,559);
gh.drawString("基站33", 699,575);
gh.drawString("基站15", 580,286);
gh.drawString("基站39", 446,547);
gh.drawString("基站37", 446,598);
gh.drawString("基站31(34)",626,556);
gh.drawString("基站36(26)",549,647);
gh.drawString("基站11", 694,678);
gh.drawString("基站16", 446,649);
gh.drawString("基站32", 696,628);
gh.drawString("基站21", 507,286);
gh.drawString("基站35", 650,657);
gh.drawString("基站25", 650,601);
}
public static List<Route> dg(Graphics gh, List<String> ll) {
int j = 0;
List<Route> list = new ArrayList<Route>();
if (ll != null) {
for (String i : ll) {
j++;
}
if (j != 0) {
Graphics2D g1 = (Graphics2D) gh;
g1.setStroke(new BasicStroke(1.0f));
g1.setColor(Color.red);
int w = 0;
int h = 0;
for (int i = 0; i < j; i++) {
int sz[] = case1(ll.get(i), w, h);// sz[0]=x;sz[1]=y;
if (i + 1 < j) {
int zz[] = case1(ll.get(i + 1), w, h); // zz[0]=x;zz[1]=y;
//1#22--#17
if((sz[0]==72&&sz[1]==281&&zz[0]==145&&zz[1]==86)||(zz[0]==72&&zz[1]==281&&sz[0]==145&&sz[1]==86)){
gh.drawLine(72, 281, 189, 281);// #22--(1)
gh.drawLine( 189, 281,148, 275);// (1)----(2)
gh.drawLine(148, 275,145, 86);// (2)--#17
}else if((sz[0]==72&&sz[1]==281&&zz[0]==149&&zz[1]==462)||(zz[0]==72&&zz[1]==281&&sz[0]==149&&sz[1]==462)){
//2 #22--#24
gh.drawLine(72, 281, 189, 281);// #22--(1)
gh.drawLine( 189, 281,148, 275);// (1)----(2)
gh.drawLine(148, 275,149, 462);// (2)--#24
}else if((sz[0]==145&&sz[1]==86&&zz[0]==337&&zz[1]==281)||(zz[0]==145&&zz[1]==86&&sz[0]==337&&sz[1]==281)){
//2 #17--#20
gh.drawLine(145,86,148,275);//17--(1)
gh.drawLine(148, 275, 189, 281);// (1)--(2)
gh.drawLine(189, 281, 337, 283);// (2)--#20
}else if((sz[0]==337&&sz[1]==281&&zz[0]==149&&zz[1]==462)||(zz[0]==337&&zz[1]==281&&sz[0]==149&&sz[1]==462)){
//2 #20--#24
gh.drawLine(337, 283, 189, 281);// #22--(1)
gh.drawLine( 189, 281,148, 275);// (1)----(2)
gh.drawLine(148, 275,149, 462);// (2)--#24
}else if((sz[0]==148&&sz[1]==275&&zz[0]==337&&zz[1]==281)||(zz[0]==148&&zz[1]==275&&sz[0]==337&&sz[1]==281)){
// 3.1#22--#20(1)
gh.drawLine(148, 275, 189, 281);// 22#--20#--1(1)
gh.drawLine(189, 281, 320, 284);// 22#--20#--2(1)
}
else if((sz[0]==446&&sz[1]==547&&zz[0]==736&&zz[1]==561)||(zz[0]==446&&zz[1]==547&&sz[0]==736&&sz[1]==561)){
//#n-#38
gh.drawLine(443, 546, 577, 544);// #n--#38(1)(1)
gh.drawLine(577, 544, 734, 561);// #38(1)(1)--#38(1)(1)
}
else if((sz[0]==600&&sz[1]==463&&zz[0]==736&&zz[1]==561)||(zz[0]==600&&zz[1]==463&&sz[0]==736&&sz[1]==561)){
//#27-#38
gh.drawLine(600, 463, 737, 460);// 27#--38(1)#
gh.drawLine(737, 460, 735, 561);// 38(1)#--38(2)#
}
else if((sz[0]==446&&sz[1]==596&&zz[0]==650&&zz[1]==601)||(zz[0]==446&&zz[1]==596&&sz[0]==650&&sz[1]==601)){
//#37-#25
gh.drawLine(444, 596, 567, 591);// #37---#25(1)
gh.drawLine(567, 591, 650, 603);// #25(1)---#25(2)
}
//#25--#32
else if((sz[0]==690&&sz[1]==626&&zz[0]==650&&zz[1]==601)||(zz[0]==690&&zz[1]==626&&sz[0]==650&&sz[1]==601)){
gh.drawLine(650, 601, 739, 620);//#25--#32
gh.drawLine(739, 620, 690, 626);
}
else if((sz[0]==694&&sz[1]==678&&zz[0]==650&&zz[1]==657)||(zz[0]==694&&zz[1]==678&&sz[0]==650&&sz[1]==657)){
// 19.#11--#35
gh.drawLine(650, 657,756, 670);// #35---#11(1)
gh.drawLine(756, 670, 694, 678);// #11(1)---#11(2)
}
else{
gh.drawLine(sz[0], sz[1], zz[0], zz[1]);
}
Route r = new Route(sz[0], sz[1], zz[0], zz[1]);
list.add(r);
}
}
}
}
return list;
}
public static int lenths(List<Route> list) {
int len = 0;
for (Route rr : list) {
len++;
}
return len;
}
// ��ѯ��ǰ���ݹ�����x,yֵ
public static int[] speed(List<Route> ll,int s,int y,int x) {
int xy []=new int[3];
if (ll != null) {
x= ll.get(s).getStarta();
y= ll.get(s).getEnda();
}
xy[0]=x;
xy[1]=y;
xy[2]=s;
return xy;
}
// �ж�С���˶��Ĺ켣����ô���
public static int[] sport(Graphics gh, Route rr, List<String> ll, int len,
List<Route> list, int speend, int s, int x, int i,int y) {
int [] sz=new int[5];
// ------------·��-------------------
//��ʵ��������2018.9.7
// 1.#30
//1.1#30--#22(1)
if((rr.getStarta()==71&&rr.getEnda()==96&&rr.getStartb()==72&&rr.getEndb()==281)){
// gh.drawLine(71,96,72,281)(1);
if(y>=96&&y<=281){
speend=1;x=71;
gh.drawOval(71, y, 10, 10);
}else{
s=s+1;
if(s==len){
s=0; i=0;
}
speed(list,s,y,x);
} }
//��ʵ��������2018.9.7
//1.1#30--#22(2)
if((rr.getStartb()==71&&rr.getEndb()==96&&rr.getStarta()==72&&rr.getEnda()==281)){
// gh.drawLine(71,96,72,281)(2);
if(y>=96&&y<=281){
speend=0;x=71;
gh.drawOval(71, y, 10, 10);
}else{
s=s+1;
if(s==len){
s=0; i=0;
}
speed(list,s,y,x);
} }
//��ʵ��������2018.9.8
//2.1#22--#20(1);
if((rr.getStarta()==72&&rr.getEnda()==281&&rr.getStartb()==337&&rr.getEndb()==281)){
// gh.drawLine(72,281,337,283)(1);
if(x>=72&&x<=337){
speend=1;y=282;
gh.drawOval(x, 282, 10, 10);
}else{
s=s+1;
if(s==len){
s=0; i=0;
}
speed(list,s,y,x);
} }
//��ʵ��������2018.9.8
//2.1#22--#20(2);
if((rr.getStartb()==72&&rr.getEndb()==281&&rr.getStarta()==337&&rr.getEnda()==281)){
// gh.drawLine(72,281,337,283)(2);
if(x>=72&&x<=337){
speend=0;y=282;
gh.drawOval(x, 282, 10, 10);
}else{
s=s+1;
if(s==len){
s=0; i=0;
}
speed(list,s,y,x);
} }
//=========================
//��ʵ��������2018.9.7
//2.2#22-17(1)
if((rr.getStarta()==72&&rr.getEnda()==281&&rr.getStartb()==145&&rr.getEndb()==86)){
//gh.drawLine(72, 281, 189, 281);// #22--(1)
//gh.drawLine( 189, 281,148, 275);// (1)----(2)
gh.drawLine(148, 275,145, 86);// (2)--#17
if(x>=72&&x<=189&&y>=281){
speend=1;
y=279;
gh.drawOval(x,281, 10, 10);
}else if(x>=148&&x<=190&&y<=281){
//������x������-
speend=0;
y=278;
gh.drawOval(x,278, 10, 10);
}else if(y>=86&&y<=276&&x==146){
//������x�����ݼ�
speend=0;
x=148;
gh.drawOval(146,y, 10,10);
}else{
s=s+1;
if(s==len){
s=0; i=0;
}
speed(list,s,y,x);
}
}
//��ʵ��������2018.9.8
//2.2 #22-17(2)
if((rr.getStartb()==72&&rr.getEndb()==281&&rr.getStarta()==145&&rr.getEnda()==86)){
//gh.drawLine(145, 86,148, 275);//#17--(1)
//gh.drawLine(148, 275,189, 281);//(1)----(2)
//gh.drawLine( 189, 281,72, 281);//(2)---#22
if(y>=86&&y<=275&&x<148){
//������x�����ݼ�
speend=1;
x=145;
gh.drawOval(145,y, 10,10);
}else if(x>=148&&x<=189&&y==281||x==147&&y==276){
//������x������-
speend=1;
y=279;
gh.drawOval(x,275, 10, 10);
}
else if(x>=72&&x<=189&&y>=278||x==191&&y==281){
speend=0;
y=290;
gh.drawOval(x,280, 10, 10);
}else{
s=s+1;
if(s==len){
s=0; i=0;
}
speed(list,s,y,x);
}
}
//��ʵ��������2018.9.8
//2.3#22-24(1)
if((rr.getStarta()==72&&rr.getEnda()==281&&rr.getStartb()==149&&rr.getEndb()==462)){
//gh.drawLine(72, 281, 189, 281);// #22--(1)
//gh.drawLine( 189, 281,148, 275);// (1)----(2)
gh.drawLine(148, 275,149, 462);// (2)--#24
if(x>=72&&x<=189&&y==281){
speend=1;
y=279;
gh.drawOval(x,281, 10, 10);
}else if(x>=148&&x<=189&&y<281||x==190&&y==281){
//������x������-
speend=0;
y=278;
gh.drawOval(x,278, 10, 10);
}else if(y<=462&&y>=275&&x<148){
//������x�����ݼ�
speend=1;
x=140;
gh.drawOval(148,y, 10,10);
}else{
s=s+1;
if(s==len){
s=0; i=0;
}
speed(list,s,y,x);
}
}
//��ʵ��������2018.9.8
//2.3#22-24(2)
if((rr.getStartb()==72&&rr.getEndb()==281&&rr.getStarta()==149&&rr.getEnda()==462)){
//gh.drawLine(149, 462,148, 275);// (2)--#24
//gh.drawLine(148, 275 189, 281,);// (1)----(2)
//gh.drawLine(189, 281,72, 281, );// #22--(1)
if(x>=72&&x<=189&&y==281||x==191&&y==280){
speend=0;
y=283;
gh.drawOval(x,281, 10, 10);
}else if(x>=148&&x<=189&&y<281){
//������x������-
speend=1;
y=278;
gh.drawOval(x,278, 10, 10);
}else if(y<=462&&y>=275&&x==149){
//������x�����ݼ�
speend=0;
x=151;
gh.drawOval(148,y, 10,10);
}else{
s=s+1;
if(s==len){
s=0; i=0;
}
speed(list,s,y,x);
}
}
//��ʵ��������2018.9.8
// 3.#17
// 3.1#17--#24(1)
if((rr.getStarta()==145&&rr.getEnda()==86&&rr.getStartb()==149&&rr.getEndb()==462)){
// gh.drawLine(145, 86, 149, 462);
if(y>=86&&y<=462){
x=146;
speend=1;
gh.drawOval(146,y, 10,10);
}else{
s=s+1;
if(s==len){
s=0; i=0;
}
speed(list,s,y,x);
}
}
//��ʵ��������2018.9.8
// 2.1#17--#24(2)
if((rr.getStartb()==145&&rr.getEndb()==86&&rr.getStarta()==149&&rr.getEnda()==462)){
// //gh.drawLine(145, 86, 149, 462);(2)
if(y>=86&&y<=462){
x=146;
speend=0;
gh.drawOval(146,y, 10,10);
}else{
s=s+1;
if(s==len){
s=0; i=0;
}
speed(list,s,y,x);
}
}
//��ʵ��������2018.9.8
// 3.#17
// 3.1#17--#20(1)
if((rr.getStarta()==145&&rr.getEnda()==86&&rr.getStartb()==337&&rr.getEndb()==281)){
//gh.drawLine(145,86,148,275);//17--(1)
//gh.drawLine(148, 275, 189, 281);// (1)--(2)
//gh.drawLine(189, 281, 337, 283);// (2)--#20
if(y>=86&&y<=275){//����
x=146;
speend=1;
gh.drawOval(146,y,10,10);
}else if(x>=148&&x<=189){
y=278;
speend=1;
gh.drawOval(x,276, 10, 10);
}else if(x>=189&&x<=337){
y=281;
speend=1;
gh.drawOval(x,281, 10, 10);
}else{
s=s+1;
if(s==len){
s=0; i=0;
}
speed(list,s,y,x);
}
}
//��ʵ��������2018.9.8
// 3.1#17--#20(2)
if((rr.getStartb()==145&&rr.getEndb()==86&&rr.getStarta()==337&&rr.getEnda()==281)){
//gh.drawLine(145,86,148,275);//17--(1)
//gh.drawLine(148, 275, 189, 281);// (1)--(2)
//gh.drawLine(189, 281, 337, 283);// (2)--#20
if(y>=86&&y<=275||x==147&&y==276){//����
x=146;
speend=0;
gh.drawOval(146,y,10,10);
}else if(x>=148&&x<189){
y=278;
speend=0;
gh.drawOval(x,276, 10, 10);
}else if(x>=189&&x<=337){
y=281;
speend=0;
gh.drawOval(x,281, 10, 10);
}else{
s=s+1;
if(s==len){
s=0; i=0;
}
speed(list,s,y,x);
}
}
//��ʵ��������2018.9.8
// 4.#20
// 4.1 #20-----#12(1)
if((rr.getStarta()==337&&rr.getEnda()==281&&rr.getStartb()==396&&rr.getEndb()==282)){
// gh.drawLine(337, 281, 396, 282);// 20#--12#(1)
if(x>=337&&x<=396){//����
y=281;
speend=1;
gh.drawOval(x,280,10, 10);
}else{
s=s+1;
if(s==len){
s=0; i=0;
}
speed(list,s,y,x);
}
}
//��ʵ��������2018.9.8
// 4.1 #20-----#12(2)
if((rr.getStartb()==337&&rr.getEndb()==281&&rr.getStarta()==396&&rr.getEnda()==282)){
// gh.drawLine(337, 281, 396, 282);// 20#--12#(2)
if(x>=337&&x<=396){//����
y=281;
speend=0;
gh.drawOval(x,280,10, 10);
}else{
s=s+1;
if(s==len){
s=0; i=0;
}
speed(list,s,y,x);
}
}
//��ʵ��������2018.9.8
// 4.2#20----#21(1)
if((rr.getStarta()==337&&rr.getEnda()==281&&rr.getStartb()==507&&rr.getEndb()==286)){
//gh.drawLine(337, 281, 507, 286);// 20#--21#(1)
if(x>=337&&x<=507){//����
y=284;
speend=1;
gh.drawOval(x,282, 10, 10);
}else{
s=s+1;
if(s==len){
s=0; i=0;
}
speed(list,s,y,x);
}
}
//��ʵ��������2018.9.8
// 4.2#20----#21(2)
if((rr.getStartb()==337&&rr.getEndb()==281&&rr.getStarta()==507&&rr.getEnda()==286)){
//gh.drawLine(337, 281, 507, 286);// 20#--21#(2)
if(x>=337&&x<=507){//����
y=284;
speend=0;
gh.drawOval(x,282, 10, 10);
}else{
s=s+1;
if(s==len){
s=0; i=0;
}
speed(list,s,y,x);
}
}
//��ʵ��������2018.9.8
// 4.3#20----#24(1)
if((rr.getStarta()==337&&rr.getEnda()==281&&rr.getStartb()==149&&rr.getEndb()==462)){
//gh.drawLine(337, 283, 189, 281);// #22--(1)
//gh.drawLine( 189, 281,148, 275);// (1)----(2)
gh.drawLine(148, 275,149, 462);// (2)--#24
if(x<=337&&x>=189||x==337&&y==281){
speend=0;
y=274;
gh.drawOval(x,281, 10, 10);
}else if(x>=148&&x<=189){
//������x������-
speend=0;
y=270;
gh.drawOval(x,278, 10, 10);
}else if(y<=462&&y>=270||x==147&&y==268){
//������x����+
speend=1;
x=144;
gh.drawOval(148,y, 10,10);
}else{
s=s+1;
if(s==len){
s=0; i=0;
}
speed(list,s,y,x);
}
}
//��ʵ��������2018.9.8
// 4.3#20----#24(2)
if((rr.getStartb()==337&&rr.getEndb()==281&&rr.getStarta()==149&&rr.getEnda()==462)){
//gh.drawLine(337, 283, 189, 281);// #22--(1)
//gh.drawLine( 189, 281,148, 275);// (1)----(2)
gh.drawLine(148, 275,149, 462);// (2)--#24
if(x<=337&&x>=189){
speend=1;
y=270;
gh.drawOval(x,278, 10, 10);
}else if(x>=150&&x<189||x==146&&y==274||x==148&&y==272){
//������x������-
speend=1;
y=270;
gh.drawOval(x,276, 10, 10);
}else if(y<=462&&y>=275||x==149&&y==462){
//������x����+
speend=0;
x=148;
gh.drawOval(148,y, 10,10);
}else{
s=s+1;
if(s==len){
s=0; i=0;
}
speed(list,s,y,x);
}
}
//��ʵ��������2018.9.8
// 5.#12(#20��#15��һ�����ϵģ�#12��#20����һ����·���ϵģ�#12��#15��#20�IJ�ͬ��·��)
// 5.1 #12��#13��һ�����ϵ�(1)
if((rr.getStarta()==396&&rr.getEnda()==282&&rr.getStartb()==441&&rr.getEndb()==326)){
//gh.drawLine(396, 282, 440, 326);// 12#--13#(1)
if(y>=282&&y<=326){//����
speend=1;
gh.drawOval(y+114,y, 10, 10);
}else{
s=s+1;
if(s==len){
s=0; i=0;
}
speed(list,s,y,x);
}
}
//��ʵ��������2018.9.8
// 5.1 #12��#13��һ�����ϵ�(2)
if((rr.getStartb()==396&&rr.getEndb()==282&&rr.getStarta()==441&&rr.getEnda()==326)){
//gh.drawLine(396, 282, 441, 334);// 12#--13#(2)
if(y>=282&&y<=326){//����
speend=0;
gh.drawOval(y+114,y, 10, 10);
}else{
s=s+1;
if(s==len){
s=0; i=0;
}
speed(list,s,y,x);
}
}
//��ʵ��������2018.9.8
// 6.#15(1)
if((rr.getStarta()==507&&rr.getEnda()==286&&rr.getStartb()==580&&rr.getEndb()==286)){
//gh.drawLine(507, 286, 580, 286);// 21#--15#(1)
if(x>=507&&x<=580){//����
speend=1;
y=286;
gh.drawOval(x, 284, 10,10);
}else{
s=s+1;
if(s==len){
s=0; i=0;
}
speed(list,s,y,x);
}
}
//��ʵ��������2018.9.8
// 6.#15(2)
if((rr.getStartb()==507&&rr.getEndb()==286&&rr.getStarta()==580&&rr.getEnda()==286)){
//gh.drawLine(507, 286, 580, 286);// 21#--15#(1)
if(x>=507&&x<=580){//����
speend=0;
y=286;
gh.drawOval(x, 284, 10,10);
}else{
s=s+1;
if(s==len){
s=0; i=0;
}
speed(list,s,y,x);
}
}
//��ʵ��������2018.9.8
// 7.#28(1)
if((rr.getStarta()==352&&rr.getEnda()==80&&rr.getStartb()==420&&rr.getEndb()==71)){
//gh.drawLine(352, 80, 420, 71);// 28#--14#(1)
if(x>=352&&x<=420){//����
speend=1;
y=76;
gh.drawOval(x,74, 10, 10);
}else{
s=s+1;
if(s==len){
s=0; i=0;
}
speed(list,s,y,x);
}
}
//��ʵ��������2018.9.8
// 7.#28(2)
if((rr.getStartb()==352&&rr.getEndb()==80&&rr.getStarta()==420&&rr.getEnda()==71)){
//gh.drawLine(352, 80, 420, 71);// 28#--14#(2)
if(x>=352&&x<=420){//����
speend=0;
y=76;
gh.drawOval(x,74, 10, 10);
}else{
s=s+1;
if(s==len){
s=0; i=0;
}
speed(list,s,y,x);
}
}
//��ʵ��������2018.9.8
// 8.#14(1)
if((rr.getStarta()==420&&rr.getEnda()==71&&rr.getStartb()==441&&rr.getEndb()==70)){
//gh.drawLine(420, 71, 441, 70);// 14#--23#(1)
if(x>=420&&x<=441){//����
speend=1;
y=70;
gh.drawOval(x,68, 10, 10);
}else{
s=s+1;
if(s==len){
s=0; i=0;
}
speed(list,s,y,x);
}
}
//��ʵ��������2018.9.8
// 8.#14(2)
if((rr.getStartb()==420&&rr.getEndb()==71&&rr.getStarta()==441&&rr.getEnda()==70)){
//gh.drawLine(420, 71, 441, 70);// 14#--23#(2)
if(x>=420&&x<=441){//����
speend=0;
y=70;
gh.drawOval(x,68, 10, 10);
}else{
s=s+1;
if(s==len){
s=0; i=0;
}
speed(list,s,y,x);
}
}
//��ʵ��������2018.9.8
// 9.#23(1)
if((rr.getStarta()==441&&rr.getEnda()==70&&rr.getStartb()==509&&rr.getEndb()==58)){
//gh.drawLine(441, 70, 509, 58);// 23#--29#(1)
if(x>=441&&x<=509){//����
speend=1;
gh.drawOval(x,(2512-3*x)/17, 10, 10);
}else{
s=s+1;
if(s==len){
s=0; i=0;
}
speed(list,s,y,x);
}
}
//��ʵ��������2018.9.8
// 9.#23(2)
if((rr.getStartb()==441&&rr.getEndb()==70&&rr.getStarta()==509&&rr.getEnda()==58)){
//gh.drawLine(441, 70, 509, 58);// 23#--29#(2)
if(x>=441&&x<=509){//����
speend=0;
gh.drawOval(x,(2510-3*x)/17, 10, 10);
}else{
s=s+1;
if(s==len){
s=0; i=0;
}
speed(list,s,y,x);
}
}
//��ʵ��������2018.9.8
if((rr.getStarta()==441&&rr.getEnda()==70&&rr.getStartb()==446&&rr.getEndb()==547)){
// gh.drawLine(441, 70, 446, 547);// 23#--n#(1)
if(y>=70&&y<=547){//����
speend=1;
gh.drawOval(442,y, 10,10);
}else{
s=s+1;
if(s==len){
s=0; i=0;
}
speed(list,s,y,x);
}
}
//��ʵ��������2018.9.8
if((rr.getStartb()==441&&rr.getEndb()==70&&rr.getStarta()==446&&rr.getEnda()==547)){
// gh.drawLine(442, 70, 446, 547);// 23#--n#(2)
if(y>=70&&y<=547){//����
speend=0;
gh.drawOval(442,y, 10,10);
}else{
s=s+1;
if(s==len){
s=0; i=0;
}
speed(list,s,y,x);
}
}
//��ʵ��������2018.9.8
// 10.#24(1)
if((rr.getStarta()==149&&rr.getEnda()==462&&rr.getStartb()==149&&rr.getEndb()==560)){
// gh.drawLine(149, 462, 149, 560);// 24#--40#(1)
if(y>=462&&y<=560){//����
speend=1;
x=149;
gh.drawOval(149, y, 10, 10);
}else{
s=s+1;
if(s==len){
s=0; i=0;
}
speed(list,s,y,x);
}
}
//��ʵ��������2018.9.8
// 10.#24(2)
if((rr.getStartb()==149&&rr.getEndb()==462&&rr.getStarta()==149&&rr.getEnda()==560)){
// gh.drawLine(149, 462, 149, 560);// 24#--40#(2)
if(y>=462&&y<=560){//����
speend=0;
x=149;
gh.drawOval(149, y, 10, 10);
}else{
s=s+1;
if(s==len){
s=0; i=0;
}
speed(list,s,y,x);
}
}
//��ʵ��������2018.9.8
if((rr.getStarta()==149&&rr.getEnda()==462&&rr.getStartb()==600&&rr.getEndb()==463)){
//gh.drawLine(149, 462, 622, 463);// 24#--27#(1)
if(x>=149&&x<=600){//����
speend=1;
y=462;
gh.drawOval(x,462, 10, 10);
}else{
s=s+1;
if(s==len){
s=0; i=0;
}
speed(list,s,y,x);
}
}
//��ʵ��������2018.9.8
if((rr.getStartb()==149&&rr.getEndb()==462&&rr.getStarta()==600&&rr.getEnda()==463)){
// gh.drawLine(149, 462, 622, 463);// 24#--27#(2)
if(x>=149&&x<=600){//����
speend=0;
y=462;
gh.drawOval(x,462, 10, 10);
}else{
s=s+1;
if(s==len){
s=0; i=0;
}
speed(list,s,y,x);
}
}
//��ʵ��������2018.9.8
//11.#13(1)
if((rr.getStarta()==441&&rr.getEnda()==326&&rr.getStartb()==503&&rr.getEndb()==378)){
// gh.drawLine(441, 326, 503, 378);// 13#--19#(1)
if(x>=441&&x<=503){//����
speend=1;
gh.drawOval(x,((26*x-1360)/31), 10, 10);
}else{
s=s+1;
if(s==len){
s=0; i=0;
}
speed(list,s,y,x);
}
}
//��ʵ��������2018.9.8
// 11.#13(2)
if((rr.getStartb()==441&&rr.getEndb()==326&&rr.getStarta()==503&&rr.getEnda()==378)){
//gh.drawLine(441, 326, 503, 378);//13#--19#(2)
if(x>=441&&x<=503){//��-
speend=0;
gh.drawOval(x,((26*x-1360)/31), 10, 10);
}else{
s=s+1;
if(s==len){
s=0; i=0;
}
speed(list,s,y,x);
}
}
//��ʵ��������2018.9.8
// 12.#19(1)
if((rr.getStarta()==503&&rr.getEnda()==378&&rr.getStartb()==600&&rr.getEndb()==463)){
// gh.drawLine(503, 378, 600, 463);// 19#--27#(1)
if(x>=503&&x<=600){//����
speend=1;
gh.drawOval(x,(85*x-4870)/100, 10, 10);
}else{
s=s+1;
if(s==len){
s=0; i=0;
}
speed(list,s,y,x);
}
}
//��ʵ��������2018.9.8
// 12.#19(2)
if((rr.getStartb()==503&&rr.getEndb()==378&&rr.getStarta()==600&&rr.getEnda()==463)){
// gh.drawLine(503, 378, 600, 463);// 19#--27#(2)
if(x>=503&&x<=602){//����
speend=0;
gh.drawOval(x,(85*x-4870)/100, 10, 10);
}else{
s=s+1;
if(s==len){
s=0; i=0;
}
speed(list,s,y,x);
}
}
//��ʵ��������2018.9.8
// 13.#40(1)
if((rr.getStarta()==149&&rr.getEnda()==560&&rr.getStartb()==656&&rr.getEndb()==564)){
//gh.drawLine(149, 560, 656, 564);// 40#--31/34#(1)
if(x>=149&&x<=656){//����
speend=1;
y=562;
gh.drawOval(x,560, 10, 10);
}else{
s=s+1;
if(s==len){
s=0; i=0;
}
speed(list,s,y,x);
}
}
//��ʵ��������2018.9.8
// 13.#40(2)
if((rr.getStartb()==149&&rr.getEndb()==560&&rr.getStarta()==656&&rr.getEnda()==564)){
//gh.drawLine(149, 560, 656, 564);// 40#--31/34#(2)
if(x>=149&&x<=656){//����
speend=0;
y=562;
gh.drawOval(x,560, 10, 10);
}else{
s=s+1;
if(s==len){
s=0; i=0;
}
speed(list,s,y,x);
}
}
//��ʵ��������2018.9.8
// 14.#n(1)
if((rr.getStarta()==446&&rr.getEnda()==547&&rr.getStartb()==446&&rr.getEndb()==596)){
//gh.drawLine(443, 547, 444, 596);// #n--#37(1)
if(y>=547&&y<=596){//����
speend=1;
x=446;
gh.drawOval(443,y, 10, 10);
}else{
s=s+1;
if(s==len){
s=0; i=0;
}
speed(list,s,y,x);
}
}
//��ʵ��������2018.9.8
// 14.#n(2)
if((rr.getStartb()==446&&rr.getEndb()==547&&rr.getStarta()==446&&rr.getEnda()==596)){
//gh.drawLine(443, 547, 444, 596);// #n--#37(2)
if(y>=547&&y<=596){//����
speend=0;
x=446;
gh.drawOval(443,y, 10, 10);
}else{
s=s+1;
if(s==len){
s=0; i=0;
}
speed(list,s,y,x);
}
}
//��ʵ��������2018.9.8
if((rr.getStarta()==446&&rr.getEnda()==547&&rr.getStartb()==736&&rr.getEndb()==561)){
//gh.drawLine(443, 546, 577, 544);// #n--#38(1)(1)
//gh.drawLine(577, 544, 734, 561);// #38(1)(1)--#38(1)(1)
if(x>=446&&x<=577){
speend=1;
y=545;
gh.drawOval(x,544, 10, 10);
}else if(x>=577&&x<=734){
speend=1;
gh.drawOval(x,(3775+x)/8, 10, 10);
}else{
s=s+1;
if(s==len){
s=0; i=0;
}
speed(list,s,y,x);
}
}
//��ʵ��������2018.9.8
if((rr.getStartb()==446&&rr.getEndb()==547&&rr.getStarta()==736&&rr.getEnda()==561)){
//gh.drawLine(446, 547, 577, 544);// #n--#38(1)(2)
//gh.drawLine(577, 544, 734, 561);// #38(1)(2)--#38(1)(2)
if(x>=446&&x<=577){
speend=0;
y=545;
gh.drawOval(x,545, 10, 10);
}else if(x>=577&&x<=736){
speend=0;
gh.drawOval(x,(3775+x)/8, 10, 10);
}else{
s=s+1;
if(s==len){
s=0; i=0;
}
speed(list,s,y,x);
}
}
//��ʵ��������2018.9.8
// 15.#31/34(1)
if((rr.getStarta()==656&&rr.getEnda()==564&&rr.getStartb()==736&&rr.getEndb()==561)){
//gh.drawLine(656, 564, 734, 561);// 31/34#--38#(1)
if(x>=656&&x<=736){//����
speend=1;
y=563;
gh.drawOval(x,561, 10, 10);
}else{
s=s+1;
if(s==len){
s=0; i=0;
}
speed(list,s,y,x);
}
}
//��ʵ��������2018.9.8
// 15.#31/34(2)
if((rr.getStartb()==656&&rr.getEndb()==564&&rr.getStarta()==736&&rr.getEnda()==561)){
//gh.drawLine(656, 564, 734, 561);// 31/34#--38#(2)
if(x>=656&&x<=736){//����
speend=0;
y=563;
gh.drawOval(x,561, 10, 10);
}else{
s=s+1;
if(s==len){
s=0; i=0;
}
speed(list,s,y,x);
}
}
//��ʵ��������2018.9.8
if((rr.getStarta()==600&&rr.getEnda()==463&&rr.getStartb()==736&&rr.getEndb()==561)){
//gh.drawLine(600, 463, 736, 460);// 27#--38(1)#
//gh.drawLine(736, 460, 736, 561);// 38(1)#--38(2)#
if(x>=600&&x<=736){//����
speend=1;
y=460;
gh.drawOval(x,458,10, 10);
}
else if(y>=460&&y<=561||x==738&&y==462){//����
speend=1;
x=500;
gh.drawOval(734,y,10, 10);
}else{
s=s+1;
if(s==len){
s=0; i=0;
}
speed(list,s,y,x);
}
}
//��ʵ��������2018.9.8
if((rr.getStartb()==600&&rr.getEndb()==463&&rr.getStarta()==736&&rr.getEnda()==561)){
//gh.drawLine(600, 463, 734, 460);// 27#--38(1)#
//gh.drawLine(734, 460, 734, 561);// 38(1)#--38(2)#
if(x>=600&&x<736||x==736&&y==459){//����
speend=0;
y=458;
gh.drawOval(x,458,10, 10);
}else if(y>=460&&y<=561&&x==736){//����
speend=0;
x=738;
gh.drawOval(732,y,10, 10);
}else{
s=s+1;
if(s==len){
s=0; i=0;
}
speed(list,s,y,x);
}
}
//��ʵ��������2018.9.8
// 17.#37
if((rr.getStarta()==446&&rr.getEnda()==596&&rr.getStartb()==444&&rr.getEndb()==649)){
//gh.drawLine(444, 596, 444, 649);// #37---#16(1)
if(y>=596&&y<=649){//����
speend=1;
x=444;
gh.drawOval(444,y, 10, 10);
}else{
s=s+1;
if(s==len){
s=0; i=0;
}
speed(list,s,y,x);
}
}
//��ʵ��������2018.9.8
if((rr.getStartb()==446&&rr.getEndb()==596&&rr.getStarta()==444&&rr.getEnda()==649)){
//gh.drawLine(444, 596, 444, 649);// #37---#16(2)
if(y>=596&&y<=649){//����
speend=0;
x=444;
gh.drawOval(444,y, 10, 10);
}else{
s=s+1;
if(s==len){
s=0; i=0;
}
speed(list,s,y,x);
}
}
//��ʵ��������2018.9.8
//#37--#25(1)
if((rr.getStarta()==446&&rr.getEnda()==596&&rr.getStartb()==650&&rr.getEndb()==601)){
/*gh.drawLine(446, 596, 567, 591);// #37---#25(1)
gh.drawLine(567, 591, 650, 601);*/
if(x>=446&&x<=567&&y>=591){//����
speend=1;
y=593;
gh.drawOval(x,593, 10, 10);
}else if(x<=650&&x>=567&&y<=601){//����
speend=1;
y=599;
gh.drawOval(x,(42235+15*x)/86, 10, 10);
}else{
s=s+1;
if(s==len){
s=0; i=0;
}
speed(list,s,y,x);
}
}
//��ʵ��������2018.9.8
//#37--#25(2)
if((rr.getStartb()==446&&rr.getEndb()==596&&rr.getStarta()==650&&rr.getEnda()==601)){
/*gh.drawLine(446, 596, 567, 591);// #37---#25(1)
gh.drawLine(567, 591, 650, 601);*/
if(x>=446&&x<=567&&y>=591){//����
speend=0;
y=593;
gh.drawOval(x,593, 10, 10);
}else if(x<=650&&x>=567&&y<=601){//����
speend=0;
y=599;
gh.drawOval(x,(42235+15*x)/86, 10, 10);
}else{
s=s+1;
if(s==len){
s=0; i=0;
}
speed(list,s,y,x);
}
}
//��ʵ��������2018.9.8
//#25---#32(1)
if((rr.getStarta()==650&&rr.getEnda()==601&&rr.getStartb()==690&&rr.getEndb()==626)){
/*gh.drawLine(650, 601, 739, 620);// #25(1)---#32(2)
gh.drawLine(739, 620, 690, 626);*/
if(x>=650&&x<=739&&y>=601&&y<620){//����
speend=1;
y=(42235+15*x)/86;
gh.drawOval(x,(42235+15*x)/86, 10, 10);
}else if(y>=620&&x>=690&&x<=742){
speend=0;
y=622;
gh.drawOval(x,(17720-3*x)/25, 10, 10);
}else{
s=s+1;
if(s==len){
s=0; i=0;
}
speed(list,s,y,x);
}
}
//��ʵ��������2018.9.8
//#25---#32(2)
if((rr.getStartb()==650&&rr.getEndb()==601&&rr.getStarta()==690&&rr.getEnda()==626)){
/*gh.drawLine(650, 603, 739, 620);
gh.drawLine(739, 620, 690, 626);*/
if(x>=650&&x<=740&&y>=601&&y<=620||x==740&&y==622){//����
speend=0;
y=618;
gh.drawOval(x,(42235+15*x)/86, 10, 10);
}else if(y>620&&x>=690&&x<=739){
speend=1;
y=620;
gh.drawOval(x,(17720-3*x)/25, 10, 10);
}else{
s=s+1;
if(s==len){
s=0; i=0;
}
speed(list,s,y,x);
}
}
//��ʵ��������2018.9.8
// 18.#16
if((rr.getStarta()==444&&rr.getEnda()==649&&rr.getStartb()==549&&rr.getEndb()==642)){
//gh.drawLine(444, 649, 549, 642);// #16---#26/36(1)
if(x>=444&&x<=549){//����
speend=1;
y=645;
gh.drawOval(x,645, 10, 10);
}else{
s=s+1;
if(s==len){
s=0; i=0;
}
speed(list,s,y,x);
}
}
//��ʵ��������2018.9.8
if((rr.getStartb()==444&&rr.getEndb()==649&&rr.getStarta()==549&&rr.getEnda()==642)){
//gh.drawLine(444, 649, 549, 642);// #16---#26/36(2)
if(x>=444&&x<=549){//����
speend=0;
y=645;
gh.drawOval(x,645, 10, 10);
}else{
s=s+1;
if(s==len){
s=0; i=0;
}
speed(list,s,y,x);
}
}
//��ʵ��������2018.9.8
//19.1 #36/26--#35(1)
if((rr.getStarta()==549&&rr.getEnda()==642&&rr.getStartb()==650&&rr.getEndb()==657)){
if(y>=642&&y<=657){//����x++
speend=1;
gh.drawOval((207*y-117522)/28,y, 10, 10);
}else{
s=s+1;
if(s==len){
s=0; i=0;
}
speed(list,s,y,x);
}
}
//��ʵ��������2018.9.8
//19.1 #36/26--#35(2)
if((rr.getStartb()==549&&rr.getEndb()==642&&rr.getStarta()==650&&rr.getEnda()==657)){
if(y>=642&&y<=657){//����x++
speend=0;
gh.drawOval((207*y-117522)/28,y, 10, 10);
}else{
s=s+1;
if(s==len){
s=0; i=0;
}
speed(list,s,y,x);
}
}
//��ʵ��������2018.9.8
//19.2 #35---#11(1)
if((rr.getStarta()==650&&rr.getEnda()==657&&rr.getStartb()==694&&rr.getEndb()==678)){
//gh.drawLine(650, 657, 756, 670);// #26/36---#11(1)
//gh.drawLine(756, 670, 694, 678);// #11(1)---#11(2)
if(y>=657&&y<=670){//����x++
speend=1;
gh.drawOval((207*y-117522)/28,y, 10, 10);
}else if(y>=670&&y<=678){
speend=1;
gh.drawOval((23794-31*y)/4,y, 10, 10);
}else{
s=s+1;
if(s==len){
s=0; i=0;
}
speed(list,s,y,x);
}
}
//��ʵ��������2018.9.8
//19.2 #35---#11(2)
if((rr.getStartb()==650&&rr.getEndb()==657&&rr.getStarta()==694&&rr.getEnda()==678)){
//gh.drawLine(650, 657, 756, 670);// #26/36---#11(1)
//gh.drawLine(756, 670, 694, 678);// #11(1)---#11(2)
if(y>=657&&y<=670){//����x++
speend=0;
gh.drawOval((207*y-117522)/28,y, 10, 10);
}else if(y>=670&&y<=678){
speend=0;
gh.drawOval((23794-31*y)/4,y, 10, 10);
}else{
s=s+1;
if(s==len){
s=0; i=0;
}
speed(list,s,y,x);
}
}
//��ʵ��������2018.9.8
// 20.#11
if((rr.getStarta()==690&&rr.getEnda()==626&&rr.getStartb()==694&&rr.getEndb()==678)){
//gh.drawLine(690, 626, 690, 678);// #32---#11(2)
if(y>=626&&y<=678){//����
speend=1;
x=690;
gh.drawOval(690,y, 10, 10);
}else{
s=s+1;
if(s==len){
s=0; i=0;
}
speed(list,s,y,x);
}
}
//��ʵ��������2018.9.8
// 20.#11
if((rr.getStartb()==690&&rr.getEndb()==626&&rr.getStarta()==694&&rr.getEnda()==678)){
//gh.drawLine(690, 626, 690, 678);// #32---#11(2)
if(y>=626&&y<=678){//����
speend=0;
x=690;
gh.drawOval(690,y, 10, 10);
}else{
s=s+1;
if(s==len){
s=0; i=0;
}
speed(list,s,y,x);
}
}
//��ʵ��������2018.9.8
//21. #32
if((rr.getStarta()==690&&rr.getEnda()==575&&rr.getStartb()==690&&rr.getEndb()==626)){
//gh.drawLine(690, 575, 690, 626);// #33---#32(1)
if(y>=575&&y<=626){//����
x=690;
speend=1;
gh.drawOval(690,y,10, 10);
}else{
s=s+1;
if(s==len){
s=0; i=0;
}
speed(list,s,y,x);
}
}
//��ʵ��������2018.9.8
if((rr.getStartb()==690&&rr.getEndb()==575&&rr.getStarta()==690&&rr.getEnda()==626)){
//gh.drawLine(690, 575, 690, 626);// #33---#32(2
if(y>=575&&y<=626){//����
x=690;
speend=0;
gh.drawOval(690,y,10, 10);
}else{
s=s+1;
if(s==len){
s=0; i=0;
}
speed(list,s,y,x);
}
}
//��ʵ��������2018.9.8
//22. #33
if((rr.getStarta()==736&&rr.getEnda()==561&&rr.getStartb()==690&&rr.getEndb()==575)){
//gh.drawLine(736, 561, 695, 575);// 38#--33#(1)
if(x<=736&&x>=690){//����
speend=0;
gh.drawOval(x,(33305-14*x)/41,10, 10);
}else{
s=s+1;
if(s==len){
s=0; i=0;
}
speed(list,s,y,x);
}
}
//��ʵ��������2018.9.8
if((rr.getStartb()==736&&rr.getEndb()==561&&rr.getStarta()==690&&rr.getEnda()==575)){
//gh.drawLine(736, 561, 690, 575);// 38#--33#(2)
if(x<=736&&x>=690){//����
speend=1;
gh.drawOval(x,(33305-14*x)/41,10, 10);
}else{
s=s+1;
if(s==len){
s=0; i=0;
}
speed(list,s,y,x);
} }
sz[0]=s;
sz[1]=i;
sz[2]=y;
sz[3]=speend;
sz[4]=x;
return sz;
}
// ȷ�������ҵ��վʼĩλ��
private static int[] case1(String a, int x, int y) {
switch (a) {
case "030"://�����ǻ�վ�����
x = 71;
y = 96;
break;
case "017":
x = 145;
y = 86;
break;
case "022":
x = 72;
y = 281;
break;
case "020":
x = 337;
y = 281;
break;
case "028":
x = 352;
y = 80;
break;
case "012":
x = 396;
y = 282;
break;
case "014":
x = 420;
y = 71;
break;
case "023":
x = 441;
y =70;
break;
case "029":
x = 509;
y = 58;
break;
case "013":
x = 441;
y = 326;
break;
case "019":
x = 503;
y = 378;
break;
case "027":
x = 600;
y = 463;
break;
case "024":
x = 149;
y = 462;
break;
case "040":
x = 149;
y = 560;
break;
case "038":
x = 736;
y = 561;
break;
case "033":
x = 690;
y = 575;
break;
case "015":
x = 580;
y = 286;
break;
case "039":
x = 446;
y = 547;
break;
case "037":
x = 446;
y = 596;
break;
case "031":
x = 656;
y = 564;
break;
case "034":
x = 656;
y = 564;
break;
case "036":
x = 549;
y = 642;
break;
case "026":
x = 549;
y = 642;
break;
case "011":
x = 694;
y = 678;
break;
case "016":
x = 444;
y = 649;
break;
case "032":
x = 690;
y = 626;
break;
case "021":
x = 507;
y = 286;
break;
case "035":
x = 650;
y = 657;
break;
case "025":
x = 650;
y = 601;
break;
}
int[] sz = { x, y };
return sz;
}
}
CSS样式如下
``` @CHARSET "UTF-8"; #mycenter{ float: left; width:406%; height: 575px; top:-2px; position: absolute; left:200px; } .cup{ position: absolute; float:left; width: 864px; height:846px; top:-121px; left:-36px; } .cdown{ position: absolute; float:left; width: 900px; height:785px; top:-53px; left:-43px; } #calander{ position: absolute; float: right; top:10px; right:-787px; width:200px; height: 200px; } a{ text-decoration: none;}