JPH0486953A - Length calculator - Google Patents

Length calculator

Info

Publication number
JPH0486953A
JPH0486953A JP2201127A JP20112790A JPH0486953A JP H0486953 A JPH0486953 A JP H0486953A JP 2201127 A JP2201127 A JP 2201127A JP 20112790 A JP20112790 A JP 20112790A JP H0486953 A JPH0486953 A JP H0486953A
Authority
JP
Japan
Prior art keywords
length
mouse
register
cpu
mouse cursor
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2201127A
Other languages
Japanese (ja)
Inventor
Junji Yamamoto
淳次 山本
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Casio Computer Co Ltd
Original Assignee
Casio Computer Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP2201127A priority Critical patent/JPH0486953A/en
Publication of JPH0486953A publication Critical patent/JPH0486953A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To exactly calculate the length of a route between two points by moving a pointer from the starting point of a graphic to be displayed, calculating the length of the route moved to the terminal point, and converting the calculated length to an actual length based on a scale to be inputted. CONSTITUTION:A length calculator 22 interrupts a CPU 14 when clicking the button of a mouse 12 or moving the mouse 12 to a mouse control device 13. When the right and left buttons of the mouse 12 are clicked until the release of the interruption is received from the CPU 14, the device 13 writes the clicked contents in a status register 15a of an event storage register 15 and generates interruption in the CPU 14. The CPU 14 announces the generation of mouse interruption to a mouse cursor control device 19. The device 19 reads contents from the register 15 through the CPU 14. When the event stored in the register 15a is a click event, the device 19 stores only the contents of the mask state of the register 15a in a mouse cursor control table 20.

Description

【発明の詳細な説明】 [産業上の利用分野] 本発明はコンピュータ等の処理装置に係り、特に表示装
置の画面上に指定される2点間の道のり長さを算出する
長さ算出装置に関する。
[Detailed Description of the Invention] [Industrial Application Field] The present invention relates to a processing device such as a computer, and particularly relates to a length calculation device that calculates the length of a path between two points specified on the screen of a display device. .

[発明の概要コ 本発明の長さ算出装置は、例えば、コンピュータによる
C A D (ComputerAided Desi
gn)で作成した図形の処理装置等に搭載されて、その
CRT等の画面上で、所定の2点間を結ぶ任意の経路の
道のり長さを容易に算出できる装置である。つまりCR
Tの画面上に描写される地図中の現在地点から目的地点
までの経路の道のりの長さを求める場合に用いるのであ
れば、その地図上の経路に沿ってカーソルを移動させる
と、スタート地点から目的地点までの移動期間中に所定
単位時間当り一回の割合で、該カーソルのX、Y軸方向
の移動量が読取られ、その区間の長さが計算されて順次
加算され、目的地点に到達するとそれまでの区間の総和
が実際の道のり長さに換算されて出力できる。
[Summary of the Invention] The length calculation device of the present invention is, for example, a computer-aided computer (CAD).
This is a device that is installed in a processing device for graphics created by GN) and can easily calculate the length of an arbitrary route connecting two predetermined points on the screen of the CRT or the like. In other words, CR
If you want to use it to find the length of a route from the current point to the destination point on the map depicted on the T's screen, move the cursor along the route on the map and you will see the distance from the starting point to the destination point. During the movement period to the destination point, the amount of movement of the cursor in the X and Y axis directions is read once per predetermined unit time, and the length of the section is calculated and added sequentially, until the destination point is reached. Then, the sum of the sections up to that point can be converted to the actual length of the journey and output.

[従来の技術] 一般にコンピュータ等の処理装置は、イメージスキャナ
等によって読み込んだ地図をCRT等の表示装置の画面
上に表示できる。その地図上の任意の2点間の長さを求
めるときには、同画面上に表示される縮尺スケールを目
安に目測していた。
[Prior Art] Generally, a processing device such as a computer can display a map read by an image scanner or the like on the screen of a display device such as a CRT. When determining the length between any two points on the map, the distance was measured using the scale displayed on the screen as a guide.

第4図は、コンピュータ装置において、イメージスキャ
ナで読み込んだ地図をCRT上に表示したものである。
FIG. 4 shows a map read by an image scanner displayed on a CRT in a computer device.

ここでスタート地点Aがら目的地Bまでの道のり長さを
求めるとすると、該スタート地点Aから目的地Bまでの
経路には、スタート地点A−e−g−目的地Bの第1ル
ートと、スタート地点A−e−f−h−目的地Bの第2
ルートの2通りが考えられる。これらを画面上に表示さ
れる縮尺スケールsmdを目安に目測で計測して比較し
ようとすると、第2ルートのfh間のカーブした経路の
長さを目測で計測するのが困難なため、正確な道のり長
さを求めて、第1ルートと比較することかできない。
If we calculate the length of the route from start point A to destination B, the route from start point A to destination B includes the first route of start point A-e-g-destination B. Start point A-e-f-h-second destination B
Two routes are possible. If you try to measure and compare these by visual measurement using the scale scale smd displayed on the screen as a guide, it is difficult to measure the length of the curved path between fh of the second route by visual measurement, so it is difficult to measure accurately. I can only compare it with the first route to determine the length of the route.

[発明か解決しようとする課題] このように前述したような目測では、指定する2点間に
カーブや複雑に湾曲した経路かあると、正確な長さを求
めることか困難であり正確に計測することかできない。
[Problem to be solved by the invention] In this way, with visual measurement as described above, if there is a curve or a complicatedly curved path between two points, it is difficult to obtain an accurate length, and it is difficult to measure accurately. I can't do anything.

