JPH02240776A - Straight line picking system and curve generating system - Google Patents

Straight line picking system and curve generating system

Info

Publication number
JPH02240776A
JPH02240776A JP6091389A JP6091389A JPH02240776A JP H02240776 A JPH02240776 A JP H02240776A JP 6091389 A JP6091389 A JP 6091389A JP 6091389 A JP6091389 A JP 6091389A JP H02240776 A JPH02240776 A JP H02240776A
Authority
JP
Japan
Prior art keywords
straight line
point
points
pick
curve
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.)
Granted
Application number
JP6091389A
Other languages
Japanese (ja)
Other versions
JP2644880B2 (en
Inventor
Shinji Wakizaka
新路 脇坂
Kazuko Hasegawa
和子 長谷川
Norio Tanaka
紀夫 田中
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP6091389A priority Critical patent/JP2644880B2/en
Publication of JPH02240776A publication Critical patent/JPH02240776A/en
Application granted granted Critical
Publication of JP2644880B2 publication Critical patent/JP2644880B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Processing Or Creating Images (AREA)
  • Image Processing (AREA)
  • Image Generation (AREA)

Abstract

PURPOSE:To attain a straight line picking process at a high speed and with high accuracy by deciding an area to a straight line connecting two points which are shifted in the two directions vertical to the straight line and opposite to each other from a picking point by a picking range. CONSTITUTION:The coordinate data Q0, Q1 on a curve are produced from the control data which prescribes the curve, and both data Q0 and Q1 are connected to each other with a straight line 10 for production of pseudo curve. At the same time, the tilt of the line 10 is obtained from both end points of the line 10. Then two points P1 and P2 are decided by moving along the direction vertical to the line 10 from a point set on the curve formed between both ends of the line 10 into the two directions opposite to each other by an extent equal to an allowable error. Then a curve interpolation is carried out to decide an allowable error for three points P0, P1 and P2 via a straight line picking process which decides an area to the line 10. As a result, the set value for decision of the allowable error is never changed by the tilt of the line 10 and an error can be decided with high accuracy with no application of a distance calculation. Then a curve interpolation is attained at a high speed and with high accuracy.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、コンピュータグラフィックス分野における直
線のピック処理、すなわち指定された1点から直線に対
して重直な方向へ発生した2点により直線を抽出する直
線のピック方式に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to straight line picking processing in the field of computer graphics, that is, to pick a straight line by two points generated from a specified point in a direction perpendicular to the straight line. Concerning the straight line pick method for extracting .

〔従来の技術〕[Conventional technology]

図形をピックする従来のピック処理では、指定された1
点からピック枠を構成し、ピックの対象となる図形を描
画し、ピック枠内に描画される図形が発見された時点で
この図形をピックされた図形として抽出し、ピック処理
を行っていた。ところが、この方式では、ピック処理に
時間がかかってしまい、高速なピック処理手法が望まれ
ていた。
In the conventional pick process of picking shapes, the specified 1
A pick frame is constructed from points, a figure to be picked is drawn, and when a figure to be drawn within the pick frame is found, this figure is extracted as a picked figure and pick processing is performed. However, with this method, the pick processing takes time, and a high-speed pick processing method has been desired.

そこで、第5図に示す特開昭63−143675号公報
記載のピック処理方式が提案された。
Therefore, a pick processing method as shown in FIG. 5 and described in Japanese Unexamined Patent Publication No. 143675/1983 was proposed.

このピック方式では、初めに、ピック点2P。In this pick method, first, pick point 2P is selected.

(χP、1.ンPa)から4隅点20P工〜P4を発生
させる。
Four corner points 20P to P4 are generated from (χP, 1. Pa).

次に、この4隅点20すべてにおいて、直線10a、z
+bン+c =Oの左辺の刀、ンへ各点の座標の値を代
入し符号判定を行う。
Next, at all four corner points 20, straight lines 10a, z
+b+c = Assign the coordinate values of each point to the left side of O and check the sign.

判定の結果、PユからP4の1つでも零となれば。As a result of the judgment, if even one of Pyu to P4 is zero.

直線はピンクされる。また、1つでも異符号の式があれ
ば、直線はピックされる。全てが同符号であれば、直線
はピックされない。
Straight lines are pink. Also, if even one equation has a different sign, a straight line is picked. If all have the same sign, no straight line is picked.

以上の3つの条件判定により直線のピック処理を行う。Straight line pick processing is performed based on the above three condition determinations.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

この4隅点を発生させ、各点の直線に対する領域判定(
直線上か負領域か正領域かの判定)を行う直線のピック
方式においては、ピック枠を用いたピック処理に比べ高
速にピック処理を行うことができる。しかしながら、ピ
ック処理を精度よく行いたい場合に、ピックの対象とな
る直線の傾きによって、ピック点(4隅点の中心点)か
らの距離が異なってしまう。(第5図に示したQ工と嚢
、)また、ピック点に対して、直線の存在する方向は、
一方向であり、4隅点のうち3点ないし2点の領域判定
は結果的に必要ない処理を行っていることになる。
These four corner points are generated, and area judgment (
In the straight line pick method, which performs determination of whether an object is on a straight line, a negative area, or a positive area, pick processing can be performed faster than pick processing using a pick frame. However, when it is desired to perform pick processing with high precision, the distance from the pick point (the center point of the four corner points) varies depending on the slope of the straight line that is the pick target. (Q-work and bag shown in Figure 5) Also, the direction of the straight line with respect to the pick point is
It is unidirectional, and area determination of three or two of the four corner points results in unnecessary processing.

従って、本発明の一つの目的は、あらゆる向きの直線に
対しても等しいピック範囲でピック処理を行い、ピック
処理の精度を上げることである。
Therefore, one object of the present invention is to improve the accuracy of the pick process by performing the pick process in the same pick range for straight lines in all directions.

本発明の目的は、ピック処理の高速化である。An object of the present invention is to speed up the pick process.

〔課題を解決するための手段〕[Means to solve the problem]

本発明によれば、指定された1点(ピック点)がピック
枠を構成し1直線をピックする方式において、直線上の
2点より直線の傾きを求め、直線に垂直な方向を定め、
その方向に沿って、ピック点から相反する2方向へピッ
ク範囲量移動した両端点を発生させ、判別式によりピッ
ク点及び両端点の直線に対する領域判定を行いピック処
理する直線ピック方式が提供される。
According to the present invention, in a method in which one designated point (pick point) constitutes a pick frame and one straight line is picked, the slope of the straight line is determined from two points on the straight line, the direction perpendicular to the straight line is determined,
A straight line pick method is provided in which both end points are generated by moving the pick range amount in two opposite directions from the pick point along that direction, and the area of the straight line between the pick point and both end points is judged based on a discriminant and the pick processing is performed. .

さらに、ピックの対象となる直線の傾きの符号だけを判
定し、固定されたピック範囲拡張方向へピック点から相
反する方向へピック範囲量移動した両端点を発生させ1
判別式によりピック点及び両端点の直線に対する領域判
定を行いピック処理する直線ピック方式が提供される。
Furthermore, only the sign of the slope of the straight line to be picked is determined, and both end points are generated by moving the pick range amount in the opposite direction from the pick point in the fixed pick range expansion direction.
A straight line pick method is provided which performs pick processing by determining the area of a straight line between a pick point and both end points using a discriminant.

また1本発明によれば、指定された1点(ピック点)が
1直線をピックする方式を採用した曲線補間方式におい
て、曲線を規定する制御データから曲線上の座標データ
を発生させ、発生座標データを直線で結ぶことにより、
疑似的な曲線を発生するとき、直線の両端点から直線の
傾きを求め、直線に垂直な方向を定め、その方向に沿っ
て、さらに直線の両端点間の曲線上の点から相反する2
方向へ許容誤差の量移動した2点を発生し、判別式によ
り、直線の両端点間の曲線上の点及び2点の直線に対す
る領域判定を行い、直線がピックされたか否かにより許
容誤差判定を行いながら、曲線を発生させる曲線補間方
式が提供される。
Further, according to the present invention, in a curve interpolation method in which one designated point (pick point) picks one straight line, coordinate data on the curve is generated from control data that defines the curve, and By connecting the data with straight lines,
When generating a pseudo curve, find the slope of the straight line from both end points, determine the perpendicular direction to the straight line, and then calculate the opposite two points along that direction from the points on the curve between the end points of the straight line.
Generate two points that have moved by an amount of tolerance in the direction, and use the discriminant to determine the area for the point on the curve between the two end points of the straight line and the straight line between the two points, and determine the tolerance based on whether or not the straight line has been picked. A curve interpolation method is provided that generates a curve while performing.

さらに、ピック点が1直線をピックする方式を採用した
曲線補間方式において、直線の両端点から直線の傾きの
符号だけを判定し、固定されたピック範囲拡張方向を定
め、その方向に沿って、さらに直線の両端点間の曲線上
の点から相反する2方向へ許容誤差の量移動した2点を
発生し、判別式により、直線の両端点間の曲線上の点及
び、2点の直線に対する領域判定を行い、直線がピック
されたか否かにより許容誤差判定を行いながら、曲線、
&発生させる曲線補間方式が提供される。
Furthermore, in a curve interpolation method that picks a straight line with one pick point, only the sign of the slope of the straight line is determined from both end points of the straight line, a fixed pick range expansion direction is determined, and along that direction, Furthermore, we generate two points that are moved by the amount of tolerance in two opposite directions from the point on the curve between the two end points of the straight line, and use the discriminant to calculate the points on the curve between the two end points of the straight line and the two points While determining the area and determining the tolerance based on whether or not a straight line was picked, curves,
& A curve interpolation method for generating is provided.

〔作用〕[Effect]

本発明によれば、ピック点が1直線をピックする方式に
おいて、従来方式がピック枠の4隅点について、ピック
の対象となる直線に対し、それぞれ領域判定を行い、そ
の判定結果によりピック処理を行っていたのに対して、
ピック点から直線に垂直な相反する2方向へピック範囲
量移動した2点とピック点の計3点、あるいは、2点だ
けによりピック処理を行うことから、あらゆる向きの直
線に対しても等しいピック範囲で、精度の高い、高速な
ピック処理が実現できる。
According to the present invention, in the method of picking a straight line with one pick point, the conventional method performs area determination for each of the four corner points of the pick frame for the straight line to be picked, and performs pick processing based on the determination result. Whereas I was going
Since pick processing is performed using only two points, two points moved by the pick range amount in two opposing directions perpendicular to the straight line from the pick point and the pick point, or the pick process is performed using only two points, the same pick value can be obtained for straight lines in all directions. Accurate, high-speed pick processing can be achieved within a certain range.

また、ピックの対象となる直線の傾きの符号だけから、
固定されたピック範囲拡張方向を決定し、上記ピック処
理を行うことから、さらに高速なピック処理が実現でき
る。
Also, from only the sign of the slope of the straight line to be picked,
By determining a fixed pick range expansion direction and performing the above pick processing, even faster pick processing can be achieved.

本発明によれば、ピック点が1直線をピックする方式を
採用した直線補間方式において1曲線を規定する制御デ
ータから曲線上の座標データを発生させ、発生座標デー
タを直線で結ぶことにより。
According to the present invention, coordinate data on a curve is generated from control data that defines one curve in a linear interpolation method in which pick points pick one straight line, and the generated coordinate data are connected with a straight line.

直線の傾きを求め、直線に垂直な方向を定め、その方向
に沿って、さらに直線の両端点間の曲線上の点から相反
する2方向へ許容誤差の量移動した2点を発生し、計3
点について、直線に対する領域判定を行う直線のピック
処理により許容誤差判定をする曲線補間を行うことから
、許容誤差判定の設定値が直線の傾きにより変化せず、
精度の高い誤差判定を距離計算を使わずに実現でき、精
度の高い、高速な曲線補間が可能となる。
Find the slope of the straight line, determine the direction perpendicular to the straight line, and along that direction, generate two points that are moved by an amount of tolerance in two opposite directions from the point on the curve between the two end points of the straight line, and calculate. 3
For points, since curve interpolation is performed to determine tolerance by straight line pick processing, which performs region determination for straight lines, the set value for tolerance determination does not change depending on the slope of the straight line.
Highly accurate error determination can be achieved without using distance calculations, and highly accurate and high speed curve interpolation is possible.

また、ピック対象となる直線の傾きの符号だけから、固
定されたピック範囲拡張方向を決定し、上記許容誤差判
定を行うことから、さらに高速な曲線補間が可能となる
Further, since the fixed pick range expansion direction is determined only from the sign of the slope of the straight line to be picked, and the above-mentioned allowable error determination is performed, even faster curve interpolation is possible.

〔実施例〕〔Example〕

以下、本発明の一実施例を第1図により説明する。第1
図において、1はピックの対象となる直線の両端点であ
り、2は直線をピックするためのポイント位置を表すピ
ック点である。3はピック判定部である。ピック判定部
3は、ピック2点生成手段4と判別式生成手段5とピッ
ク判定手段6から楕成されている。7はピックの対象と
なる直線がピックされたか否かの判定結果である。
An embodiment of the present invention will be described below with reference to FIG. 1st
In the figure, 1 is both end points of a straight line to be picked, and 2 is a pick point representing a point position for picking the straight line. 3 is a pick determination section. The pick determination section 3 is formed into an ellipse including a pick two point generation means 4, a discriminant generation means 5, and a pick determination means 6. 7 is a determination result as to whether or not the straight line to be picked has been picked.

次に動作について説明する。第2図は、第1図の楕成に
よりピックの対象となる直線がピック点2によりピック
される様子を示した図である。
Next, the operation will be explained. FIG. 2 is a diagram showing how a straight line to be picked by the ellipse shown in FIG. 1 is picked by pick point 2.

初めに、ピックの対象也なる直線の両端点1の座標値Q
0(2−0,ン。)、Q工(2−8,ン、)とピック点
2の座標値P o (Z POt > pa )がピッ
ク判定部3へ入力される。
First, the coordinate value Q of both end points 1 of the straight line that is also the target of picking
0 (2-0, n.), Q (2-8, n.), and the coordinate value P o (Z POt > pa) of the pick point 2 are input to the pick determination section 3 .

入力された両端点IQ、にc。、ン。)、Q□(力よ。c to the input endpoints IQ,. ,hmm. ), Q□ (Power!

71)及び、ピック点2(尤Pa pンPa)は、ピッ
ク2点生成手段4へ入力される。そこでは、直線の両端
点Q、 Q、間の2軸方向、ン軸方向への距離Δ2,8
.Δり9を次式から計算する。
71) and the pick point 2 (Y Pa pn Pa) are input to the pick 2 point generating means 4. There, the distance between the two end points Q and Q of the straight line in the two-axis direction and the n-axis direction is Δ2,8
.. Calculate Δr9 from the following formula.

また、ピックの対象である直線10の傾きm=Δり/Δ
尤を求める。
Also, the slope m of the straight line 10 that is the target of picking = Δri/Δ
seek meaning.

さらに、ピック点2を通り、直線10に垂直な方向、す
なわち、ピック点2を通り(−7rL)の傾きをもった
直線方向を求め、ピック範gfiQ 11だけ、ピック
点2から直線10に垂直な相反する2方向へ移動し、新
たな2点Px(Zp□、りpi) 12− Pg(χt
q t > pg ) 13を判定点として発生する。
Furthermore, a direction that passes through pick point 2 and is perpendicular to straight line 10, that is, a straight line direction that passes through pick point 2 and has an inclination of (-7rL), is determined, and a pick range gfiQ 11 is perpendicular to straight line 10 from pick point 2. Move in two contradictory directions and create two new points Px (Zp□, Ripi) 12- Pg(χt
q t > pg ) 13 is generated as a determination point.

このときの力軸方向、>軸方向への移動方向、及び移動
量の比d、 ;e 14/ d、 > 15と直線10
の傾きm(Δり/Δ2−)との間には次に示すような関
係がある。
At this time, the force axis direction, the direction of movement in the >axis direction, and the ratio of the amount of movement d, ;e 14/ d, > 15 and the straight line 10
There is a relationship as shown below between the slope m (Δri/Δ2−).