この原因は、画面隅に表示される直線の縮尺スケールs
mdを頼りにカーブした経路を目測で算出する方法しか
なかったためである。
The cause of this is the linear scale s displayed at the corner of the screen.
This is because the only method available was to visually calculate a curved route based on md.

本発明の課題は、表示装置の画面に表示された任意の2
点間の経路の正確な長さを求めることかできるようにす
ることである。
An object of the present invention is to display arbitrary two images displayed on the screen of a display device.
The purpose is to be able to determine the exact length of a path between points.

[課題を解決するための手段] 本発明の手段は次の通りである。[Means to solve the problem] The means of the present invention are as follows.

■)表示手段1(第1図の機能ブロック図を参照、以下
同じ)は長さ算出用の図形と任意の位置を示すポインタ
とを画面上に表示する。
(2) Display means 1 (see the functional block diagram of FIG. 1; the same applies hereinafter) displays a figure for length calculation and a pointer indicating an arbitrary position on the screen.

2) ポインタ移動手段2は、前記ポインタを画面上で
前記図形上の任意の始点から任意の終点へ向けて連続的
に移動させる。
2) The pointer moving means 2 continuously moves the pointer on the screen from an arbitrary starting point to an arbitrary ending point on the graphic.

3)縮尺入力手段3は、前記画面上の図形の縮尺を入力
する。
3) The scale input means 3 inputs the scale of the figure on the screen.

4)算出手段4は、前記ポインタ移動手段2によるポイ
ンタ移動に伴いポインタか移動した道のり長さを算出す
る。
4) The calculating means 4 calculates the length of the distance traveled by the pointer as the pointer moving means 2 moves the pointer.

5)換算手段5は、前記縮尺入力手段3て入力された縮
尺に基づいて、前記算出手段4により算出された道のり
の長さを実際の長さに換算する。
5) The conversion means 5 converts the length of the road calculated by the calculation means 4 into an actual length based on the scale input by the scale input means 3.

[作用] 本発明の手段の作用は次の通りである。[Effect] The operation of the means of the invention is as follows.

表示手段1に表示される図形の任意の始点からポインタ
移動手段2によりポインタ例えば、マウスカーソルを移
動させると、算出手段4により、その終点までの移動し
た道のり長さが算出され、換算手段5が、縮尺入力手段
3より入力される縮尺に基づき、実際の長さに換算する
When a pointer, for example, a mouse cursor, is moved by the pointer moving means 2 from an arbitrary starting point of the figure displayed on the display means 1, the calculating means 4 calculates the length of the distance traveled to the end point, and the converting means 5 calculates the length of the distance traveled to the end point. , the length is converted into an actual length based on the scale input from the scale input means 3.

従って表示装置の画面に表示された任意の2点間の経路
の正確な長さを求めることができる。
Therefore, the exact length of the path between any two points displayed on the screen of the display device can be determined.

[実施例] 以下、本発明の長さ算出装置の一実施例の構成を示す第
2図のブロック図を参照しながら説明する。
[Embodiment] Hereinafter, a description will be given with reference to the block diagram of FIG. 2 showing the configuration of an embodiment of the length calculation device of the present invention.

この長さ算出装置の構成は、まずキーボード10とキー
制御装置11によって構成されるキー人力装置及び、マ
ウス12とマウス制御装置13によって構成されるポイ
ンティングデバイス入力装置の各入力装置から、中央処
理装置(以下、CPUとする)14に、それぞれの人力
信号が入力される。そして前記マウス12から入力した
人力信号は、CPU14と後述するCRT制御装置17
で画像処理され、第4図に示すようにCRT18の画面
上に、ポインタ(例えば、第4図に示す矢印形のマウス
カーソルとする)lか表示される。
The configuration of this length calculation device is as follows: First, a central processing (hereinafter referred to as CPU) 14 receives each human power signal. The human power signal inputted from the mouse 12 is sent to the CPU 14 and the CRT control device 17, which will be described later.
The image is processed, and a pointer (for example, an arrow-shaped mouse cursor as shown in FIG. 4) is displayed on the screen of the CRT 18 as shown in FIG.

そして前記マウス制御装置13から単位時間ごとのマウ
ス12の移動状態を事象記憶レジスタ15に伝送して5
tatusレジスタ15aに格納させ、その時のマウス
の移動ff1(dx、dy)をdx。
Then, the movement state of the mouse 12 for each unit time is transmitted from the mouse control device 13 to the event storage register 15.
The mouse movement ff1 (dx, dy) at that time is stored in the tatus register 15a as dx.

dYレジスタ15b、15cに格納させる。The data is stored in the dY registers 15b and 15c.

それと共に前記マウス制御装置]3がらCPU14へ割
り込みを発生させる。
At the same time, the mouse control device] 3 generates an interrupt to the CPU 14.

前記CPU14には、後述するマウスカーソル制御装置
19を介してマウスカーソル制御テーブル20からのマ
ウスカーソル位置情報によって、マウスカーソル1の表
示データを作成するビットビルダー(BITBLD)1
6か接続される。すなわち、前記ビットビルダー16は
、図示しないイメージリーダからの画像情報も前記CP
U14を介して受け、この画像情報と前記マウスカーソ
ル信号情報とからマウスカーソル1を含む地図の表示デ
ータを作成する。この表示データは、CRT制御装置1
7を介して、CRT18で表示される。
The CPU 14 includes a bit builder (BITBLD) 1 that creates display data for the mouse cursor 1 based on mouse cursor position information from a mouse cursor control table 20 via a mouse cursor control device 19, which will be described later.
6 are connected. That is, the bit builder 16 also transfers image information from an image reader (not shown) to the CP.
The map display data including the mouse cursor 1 is created from this image information and the mouse cursor signal information. This display data is stored in the CRT control device 1.
7 and displayed on the CRT 18.