i)傾きm(Δ>/Δ2−)が正の値の場合l傾きm(
Δり/Δカ)が負の値の場合ctカ/−7=Δり/Δ2
 ・・・・・・(2)このとき、ピック点P m (j
Z Pa t ンP@)を通り、直線10に平行な2方
向、(ピック点2を原点に考えた場合の第1.第3象呪
の領域)すなわち、ピックの対象となる直線が存在しな
い方向へはピック範囲を持たないので、ピック判定処理
を縮小することができる。
i) If the slope m(Δ>/Δ2−) is a positive value, the slope m(
If ΔR/ΔF) is a negative value, ctF/-7=ΔR/Δ2
(2) At this time, the pick point P m (j
2 directions parallel to the straight line 10 (areas of the 1st and 3rd quadrants when pick point 2 is considered as the origin), that is, there is no straight line that is the target of the pick Since there is no pick range in the direction, the pick determination process can be reduced.

次に、判別式生成手段5において、直線の両端点IQ0
(尤。、ン。)、Q工(尤□、>、)から、判別式が次
式により求まる。
Next, in the discriminant generating means 5, both end points of the straight line IQ0
(尤., ん.), Q工 (尤□, >,), the discriminant can be found by the following equation.

C5二Laz パ3よ二らa’−””  7−x−> 
E・(3)1     1        II 山     b        c 判別式D=山z + bン+C 次に1判別式生成手段5によって求められた判別式D=
a、カ+b>+cから、ピック判定手段6により直線1
0がピックされたか否かを判定する。
C5 2 Laz Pa 3 yo 2 a'-""7-x->
E・(3)1 1 II Mountain b c Discriminant D = Mountain z + b + C Next, the discriminant D = obtained by the 1 discriminant generating means 5
From a, +b>+c, the pick determining means 6 draws a straight line 1.
Determine whether 0 is picked.

まず、初めに、ピック点2P0(ヵPa + ンpo)
を判別式に代入する。
First, pick point 2P0 (KaPa + npo)
Substitute into the discriminant.

a、r、p、、+b>p、+c 代入した値(山;c pg + bンp、、+c)=O
ならば。
a, r, p,, +b>p, +c Substituted value (mountain; c pg + bp,, +c) = O
If so.

ピック点P、2は直線10上にあり、ただちに直線lO
はピックされる。
The pick point P,2 is on the straight line 10 and immediately moves to the straight line lO
is picked.

a、、tp、+bンPa + c ) Oならば、Po
は直線に対して正領域、o−zp0+bンp0+ c 
< Oならば負領域に存在する。そこで、Poの存在す
る領域を覚えておく。
a,, tp, +b Pa + c) If O, then Po
is a positive region with respect to the straight line, o-zp0+bnp0+c
<O, it exists in the negative region. Therefore, remember the area where Po exists.

次に、ピック2点生成手段4により発生したP工12.
 P、13についても同様な判別を行う。
Next, the P work 12 generated by the pick two point generating means 4.
Similar determination is made for P and 13 as well.

第2図に示すように、ピック点2 P O(2−Pa 
をンPa)は判別式D=a、zp、+bンp、、 + 
c > Oから正領域に存在するa Pi(zpxy 
>pよ)12は判別式D=山zp1+bンPi + c
 < Oから負領域に存在する。Pi(Epz+ >p
a) 13は正領域に存在する。この場合、ピック点P
02に対して、2点P工12.P。
As shown in Fig. 2, pick point 2 P O (2-Pa
Pa) is the discriminant D=a, zp, +bp,, +
a Pi (zpxy
> p ) 12 is the discriminant D = mountain zp1 + b Pi + c
< Exists in the negative region from O. Pi(Epz+ >p
a) 13 exists in the positive region. In this case, pick point P
For 02, 2 points P work 12. P.

13のどちらか一方が異なる領域に存在すると判別され
、直線10はピックされたことになる。また、両方とも
に同じ領域であったならば、直1/lAl0はピックさ
れない0以上のようなピック判定手段6により1判定結
果7が出力される。
13 is determined to exist in a different area, and the straight line 10 has been picked. Further, if both are in the same area, the pick determination means 6 outputs a 1 determination result 7 such that the direct 1/lAl0 is not picked and is greater than or equal to 0.