また前記CPU14には、マウスカーソル制御装置19
か接続され、このマウスカーソル制御装置19は、前記
CPU14を介して、前記事象記憶レジスタ15の内容
を読出して、マウスカーソル1か移動する新な位置を随
時マウスカーソル制御テーブル20に記憶させる。
The CPU 14 also includes a mouse cursor control device 19.
The mouse cursor control device 19 reads the contents of the event storage register 15 via the CPU 14, and stores the new position to which the mouse cursor 1 is to be moved in the mouse cursor control table 20 at any time.

すなわち、マウスカーソル制御装置19には、経時変化
する前記移動jt (dx、dy )を読み出し、これ
を後述するアプリケーションメモリ21に格納されたア
プリケーションソフトにより規定される変換式、 dispX −dispX + f (dx)    
  −(1)dispY −dispY 十f (dy
)      −(2)に基づいて、マウスカーソルi
の表示位置を示す表示位置情報(clispX、 di
spY)に変換する。そしてこの表示位置情報をマウス
カーソル制御テーブル20のdispXレジスタ20 
b 、 dispYレジスタ20cに格納する。またマ
ウスカーソル制御装置19は、前記ビットビルダー16
ヘマウスカソルiの表示位置を示すこの新たなdisp
Xレジスタ20 b 、 djspYレジスタ20cの
内容を供給することにより、この内容に基づいたCRT
 18の画面上の位置にマウスカーソルiを描画せしめ
る。
That is, the mouse cursor control device 19 reads out the movement jt (dx, dy) that changes over time, and converts it into a conversion formula defined by application software stored in the application memory 21, which will be described later: dispX - dispX + f ( dx)
-(1) dispY -dispY 10f (dy
) − Based on (2), mouse cursor i
Display position information (crispX, di
spY). This display position information is stored in the dispX register 20 of the mouse cursor control table 20.
b, stored in the dispY register 20c. Further, the mouse cursor control device 19 includes the bit builder 16
This new disp shows the display position of the mouse cursor i.
By supplying the contents of the X register 20b and the djspY register 20c, the CRT
A mouse cursor i is drawn at the position 18 on the screen.

さらに前記CPU14には、長さ算出の処理方法等のア
プリケーションソフトを記憶するアプリケーションメモ
リ21と、マウスカーソル1に指定された2点間の道の
り長さを算出する長さ算出装置22がそれぞれ接続され
、前記長さ算出装置22はアプリケーションメモリ21
の記憶するアプリケーションソフトに基づいて、前記マ
ウスカーソル1か描画した経路の道のり長さを算出する
Furthermore, an application memory 21 that stores application software such as a length calculation processing method, and a length calculation device 22 that calculates the path length between two points designated by the mouse cursor 1 are connected to the CPU 14. , the length calculation device 22 is an application memory 21
The length of the route drawn by the mouse cursor 1 is calculated based on the application software stored in the mouse cursor 1.

次にこのように構成された装置における長さ算出動作に
ついて説明する。
Next, the length calculation operation in the apparatus configured as described above will be explained.

まず、ユーザーはイメージスキャナ等を用いて、地図を
読取りCRT18に表示した後、キーボード等により道
のり長さを算出することを指示する。
First, the user uses an image scanner or the like to read a map and display it on the CRT 18, and then gives an instruction to calculate the route length using a keyboard or the like.

この指示により、アプリケーションメモリ21に格納さ
れる算出手順に従って、長さ算出か開始される。
In response to this instruction, length calculation is started according to the calculation procedure stored in the application memory 21.

そして長さ算出装置22は、マウス制御装置13に対し
て、マウス12のボタンのクリック時若しくは、マウス
12を移動した時に、CPU14に割込みを発生させる
ように指示する。
The length calculation device 22 then instructs the mouse control device 13 to generate an interrupt to the CPU 14 when a button on the mouse 12 is clicked or when the mouse 12 is moved.

前記マウス制御装置13は、CPU14から割り込み解
除の指示を受けるまでの間は、マウス12の左右のどち
らかのボタンかクリックされると、事象記憶レジスタ1
5の5tatusレジスタ15aにクリックされた内容
(マウスの状態)を書込ませ、前記CPU14に割り込
みを発生させる。同様に、その間にユーザーかマウスコ
2を移動させると、その移動期間中に所定単位時間当り
一回の割合でマウス12か移動していることを事象記憶
レジスタ15の5tatusレジスタ15aに書き込ま
せる。また前記マウス制御装置13は、前述したマウス
12の移動によって発生した移動量をX方向の移動量信
号dxをdxレジスタ15b、X方向の移動量信号ay
をdyレジスタ15cに書込み、前記CPU14に割込
みを発生させる。
Until the mouse control device 13 receives an interrupt release instruction from the CPU 14, when either the left or right button of the mouse 12 is clicked, the mouse control device 13 stores the event memory register 1.
The clicked content (mouse status) is written into the status register 15a of No. 5, and an interrupt is generated in the CPU 14. Similarly, if the user moves the mouse 2 during that period, the fact that the mouse 12 is moved at a rate of once per predetermined unit time during that movement period is written in the 5tatus register 15a of the event storage register 15. Further, the mouse control device 13 inputs the movement amount generated by the movement of the mouse 12 into an X-direction movement amount signal dx to a dx register 15b, and an X-direction movement amount signal ay to a dx register 15b.
is written to the dy register 15c, causing the CPU 14 to generate an interrupt.