以上述べた方式により、まず、第一に、ピック判定をピ
ック点P、2と2点P□12. P、13の計3点のみ
でピック判定を行うことから乗算、加算だけによる演算
とその規模を縮小でき、高速な直線のピック処理が可能
になる。第二に、ピックの対象となる傾きmにより、あ
らゆる直線に対しても垂直な2方向へ1等しいピック範
囲R11を任意に設定できることから、精度の高い直線
のピック処理が可能になる。
Using the method described above, first, pick judgment is performed at pick points P, 2, and 2 points P□12. Since pick determination is performed using only three points, P and 13, it is possible to reduce the scale of calculations based only on multiplication and addition, and it is possible to perform high-speed straight line pick processing. Second, since the pick range R11 equal to 1 can be arbitrarily set in two directions perpendicular to any straight line depending on the slope m to be picked, highly accurate straight line pick processing is possible.

また、ピックの対象となる直線の傾きの符号だけを判定
し、あらかじめ固定されたピック範囲拡張方向(己z 
= d、ン)へピック処理を行うことにより、さらに高
速なピック処理が実現可能である。
In addition, only the sign of the slope of the straight line to be picked is determined, and the pick range expansion direction (self-z
= d, n), even faster pick processing can be achieved.

本発明を曲線発生に応用した他の一実施例を第3図によ
り説明する。第3図は、3次のベヅエ曲線を規定する制
御座標データC0(16山)、CI(16b)C2(1
6c)、 C3(16d、)から3次のベヅ工曲線式で
表される曲線17上の座標データQ (t 08を計算
し、プロットし、さらにそれらを直線で結ぶことにより
、ベヅエ曲線19を疑似的に発生させた図である。この
とき、疑似的なベヅエ曲線補間の精度を上げるために、
疑似的に発生させた曲線19と理想的な曲線17との誤
差(flatness)を判別しながら疑似的な曲線1
9を発生する方式がある。この方式において、本発明の
直線のピック方式を用いたベヅエ曲線補間方式について
説明する。
Another embodiment in which the present invention is applied to curve generation will be described with reference to FIG. Figure 3 shows control coordinate data C0 (16 peaks), CI (16b), C2 (1
6c), From C3 (16d,), by calculating the coordinate data Q (t08) on the curve 17 expressed by the cubic Bezuer curve equation, plotting them, and connecting them with a straight line, we can obtain the Bezuer curve 19. This is a diagram in which the pseudo-Bezuer curve interpolation is generated in a pseudo manner.
The pseudo curve 1 is determined while determining the error (flatness) between the pseudo curve 19 and the ideal curve 17.
There is a method for generating 9. In this method, a Bezuer curve interpolation method using the straight line pick method of the present invention will be described.

初めに、ベヅエ曲線式を用いて、曲線上の座標データQ
(1/2)を算出する。二のQ (1/2)をピック点
P02として、直線Q(0)Q(1)に対して疑似的な
曲線と理想的な曲線との許容誤差範囲をピック範囲+2
11としてピック処理を行う、このとき、直線Q(0)
Q(1)はピックされず、すなわち、Q (1/2)は
直線Q(0)Q(1)から許容誤差範囲を超えているこ
とになる。
First, coordinate data Q on the curve is calculated using the Bezuer curve equation.
Calculate (1/2). With the second Q (1/2) as the pick point P02, the allowable error range between the pseudo curve and the ideal curve for the straight line Q(0)Q(1) is the pick range + 2
Pick processing is performed as 11. At this time, the straight line Q(0)
Q(1) is not picked, that is, Q (1/2) is outside the allowable error range from the straight line Q(0)Q(1).

このときは、理想曲線に近づけるには更に座標データQ
を発生させる必要があるので次に1曲線上の座標データ
Q (1/4)及びQ (3/4)を算出する。同様に
して、Q (1/4)は直線ピック処理を行う。このと
き、直線Q(0)Q(1/)2)と直線Q(1/2)Q
(1)はいずれもピックさt・) れず、Q (1/4)、及びQ (3/4)は直線Q(
0)Q(1/2)及びQ(1/2)Q(1)から許容誤
差範囲外にある。
In this case, to get closer to the ideal curve, further coordinate data Q
Since it is necessary to generate , coordinate data Q (1/4) and Q (3/4) on one curve are calculated next. Similarly, Q (1/4) performs straight line pick processing. At this time, the straight line Q(0)Q(1/)2) and the straight line Q(1/2)Q
None of (1) is picked t・), and Q (1/4) and Q (3/4) are straight lines Q (
0) Q(1/2) and Q(1/2)Q(1) are outside the allowable error range.

同様にして、Q (1/8)、Q (3/8)、Q(5
/8)、Q (7/8)を算出し、ピック処理を行う。
Similarly, Q (1/8), Q (3/8), Q (5
/8), Q (7/8), and perform pick processing.

このとき初めて、直線Q(0)Q(1/4)。For the first time, the straight line Q(0)Q(1/4).

Q (3/g)s Q (5/8)、Q (7/8)は
直て、許容誤差範囲内に位置していることになる。
Q (3/g)s Q (5/8) and Q (7/8) are clearly within the allowable error range.

そこで、このときはQ (1/8)、Q (3/8)。So, in this case, Q (1/8), Q (3/8).

Q (5/8)、Q (7/8)は曲線上のデータ点と
して発生させずに、量線的に、始点Q (0) 。
Q (5/8) and Q (7/8) are not generated as data points on the curve, but rather, quantitatively, at the starting point Q (0).

c;) (1/4) 、 Q (1/2) 、 Q (
3/4) 、終点Q(1)を直線で結んだ疑似的なベヅ
エ曲線を発生することができ、疑似曲線と理想曲線との
誤差は許容誤差範囲内になっている。
c;) (1/4) , Q (1/2) , Q (
3/4), a pseudo Bezuer curve connecting the end point Q(1) with a straight line can be generated, and the error between the pseudo curve and the ideal curve is within the allowable error range.

従来の曲線補間では、この誤差判定を実際の距離計算に
よって行っていたため、処理に時間がかかっていたが、
本方式により、あらゆる直線に対しても垂直方向へピッ
ク範囲を設定できることから、精度の高い誤差判定をル
ート計算を用いずにでき、さらに処理時間を短縮するこ
とができる。
In conventional curve interpolation, this error determination was done by actual distance calculation, which took a long time to process.
With this method, the pick range can be set in the vertical direction for any straight line, so highly accurate error determination can be made without using route calculations, and processing time can be further shortened.

第4図は、本発明の他の一実施例を示す図である。FIG. 4 is a diagram showing another embodiment of the present invention.

第2図において、ピック範ll111Qを最小単位にと
る。そこで、ピックの対象となる直線10に対してピッ
ク判定部3によりピック処理を行う、このとき、直m1
0がピックされなかった場合、ピック範囲11Ωを2*
2として同様にピック処理を行う。
In FIG. 2, the pick range 1111Q is taken as the minimum unit. Therefore, the pick determination unit 3 performs pick processing on the straight line 10 to be picked. At this time, the straight line m1
If 0 is not picked, pick range 11Ω by 2*
2, pick processing is performed in the same manner.

この操作を直線10がピックされるまで、n回行う。This operation is repeated n times until the straight line 10 is picked.

以上より、ピック範囲拡張方向がピックされる直線に対
して、垂直方向であることから、ピック点P 62 (
2−Pa y ) PG )と直線10上の2点Qo(
:catンo) 、 Q工(2−0,り、)1の情報だ
けから、ピック点と直線との距離をルート演算を使わず
に測定することができる。
From the above, since the pick range expansion direction is perpendicular to the picked straight line, the pick point P 62 (
2-Pay) PG) and two points Qo(
The distance between the pick point and the straight line can be measured without using route calculations from only the information of :catn o) and Q-technique (2-0, ri,)1.

〔発明の効果〕〔Effect of the invention〕

以上説明したように本発明によれば、ピックの対象とな
る直線において、ピック点から直線に垂直な相反する2
方向へピック範囲量移動した2点の直線に対する領域判
定によりピック処理を行うことにより、精度の高い、高
速な直線のピック処理が実現できる。
As explained above, according to the present invention, in a straight line to be picked, there are two opposing directions perpendicular to the straight line from the pick point.
By performing pick processing by area determination for two straight lines that have been moved by the pick range amount in the direction, highly accurate and high-speed straight line pick processing can be realized.