前記CPU14は、それら割込みを受けるとマウスカー
ソル制御装置19にマウス割込みが発生したことを通知
する。そして通知されたマウスカーソル制御装置1つは
、前記CPU14を介して、事象記憶レジスタ15から
前述した内容を読取る。
When the CPU 14 receives these interrupts, it notifies the mouse cursor control device 19 that a mouse interrupt has occurred. The notified mouse cursor control device reads the above-mentioned contents from the event storage register 15 via the CPU 14.

次にマウスカーソル制御装置19は、読取った内容にお
いて、5tatusレジスタ15aに格納されていた事
象がクリック事象であれば、5tatusレジスタ15
aのマウス状態の内容だけをマウスカーソル制御テーブ
ル20に格納する。ところか格納されていた事象か移動
事象であれば、5tatuSレジスタ15aのマウス状
態の内容及び、移動it (dx、dy )が前述した
変換式(1)、(2)に基づき、前記CPU14によっ
て変換された変換信号(dispX、 djspY)を
マウスカーソル制御テーブル20の5tatusレジス
タ20a及び、dispXレジスタ20 b 、 dj
spYレジスタ20cにそれぞれ格納する。
Next, the mouse cursor control device 19 selects the 5tatus register 15 if the event stored in the 5tatus register 15a is a click event in the read content.
Only the contents of the mouse state of a are stored in the mouse cursor control table 20. However, if it is a stored event or a movement event, the contents of the mouse state of the 5tatuS register 15a and the movement it (dx, dy) are converted by the CPU 14 based on the conversion formulas (1) and (2) described above. The converted signals (dispX, djspY) are stored in the 5tatus register 20a and the dispX register 20b, dj of the mouse cursor control table 20.
Each is stored in the spY register 20c.

次に前記マウスカーソル制御装置11は、ビットビルダ
ー16に対して、前記変換信号(dispX。
Next, the mouse cursor control device 11 sends the conversion signal (dispX) to the bit builder 16.

dispY )に基づく新たな移動位置にマウスカーソ
ルlを画面表示するように指示する。この指示によって
、前記ビットビルダー]6はCRT制御装置17を介し
て、CRT18の画面に描写された地図上にマウスカー
ソルiを画面表示させる。
The mouse cursor l is instructed to be displayed on the screen at a new movement position based on dispY ). In response to this instruction, the bit builder] 6 displays the mouse cursor i on the map drawn on the screen of the CRT 18 via the CRT control device 17.

さらに前記マウスカーソル制御装置19は、前記CPU
14を介して、長さ算出装置22に割込みを発生させる
Furthermore, the mouse cursor control device 19
14, an interrupt is generated in the length calculation device 22.

次に長さ算出装置22は、CPU14.マウスカーソル
制御装置19を介してマウスカーソル制御テーブル20
の各レジスタの値を読み込む。
Next, the length calculation device 22 uses the CPU 14. Mouse cursor control table 20 via mouse cursor control device 19
Read the value of each register.

さらに長さの基準となるCRT18上の縮尺スケールs
mdをマウス12のボタンを2回クリックすることによ
って、長さ算出装置に読み取る。
Furthermore, the scale s on the CRT 18, which serves as a reference for length.
md is read into the length calculation device by clicking the mouse 12 button twice.

その縮尺スケールに対応する実際の距離をキーホト10
から入力させることによって、マウスカーソル1の移動
距離が実際の移動距離に対応した道のり長さを算出でき
るようになる。
Keyphoto 10 the actual distance corresponding to that scale.
By inputting from , the distance traveled by the mouse cursor 1 becomes able to calculate the distance corresponding to the actual distance traveled.

次に前述した第4図のCRT18に表示されるスタート
地点Aにマウスカーソルiを設定した後、左ボタンをク
リックする。このクリックによって、長さ算出装置22
は割込みを受け、再度マウスカーソル制御テーブル20
から各レジスタの値を読み込み、スタート地点Aと判断
する。
Next, after setting the mouse cursor i to the starting point A displayed on the CRT 18 in FIG. 4 mentioned above, click the left button. By this click, the length calculation device 22
receives an interrupt and displays the mouse cursor control table 20 again.
The value of each register is read from , and the starting point A is determined.

そして、マウスカーソルiを地図の経路に沿って描写し
て、順次算出される長さを加算することによって、スタ
ート地点Aから目的地点BまてCRT18上を移動した
マウスカーソルiによって相対的に実際の長さを算出す
ることができる。
Then, by drawing the mouse cursor i along the route on the map and adding the sequentially calculated lengths, it is possible to calculate the relative actual The length of can be calculated.

そして前記長さ算出装置22は、算出された道のり長さ
をアプリケーションメモリ21に戻しデータとして格納
している。
Then, the length calculating device 22 returns the calculated route length to the application memory 21 and stores it as data.

次に第3図のフローチャートを参照して前記長さ算出装
置22の道のり長さを算出する処理について説明する。
Next, the process of calculating the path length by the length calculating device 22 will be explained with reference to the flowchart in FIG.