さらに、本発明によれば、ピック点が1直線をピックす
る方式を採用した曲線補間方式において、疑似的に発生
させた直線により構成された曲線と理想的な曲線との許
容誤差判定を、あらゆる角度をもった直線に対しても等
しいピック範囲量でピックするピック処理により行うこ
とから、精度の高い、高速な曲線補間処理が実現できる
Furthermore, according to the present invention, in a curve interpolation method in which a straight line is picked with one pick point, the tolerance judgment between a curve made of pseudo-generated straight lines and an ideal curve can be performed in any way possible. Since the pick process is performed by picking the same amount of pick range even for straight lines with angles, highly accurate and high-speed curve interpolation process can be realized.

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

第1図は、この発明の一実施例を示す直線のピック処理
ブロック図である。 第2図は、ピックの対象となる直線がピック点によりピ
ックされる様子を表している図である。 第3図は、他の実施例を示す誤差判定にピック処理を使
ったベヅエ曲線補間を表した図である。 第4図は、他の実施例を示すピック処理を使った点と直
線の距離測定を表した図である。 第5図は、従来技術の方式を示す4隅点より直線のピッ
クを行うピック処理の説明図である。 1・・・ピックの対象となる直線の両端点、2・・・ピ
ック点、     3・・・ピック判定部。 4・・・ピック2点生成手段、 5・・・判別式生成手段、 6・・・ピック判定手段、
7・・・判定結果。 邦2圓 拓7 第4国 才 第 目
FIG. 1 is a straight line pick processing block diagram showing an embodiment of the present invention. FIG. 2 is a diagram showing how a straight line to be picked is picked by pick points. FIG. 3 is a diagram showing Bezuer curve interpolation using pick processing for error determination, showing another embodiment. FIG. 4 is a diagram showing distance measurement between a point and a straight line using pick processing, showing another embodiment. FIG. 5 is an explanatory diagram of a pick process in which a straight line is picked from four corner points, showing a method of the prior art. 1...Both end points of a straight line to be picked, 2...Pick point, 3...Pick determination unit. 4... Pick 2 point generation means, 5... Discriminant generation means, 6... Pick determination means,
7... Judgment result. Country 2 Entaku 7 4th national talent

Claims (1)

【特許請求の範囲】 1、直線が指定点から一定の領域内に有るか否かを判定
する事により直線のピック判定を行う直線ピック方式に
おいて、前記指定点から前記直線に垂直な方向に前記指
定点から所定の距離移動した判定点を発生し、前記判定
点および前記指定点が前記直線の正負いずれの領域に存
在するかを判定し、一方の点が正領域に存在し他方の点
が負領域に存在する場合にピックされたと判定する直線
ピック方式。 2、請求項1において、直線上の2点Q_0(X_0、
Y_0)、Q_1(X_1、Y_1)から判別式D=(
Y_1−Y_0)X−(X_1−X_0)Y−(X_0
Y_1−X_1Y_0)を求め、前記指定点の座標値P
_0(X_0、Y_0)及び前記判定点の座標値P_1
(X_1、Y_1)を前記判別式に代入し、前記判別式
の正負により領域判定を行う事を特徴とする直線ピック
方式。 3、請求項1において、前記判定点は前記指定点に対象
な2点に発生される事を特徴とする直線ピック方式。 4、請求項1において、前記直線上の少なくとも2点か
ら前記直線の傾きを求め、求められた傾きから前記直線
に垂直な方向を求め、前記判定点を発生する事を特徴と
する直線ピック方式。 5、理想の曲線上の複数の点を直線でむすび、疑似曲線
を発生する曲線発生方式において、理想の曲線上の隣接
する2点A、Bを結ぶ理想曲線AB上に発生した指定点
から前記2点A、Bを結ぶ直線A−Bに垂直な方向に前
記指定点から許容誤差距離Lだけ移動した判定点を発生
し、前記判定点及び前記指定点が前記直線A−Bの正負
いずれの領域に存在するかを判定し、一方の点が正領域
に存在し他方の点が負領域に存在する場合に許容誤差範
囲内と判定することを特徴とする曲線発生方式。 6、理想の曲線上の2点を直線で結ぶとともに、理想曲
線と発生させた直線との距離判定を行い、距離が許容誤
差範囲内になるまで2点間に新たな点を順次発生させる
ことにより疑似曲線を理想曲線に近付ける曲線発生方式
において、理想の曲線上の隣接する2点を結ぶ理想曲線
上に発生した指定点から前記2点を結ぶ直線に垂直な方
向に前記指定点から許容誤差距離だけ移動した判定点を
発生し、前記判定点及び前記指定点が前記直線の正負い
ずれの領域に存在するかを判定し、一方の点が正領域に
存在し他方の点が負領域に存在する場合に許容誤差範囲
内と判定し、その2点間における新たな点の発生を中止
することを特徴とする曲線発生方式。
[Claims] 1. In a straight line pick method in which straight line picking is determined by determining whether a straight line is within a certain area from a specified point, A judgment point is generated that has moved a predetermined distance from the specified point, and it is determined whether the judgment point and the specified point are in the positive or negative area of the straight line, and one point is in the positive area and the other point is in the positive area. A straight line pick method that determines that it has been picked if it exists in the negative area. 2. In claim 1, two points Q_0(X_0,
Y_0), Q_1(X_1, Y_1), the discriminant D=(
Y_1-Y_0)X-(X_1-X_0)Y-(X_0
Y_1-X_1Y_0), and calculate the coordinate value P of the specified point.
_0 (X_0, Y_0) and the coordinate value P_1 of the determination point
A straight line pick method characterized in that (X_1, Y_1) is substituted into the discriminant and area determination is performed based on the sign of the discriminant. 3. The straight line pick method according to claim 1, wherein the determination points are generated at two points symmetrical to the specified point. 4. A straight line pick method according to claim 1, characterized in that the slope of the straight line is determined from at least two points on the straight line, a direction perpendicular to the straight line is determined from the determined slope, and the determination point is generated. . 5. In a curve generation method that generates a pseudo-curve by connecting multiple points on an ideal curve with a straight line, from the specified point generated on the ideal curve AB connecting two adjacent points A and B on the ideal curve A judgment point is generated that is moved by a tolerance distance L from the specified point in a direction perpendicular to the straight line A-B connecting the two points A and B, and the judgment point and the specified point are either positive or negative of the straight line A-B. A curve generation method characterized in that it is determined whether a point exists in a region, and if one point exists in a positive region and the other point exists in a negative region, it is determined that the point is within an allowable error range. 6. Connect two points on the ideal curve with a straight line, determine the distance between the ideal curve and the generated straight line, and successively generate new points between the two points until the distance is within the tolerance range. In a curve generation method that brings a pseudo-curve closer to an ideal curve by Generate a determination point that has moved by a distance, determine whether the determination point and the designated point are in the positive or negative region of the straight line, and one point exists in the positive region and the other point exists in the negative region. A curve generation method characterized by determining that the two points are within an allowable error range and stopping the generation of new points between those two points.
JP6091389A 1989-03-15 1989-03-15 Straight pick method and curve generation method Expired - Lifetime JP2644880B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP6091389A JP2644880B2 (en) 1989-03-15 1989-03-15 Straight pick method and curve generation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP6091389A JP2644880B2 (en) 1989-03-15 1989-03-15 Straight pick method and curve generation method