ここで座標の位置は第4図のCRTの表示画面に記載さ
れた参照番号を参照する。
Here, for the coordinate positions, reference numbers written on the CRT display screen in FIG. 4 are referred to.

道のり長さを算出することを指示された前記長さ算出装
置22は、マウス制御装置13に対して、前記マウス1
2のボタンのクリック時若しくは、マウス12を移動し
た時に、CPU14から該長さ算出装置22へ割込みが
できるように指示して、マウス割り込みができるように
処理さする(ステップSl)。その処理後、終了フラグ
のオン/オフ状態を判定する(ステップS2)。その判
定で終了フラグがオン状態(Y)であれば、アプリケー
ションメモリ21へ算出された実際の道のり長さを送出
しくステップS3)、長さ算出の処理を完了する。しか
し前記終了フラグがオフ状態(N)であれば、次の割込
みが指示されるまで待機状態になる(ステップS4)。
The length calculation device 22, which has been instructed to calculate the path length, sends the mouse 1 to the mouse control device 13.
When the button No. 2 is clicked or the mouse 12 is moved, the CPU 14 instructs the length calculation device 22 to perform an interrupt, and processes the length calculation device 22 so that the mouse interrupt can be performed (step Sl). After the processing, the on/off state of the end flag is determined (step S2). If the end flag is in the ON state (Y) in this determination, the calculated actual route length is sent to the application memory 21 (step S3), and the length calculation process is completed. However, if the end flag is off (N), the process enters a standby state until the next interrupt is instructed (step S4).

次にマウスカーソル制御装置12に新たなマウス割込み
か発生したことが指示され(ステップS5)、格納され
ていた事象かとのようなものか判定される(ステップS
6)  ここて、マウス12の左ボタンのクリックの事
象であると判定されたときは、CRT18に表示される
道のり長さ算出の距離の基準になる縮尺スケールを読み
込む。
Next, the mouse cursor control device 12 is instructed that a new mouse interrupt has occurred (step S5), and it is determined whether it is a stored event (step S5).
6) At this point, when it is determined that the event is a click of the left button of the mouse 12, the scale scale that is displayed on the CRT 18 and becomes the reference distance for calculating the route length is read.

この縮尺スケールの一方のスタート位置の座標(SX、
SY)が決定しているか判定をする(ステップS7)。
The coordinates (SX,
SY) has been determined (step S7).

ここで座標(SX、SY)の初期値は(SX−−1,5
Y−−1)とする。従ってそれらが「−1」か否かを判
定すればよい。
Here, the initial values of coordinates (SX, SY) are (SX--1, 5
Y--1). Therefore, it is only necessary to determine whether they are "-1" or not.

またスタート位置座標(SX、SY)が決定されていな
い場合(N)には、CRT18に表示される縮尺スケー
ルの一方にマウスカーソルを置き、ここの位置座標に相
当する変換信号(dispXdjspY )に変換した
後、マウスカーソル制御テーブル20に格納する(ステ
ップS8)。そして、この変換信号(dispX 、 
dispY )が前記長さ算出装置22のSXレジスタ
(ステップS9)、SYレジスタ(ステップ510)に
格納される。これによって、スタート位置座標(SX、
SY)か決定され、ステップS2の終了フラグ判定に戻
り、オフ状態(N)と判定された後、ステップS4の待
機状態になる。
In addition, if the start position coordinates (SX, SY) have not been determined (N), place the mouse cursor on one side of the scale displayed on the CRT 18 and convert it to a conversion signal (dispXdjspY) corresponding to this position coordinate. After that, it is stored in the mouse cursor control table 20 (step S8). Then, this converted signal (dispX,
dispY ) is stored in the SX register (step S9) and SY register (step 510) of the length calculation device 22. As a result, the start position coordinates (SX,
SY) is determined, the process returns to step S2 to determine the end flag, and after being determined to be in the off state (N), the state enters the standby state in step S4.

またステップS7でスタート位置の座標(SX。Also, in step S7, the coordinates (SX) of the start position are determined.

SY)が決定もされていた場合(Y)には、次に前記縮
尺スケール他方のエンド位置の座標(EX。
If SY) has also been determined (Y), then the coordinates of the other end position of the scale (EX).

EY)が決定しているか判定をする(ステップ511)
。ここで座標(EX、EY)の初期値は(EX−−1,
EY−−1)とする。従ってそれらが「−1」か否かを
判定すればよい。
Determine whether EY) has been determined (step 511)
. Here, the initial values of the coordinates (EX, EY) are (EX--1,
EY--1). Therefore, it is only necessary to determine whether they are "-1" or not.

まだエンド位置座標(EX、EY)が決定されていない
場合(N)には、前述したスタート位置座標を求めると
同様にして、新たな変換信号(dispX 、 cNs
pY )をマウスカーソル制御チーフル20に格納する
(ステップ512)。
If the end position coordinates (EX, EY) have not yet been determined (N), new conversion signals (dispX, cNs
pY) is stored in the mouse cursor control tickle 20 (step 512).

そして、コノ新たな変換信号(dispX 、 dis
pY )か前記長さ算出装置22のレジスタEX(ステ
ップ813)、  レジスタEY(ステップ514)に
格納される。
Then, a new conversion signal (dispX, dis
pY ) is stored in register EX (step 813) and register EY (step 514) of the length calculation device 22.

そして、ステップS7乃至ステップS14によって求め
られた縮尺スケールに対応する実際の距離mをキー人力
して(ステップ515)、レジスタ5caleにCRT
18上の1ドツトが実際の何メートル(m)の距離に相
当か計算式、”””  (SX−EX)”+ (SY−
EY)’  ”” 3)に基づき係数を算出する(ステ
ップ516)。その後、ステップS2の終了フラグ判定
に戻り、オフ状態(N)と判定された後ステップS4の
待機状態になる。またステップSIOの判定でエンド位
置の座標(EX、EY)が決定されていた場合(Y)に
は、測定するスタート地点Aの座標(X、Y)が決定し
ているか判定をする(ステップ517)。ここで座標(
X、、Y)の初期値は(X−−1,Y−−1)とする。
Then, manually input the actual distance m corresponding to the reduced scale obtained in steps S7 to S14 (step 515), and input it into the register 5cale.
The formula for calculating the actual distance in meters (m) that one dot on 18 corresponds to is """(SX-EX)" + (SY-
A coefficient is calculated based on EY)'"" 3) (step 516). Thereafter, the process returns to step S2 to determine the end flag, and after being determined to be in the off state (N), the process enters the standby state in step S4. Furthermore, if the coordinates (EX, EY) of the end position have been determined in step SIO (Y), it is determined whether the coordinates (X, Y) of the starting point A to be measured have been determined (step 517 ). Here the coordinates (
The initial values of X,, Y) are (X--1, Y--1).

従ってそれらか「−1」か否かを判定すればよい。Therefore, it is only necessary to determine whether they are "-1" or not.

またスタート地点Aの座標(X、Y)か決定されていな
い場合(N)には、前述したスタート位置座標を求める
と同様にして、新たな変換信号(djspX 、 di
spY )をマウスカーソル制御テーブル20に格納す
る。そして、この新たな変換信号(dispX 、 d
ispY )が前記長さ算出装置22のXレジスタ(ス
テップ818)、Yレジスタ(ステップ519)に格納
される。この格納した後、ステップS2の終了フラグ判
定に戻り、その判定後ステップS4の待機状態になる。
Furthermore, if the coordinates (X, Y) of the start point A have not been determined (N), a new conversion signal (djspX, di
spY) is stored in the mouse cursor control table 20. Then, this new conversion signal (dispX, d
ispY ) is stored in the X register (step 818) and Y register (step 519) of the length calculation device 22. After this storage, the process returns to the end flag determination in step S2, and after that determination, the process enters a standby state in step S4.

またステップSllの判定でエンド位置の座標(EX、
EY)が決定されていた場合(Y)には、ステップS2
の終了フラグ判定に戻り、オフ状態(N)と判定された
後ステップS4の待機状態になる。
Also, the coordinates of the end position (EX,
EY) has been determined (Y), step S2
Returning to the end flag determination in step S4, after determining the off state (N), the process enters the standby state of step S4.

以上の処理により、縮尺スケールのスタート位置の座標
(SX、SY)とエンド位置座標(EX。
Through the above processing, the coordinates of the start position (SX, SY) and the end position coordinates (EX) of the reduced scale are set.

EY)と、算出した道のり長さの実際の道のり長さを算
出するための係数と、測定するスタート地点Aの座標(
x、y)とが決定される。
EY), the coefficient for calculating the actual length of the calculated route length, and the coordinates of the starting point A to be measured (
x, y) are determined.

次にユーザーがマウス12をスタート地点Aから目的地
点に向かってマウスカーソルを移動させ始めると、新た
なマウス割込みか発生し、ステップS6の判定は、その
マウス割込みが移動事象であることを判定して、次のス
テップS20へ移行する。
Next, when the user starts moving the mouse 12 from the starting point A toward the destination point, a new mouse interrupt occurs, and the determination in step S6 determines that the mouse interrupt is a movement event. Then, the process moves to the next step S20.

このステップS20では、前に処理した縮尺スケールと
スタート地点Aの座標(X、Y)の設定が完了したか判
定される。ここで座標(X、Y)の初期値は(X−−1
,、Y−−1)となっている。
In this step S20, it is determined whether the setting of the previously processed scale and the coordinates (X, Y) of the starting point A is completed. Here, the initial value of the coordinates (X, Y) is (X--1
, , Y--1).

従ってそれらが「−1」か否かを判定すればよい。Therefore, it is only necessary to determine whether they are "-1" or not.

このステップS20の判定において、まだ縮尺スケール
とスタート地点Aの座標(X、Y)が決定されていない
場合(N)には、ステップS2の終了フラグ判定に戻り
、オフ状態(N)と判定された後、ステップS4の待機
状態になる。ところが、この判定でスタート地点Aが決
定されていた場合(Y)には、ユーザーがスタート地点
から目的地点までマウスを移動させていく (ステップ
521)と、マウス12の移動期間中に所定単位時間当
り一回の割合でマウス12の移動量(dx、dy)が読
取られ、これから変換信号(dispX 。
In the determination of step S20, if the scale and the coordinates (X, Y) of the starting point A have not yet been determined (N), the process returns to step S2 to determine the end flag, and the off state is determined (N). After that, it enters a standby state in step S4. However, if the starting point A has been determined in this judgment (Y), when the user moves the mouse from the starting point to the destination point (step 521), the predetermined unit time during the movement period of the mouse 12 The amount of movement (dx, dy) of the mouse 12 is read at a rate of once per time, and a conversion signal (dispX) is obtained from this.

dispY )が得られる。この変換信号(dispX
 。
dispY) is obtained. This conversion signal (dispX
.

dispY )とスタート地点Aの座標(X、Y)を次
式、 it ”1 +   (X−dispX)2+(Y −
dispY)2(N;CRT上の道のり長さ) ・・・ (4) に代入して計算すると、スタート地点Aから位置Cまて
の道のり長さgが算出される(ステップ522)。
dispY ) and the coordinates (X, Y) of the starting point A using the following formula, it "1 + (X-dispX)2+(Y -
dispY)2(N; path length on CRT) (4) When calculated by substituting the following, the path length g from starting point A to position C is calculated (step 522).

その後、位置C(Xa、Ya)を新たなスタート地点と
して、Xレジスタ(ステップ823)及びYレジスタ(
ステップ524)が更新され、ここから次の所定単位時
間に規定されるマウスの移動地点(位置D)までの移動
量(dx、dy)を、同様に式(4)に代入して、位置
C(Xa、Ya)から次の位置D (Xb、Yb)まで
の区間の道のり長さgが算出される。この長さを順次加
算して、同様の算出を繰返して、目的地点Bまでマウス
カーソルが到達したときに、スタート地点Aから目的地
点Bまて道のり長さgの総和か算出される。
After that, with position C (Xa, Ya) as a new starting point, the X register (step 823) and the Y register (
Step 524) is updated, and the movement amount (dx, dy) from here to the mouse movement point (position D) specified in the next predetermined unit time is similarly substituted into equation (4), and the position C The length g of the section from (Xa, Ya) to the next position D (Xb, Yb) is calculated. By adding these lengths in sequence and repeating the same calculation, when the mouse cursor reaches the destination point B, the total length g of the journey from the start point A to the destination point B is calculated.

そして算出後、ステップS2の終了フラグ判定に戻り、
オフ状態(N)と判定された後、ステ・ツブS4の待機
状態になる。
After the calculation, return to step S2 to determine the end flag,
After being determined to be in the off state (N), the step S4 enters a standby state.

次にユーザーかマウスの右ボタンをクリ、ツクしたこと
により終了フラグがオンされる。それと共に新たなマウ
ス割込みか発生して、ステップS6の判定に移行し、マ
ウス割込み事象が判定される。
Next, the end flag is turned on when the user clicks the right button of the mouse. At the same time, a new mouse interrupt occurs, and the process moves to step S6, where a mouse interrupt event is determined.

この事象は、第3事象とする終了フラグかオン状態(ス
テップ525)と判定され、ステ・ツブS23で算出さ
れた道のり長さgの総和にステ、ンプ516で求めたレ
ジスタ5caleに格納される係数を掛合わせて、算出
された道のり長さΩに対応する実際の道のり長さに変換
して(ステ・ツブ526)、ステップS2の終了フラグ
判定に戻る。
This event is determined to be the third event end flag turned on (step 525), and is stored in the register 5cale obtained in step 516 in addition to the total path length g calculated in step S23. The calculated road length Ω is converted into an actual road length corresponding to the calculated road length Ω by multiplying the coefficients (step 526), and the process returns to step S2 to determine the end flag.

その判定においては、すでに終了フラグかオン状態(Y
)にされているため、アプリケーションメモリ21へ算
出された実際の道のり長さを送出しくステップS3)、
長さ算出の処理を完了する。
In this determination, the end flag is already in the on state (Y
), the calculated actual route length is sent to the application memory 21 (step S3),
Complete the length calculation process.

以上説明したように実施例では、CR,Tの画面に表示
された地図上の所定の2点を結ぶ任意の経路をマウスカ
ーソルを移動させて描くことにより、その移動期間中に
所定単位時間当り一回の割合でマウスカーソルの移動量
(dx、dy)が読取られ、スタート地点から目的地点
まで数分割されて各道のり長さが測定され、その各道の
り長さが順次加算されていき目的地点に到達したときに
それまでの2点間の道のり長さを算出し、実際の道のり
に換算されて、正確な道のり長さを計測することができ
る。
As explained above, in the embodiment, by moving the mouse cursor to draw an arbitrary route connecting two predetermined points on the map displayed on the screen of CR and T, the The amount of movement (dx, dy) of the mouse cursor is read at a rate of one time, the distance from the start point to the destination point is divided into several parts and the length of each path is measured, and the length of each path is sequentially added up until the destination point is reached. When the vehicle reaches the point, the distance traveled between the two points is calculated and converted to the actual distance, allowing accurate measurement of the distance.

なお、スタート地点から目的地点まで、いくつもの経路
がある場合には、それぞれの経路の道のり長さを計測す
ることにより、経路の長短を容易に比較できる。
Note that if there are several routes from the start point to the destination point, the lengths of the routes can be easily compared by measuring the length of each route.

また、他にも種々の変形や応用が可能であり、例えば、
イメージリーダで読んだ地図上の2点間の距離以外にも
CA D (Computer Aided Desi
gn)で作成したパイプラインやICの配線パターン等
における2点間の長さ算出にも適用できる。
In addition, various other modifications and applications are possible, for example,
In addition to the distance between two points on a map read by an image reader, computer aided
It can also be applied to calculating the length between two points in a pipeline created using GN) or an IC wiring pattern.

また前記実施例では、マウスを用いた場合を説明したか
キーボードのカーソルキー トラックポル或いはタッチ
パネルを用いて指により指定する等、種々のポインティ
ングデバイス入力装置を利用できる。
Further, in the above embodiments, various pointing device input devices can be used, such as a keyboard cursor key, track port, or touch panel for specifying with a finger.

[発明の効果コ 本発明によれば、表示装置等の画面上で、任意の2点間
を結ぶ経路を算出できる。従って表示装置の画面に表示
された2点間の任意の経路の正確な道程長さを求めるこ
とかでき、カーブや複雑に湾曲した経路も簡単且つ正確
に求めることができる。
[Effects of the Invention] According to the present invention, a route connecting any two points can be calculated on the screen of a display device or the like. Therefore, the exact length of any route between two points displayed on the screen of the display device can be determined, and even curved or complicatedly curved routes can be determined easily and accurately.

【図面の簡単な説明】[Brief explanation of drawings]

第1図は本発明の機能ブロック図、第2図は一実施例の
長さ算出装置の構成を示すブロック図、第3図は第2図
の長さ算出装置の動作を説明するためのフローチャート
、第4図は表示装置に描写される地図である。 1・・・表示手段、2・・・ポインタ移動手段、3・・
・縮尺入力手段、4・・・算出手段、5・・・換算手段
。 出願人  カシオ計算機株式会社 RT
Fig. 1 is a functional block diagram of the present invention, Fig. 2 is a block diagram showing the configuration of a length calculation device according to an embodiment, and Fig. 3 is a flowchart for explaining the operation of the length calculation device shown in Fig. 2. , FIG. 4 is a map depicted on a display device. 1... Display means, 2... Pointer moving means, 3...
- Scale input means, 4... calculation means, 5... conversion means. Applicant Casio Computer Co., Ltd. RT

Claims (1)

【特許請求の範囲】  長さ算出用の図形と任意の位置を示すポインタとを画
面上に表示する表示手段と、 前記ポインタを画面上で前記図形上の任意の始点から任
意の終点へ向けて移動させるポインタ移動手段と、 前記画面上の図形の縮尺を入力する縮尺入力手段と、 前記ポインタ移動手段によるポインタ移動に伴いポイン
タが移動した道のり長さを算出する算出手段と、 前記縮尺入力手段で入力された縮尺に基づいて、前記算
出手段により算出された道のりの長さを実際の長さに換
算する換算手段とを具備することを特徴とする長さ算出
装置。
[Scope of Claims] Display means for displaying a length calculation figure and a pointer indicating an arbitrary position on a screen, the pointer being directed from an arbitrary start point to an arbitrary end point on the figure on the screen. a pointer moving means for moving the figure; a scale input means for inputting a scale of the figure on the screen; a calculation means for calculating the length of the path traveled by the pointer as the pointer is moved by the pointer moving means; A length calculation device comprising: conversion means for converting the length of the route calculated by the calculation means into an actual length based on the inputted scale.
JP2201127A 1990-07-31 1990-07-31 Length calculator Pending JPH0486953A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2201127A JPH0486953A (en) 1990-07-31 1990-07-31 Length calculator

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2201127A JPH0486953A (en) 1990-07-31 1990-07-31 Length calculator

Publications (1)

Publication Number Publication Date
JPH0486953A true JPH0486953A (en) 1992-03-19

Family

ID=16435863

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2201127A Pending JPH0486953A (en) 1990-07-31 1990-07-31 Length calculator

Country Status (1)

Country Link
JP (1) JPH0486953A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0565348A2 (en) * 1992-04-08 1993-10-13 SHARP Corporation Electronic measuring apparatus
JP2009009256A (en) * 2007-06-27 2009-01-15 Cambria Language Service:Kk Drawing system
CN103761404A (en) * 2014-02-16 2014-04-30 谢红军 Configurable control method and operation indicator

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0565348A2 (en) * 1992-04-08 1993-10-13 SHARP Corporation Electronic measuring apparatus
EP0565348A3 (en) * 1992-04-08 1995-08-23 Sharp Kk Electronic measuring apparatus
JP2009009256A (en) * 2007-06-27 2009-01-15 Cambria Language Service:Kk Drawing system
CN103761404A (en) * 2014-02-16 2014-04-30 谢红军 Configurable control method and operation indicator

Similar Documents

Publication Publication Date Title
JPH08314621A (en) Method and device for image generation
JP2010148811A (en) Ultrasonic diagnostic apparatus
JP3485406B2 (en) Function calculator with graph function
JPH0486953A (en) Length calculator
JP2005032015A (en) Electronic device and program
JP2003281102A (en) Graph display controller
JPH0454629A (en) Image display device
JPH08240447A (en) Analog type display measuring meter and its display method
JPH0212516A (en) Actual dimension display system
JP3263140B2 (en) Three-dimensional pointing support system and method
JPS60256807A (en) Method and device for teaching robot
JP3027905B2 (en) Operability evaluation device
JPH0421154Y2 (en)
JP2522787Y2 (en) Image processing device
JP2953285B2 (en) Pointing device
JPH02310678A (en) Graphic processing system
JP2004118447A (en) Logarithmic axial graph plotter and logarithmic axial graph plotting processing program
JPH11248870A (en) Time indication method for information processor having schedule function, information processor and recorded medium
JPS61165792A (en) Scale display unit
JP2570858B2 (en) How to enter discrete quantities
JP2801288B2 (en) Graphic input device
JPS62114062A (en) Design supporting device
JPS6258379A (en) Adverse simulation device for graph transformation
JP2571178B2 (en) 3D graphics processor
JP2001092789A (en) Calculating device and storage medium