Publications (2)

Publication Number Publication Date
JPH02240776A true JPH02240776A (en) 1990-09-25
JP2644880B2 JP2644880B2 (en) 1997-08-25

Family

ID=13156097

Family Applications (1)

Application Number Title Priority Date Filing Date
JP6091389A Expired - Lifetime JP2644880B2 (en) 1989-03-15 1989-03-15 Straight pick method and curve generation method

Country Status (1)

Country Link
JP (1) JP2644880B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109285206A (en) * 2018-09-19 2019-01-29 广州盖特软件有限公司 A kind of method and device of lines inductive pick-up

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109285206A (en) * 2018-09-19 2019-01-29 广州盖特软件有限公司 A kind of method and device of lines inductive pick-up

Also Published As

Publication number Publication date
JP2644880B2 (en) 1997-08-25

Similar Documents

Publication Publication Date Title
Feng et al. Straightness error compensation for large CNC gantry type milling centers based on B-spline curves modeling
US4215299A (en) Adaptive path following motion control system for welding head assembly
CN109656250A (en) A kind of path following method of laser fork truck
CN107421545A (en) Position deviation detection method, device and the robot of a kind of robot
CN111949036B (en) Trajectory tracking control method and system and two-wheeled differential mobile robot
CN106285711A (en) A kind of top pipe deviation correcting control system based on optical fibre gyro and method thereof
JPH01109057A (en) Digitizing method
JP3126288B2 (en) Method of measuring rail rail shape
JPH02240776A (en) Straight line picking system and curve generating system
CN110531709B (en) Method for analyzing relation between machining error and feed rate of curved surface part
CN114019911B (en) Curve fitting method based on speed planning
CN113515091B (en) Real-time track interpolation method and device for corner smoothing spline
CN112344907B (en) Railway track level measurement method and system, readable storage medium and electronic equipment
JP3194395B2 (en) Path function sequential generation method
JP2737725B2 (en) Robot control device and method
JPH0728514A (en) Machine error deriving method
CN112518744A (en) Robot trajectory planning method and device and robot
JPH10277888A (en) Processing data modifying method and device
JPH0355263B2 (en)
JPH08257955A (en) Method for controlling manipulator in copying curved surface
CN114088113B (en) Odometer track alignment and precision evaluation method
CN116305459A (en) Boundary coordination method and equipment for running real-time hybrid test on magnetic levitation train axle
JP3520631B2 (en) Laser processing machine
JPH1145107A (en) Measuring method for calculating virtual pin corner position at curved surface corner part
CN117518984A (en) Robot machining contour error compensation method, device and medium