JPH11283048A - Overlap prevention method of moving object in computer graphics and device therefor - Google Patents

Overlap prevention method of moving object in computer graphics and device therefor

Info

Publication number
JPH11283048A
JPH11283048A JP10083666A JP8366698A JPH11283048A JP H11283048 A JPH11283048 A JP H11283048A JP 10083666 A JP10083666 A JP 10083666A JP 8366698 A JP8366698 A JP 8366698A JP H11283048 A JPH11283048 A JP H11283048A
Authority
JP
Japan
Prior art keywords
speed
shape
data storage
storage unit
collision
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
JP10083666A
Other languages
Japanese (ja)
Inventor
Ryuichi Hiraike
龍一 平池
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.)
NEC Corp
Original Assignee
NEC Corp
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 NEC Corp filed Critical NEC Corp
Priority to JP10083666A priority Critical patent/JPH11283048A/en
Publication of JPH11283048A publication Critical patent/JPH11283048A/en
Pending legal-status Critical Current

Links

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/60Methods for processing data by generating or executing the game program
    • A63F2300/64Methods for processing data by generating or executing the game program for computing dynamical parameters of game objects, e.g. motion determination or computation of frictional forces for a virtual car
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/60Methods for processing data by generating or executing the game program
    • A63F2300/64Methods for processing data by generating or executing the game program for computing dynamical parameters of game objects, e.g. motion determination or computation of frictional forces for a virtual car
    • A63F2300/643Methods for processing data by generating or executing the game program for computing dynamical parameters of game objects, e.g. motion determination or computation of frictional forces for a virtual car by determining the impact between objects, e.g. collision detection

Landscapes

  • Processing Or Creating Images (AREA)
  • Control Of Position, Course, Altitude, Or Attitude Of Moving Bodies (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a method and a device for preventing the overlap of moving objects with each other in computer graphics. SOLUTION: In a predicted position calculation part 2, a presence position after unit time is predicted and calculated based on the present moving speed of the object. A collision judgement part 3 judges whether or not it is to collide with the other object at the position, and in the case of colliding, a speed control part 4 evades the excessive cave-in of the objects with each other by calculating an object position immediately before a collision by using a simple geometrical operation and calculating back and correcting the speed so as to reach the position after the unit time further.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、コンピュータグラ
フィックスに関し、特に表示される動物体同士がオーバ
ーラップすることを防止するコンピュータグラフィック
スにおける動物体のオーバーラップ防止方法及びその装
置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to computer graphics, and more particularly to a method and apparatus for preventing overlapping of moving objects in computer graphics, which prevents displayed moving objects from overlapping each other.

【0002】[0002]

【従来の技術】一般に、運動シミュレーションは、物体
を数学的に扱える幾何形状としてモデル化し、運動すな
わち空間内での移動に伴い物体同士が衝突したか否かを
判定する。すなわち、衝突検出を行い、衝突が検出され
た場合には、衝突の仕方やその度合に応じて移動速度や
存在位置を更新するという処理を繰り返すことによって
実現している。この際、物体の形状が複雑であるとか衝
突判定の対象とすべき物体の数が多いといった理由か
ら、単位時間内における上記処理の繰り返し回数が減少
すると、運動計算すなわち移動物体の速度や位置を算出
する際の計算誤差が増大し、物体をコンピュータグラフ
ィックスで表現している場合には物体同士が互いにめり
込んだように表示されてしまうといった問題があった。
2. Description of the Related Art In general, in a motion simulation, an object is modeled as a geometric shape that can be mathematically handled, and it is determined whether or not the objects collide with each other in accordance with the motion, that is, the movement in space. That is, this is realized by performing a collision detection, and when a collision is detected, repeating a process of updating the moving speed and the existing position according to the manner and degree of the collision. At this time, if the number of repetitions of the above processing in a unit time is reduced because the shape of the object is complicated or the number of objects to be subjected to collision determination is large, the motion calculation, that is, the speed and the position of the moving object are reduced. There is a problem in that the calculation error in the calculation increases, and when the objects are represented by computer graphics, the objects are displayed as if they were immersed in each other.

【0003】従来、処理量が最も多い手続きのひとつで
ある衝突判定処理を高速化し、単位時間内における処理
の繰り返し回数を増して、めり込み現象の発生を抑制す
るという方法が採られてきた。
Conventionally, a method has been adopted in which the collision determination process, which is one of the procedures having the largest processing amount, is speeded up, the number of repetitions of the process per unit time is increased, and the occurrence of the immersion phenomenon is suppressed.

【0004】例えば、特開平2―224004号公報
(発明の名称;「移動体の干渉チェック装置」)に開示
されているように、球体を利用するなど、元の物体を被
覆する簡単な形状の物体を衝突検出のための代替物体と
して利用したり、さらには物体の初期位置や物体間の初
期関係に基づいて、対応する代替物体を階層的に構成す
ることで、衝突検出に要する時間の短縮を図っている。
For example, as disclosed in Japanese Patent Application Laid-Open No. 2-224004 (Title of Invention; "Interference Checking Device for Moving Object"), a simple shape covering an original object, such as using a sphere, is used. Reduce the time required for collision detection by using an object as an alternative object for collision detection, or by hierarchically configuring the corresponding alternative object based on the initial position of the object and the initial relationship between objects. Is being planned.

【0005】また、例えば特開平7―230559号公
報(発明の名称;「衝突判定処理システムおよびこれを
用いた画像処理装置」)に開示されているように、ひと
つの原物体に対して簡単な形状の代替物体を複数個用い
ることで、衝突検出の精度を低下させることなく処理の
高速化を図るという方法も知られている。
Further, as disclosed in, for example, Japanese Patent Application Laid-Open No. 7-230559 (title of the invention; "collision determination processing system and image processing apparatus using the same"), a simple original object There is also known a method in which a plurality of substitute objects having different shapes are used to increase the processing speed without lowering the accuracy of collision detection.

【0006】上述した従来の衝突検出装置の構成を図に
表すと、図6に示すようなものとなる。ただし、図6
は、上記特開平2―224004号公報、及び特開平7
―230559号公報に記載の内容に基づき本発明者が
新たに作成したものである。図6を参照すると、物体デ
ータ記憶部101と、衝突判定部103と、を備えて構
成されている。このうち、衝突判定部103は、代替形
状生成部1031と、判定部1032と、から構成さ
れ、代替形状生成部1031は、物体データ記憶部10
1から読み出した原形状に対応するひとつの簡単な形状
あるいは簡単な形状を複数個組み合わせた代替形状を生
成して、判定部1032に渡す。
FIG. 6 shows the configuration of the above-described conventional collision detection device as shown in FIG. However, FIG.
Are described in JP-A-2-224004 and JP-A-7-224.
It has been newly created by the inventor based on the contents described in Japanese Patent Publication No. 230559/1990. Referring to FIG. 6, the configuration includes an object data storage unit 101 and a collision determination unit 103. The collision determination unit 103 includes an alternative shape generation unit 1031 and a determination unit 1032, and the alternative shape generation unit 1031 includes the object data storage unit 10
One simple shape corresponding to the original shape read from No. 1 or an alternative shape obtained by combining a plurality of simple shapes is generated and passed to the determination unit 1032.

【0007】[0007]

【発明が解決しようとする課題】しかしながら、衝突判
定処理を高速化するという従来の方法では、たとえ簡単
な形状の代替物体を利用したとしても、運動シミュレー
ションの対象となる物体の数が多くなると、処理に要す
る時間が膨大となり、物体同士のめり込み現象(オーバ
ーラップ)が頻繁に発生したり、めり込みの度合が大き
くなる等、シミュレーション精度が低下するという問題
があった。
However, in the conventional method of speeding up the collision determination processing, even if a substitute object having a simple shape is used, if the number of objects to be subjected to the motion simulation increases, The time required for the processing becomes enormous, and there is a problem that the simulation accuracy is lowered, for example, the phenomenon of overlap (overlap) between the objects frequently occurs, the degree of the penetration is increased, and the like.

【0008】したがって、本発明は、上記問題点に鑑み
てなされたものであって、その目的は、物体の数が多い
場合でも、画面上における物体同士のオーバーラップを
防止することのできるコンピュータグラフィックスにお
ける動物体のオーバーラップ防止方法及びその装置を提
供することにある。
SUMMARY OF THE INVENTION Accordingly, the present invention has been made in view of the above problems, and has as its object to provide a computer graphic capable of preventing objects from overlapping on a screen even when the number of objects is large. An object of the present invention is to provide a method and an apparatus for preventing overlap of a moving object in a vehicle.

【0009】[0009]

【課題を解決するための手段】本発明によるコンピュー
タグラフィックスにおける動物体のオーバーラップ防止
方法は、物体の形状、位置及び速度を物体データとし格
納する物体データ記憶部から第1の物体の位置および速
度を読み出し、定められた時間後の前記第1の物体の予
測位置を算出する予測位置算出ステップと、前記物体デ
ータ記憶部から読み出した第2の物体の形状および位置
と、前記第1の物体の予測位置とを用いて、前記第1と
第2の物体同士が互いに衝突するか否かを判定する衝突
判定ステップと、前記衝突判定部において衝突ありと判
定された場合、前記第1の物体の位置及び形状と前記第
2の物体の位置及び形状より補正位置を算出して、前記
物体データ記憶部から読み出した前記第1の物体の速度
と、前記予測位置と、前記補正位置を用いて、前記第1
の物体の速度を補正する速度制御ステップと、を有する
ことを特徴とする。
According to the present invention, there is provided a method of preventing overlapping of a moving object in computer graphics, comprising the steps of: storing an object shape, a position and a speed as object data from an object data storage unit; A predicted position calculating step of reading a speed and calculating a predicted position of the first object after a predetermined time; a shape and a position of the second object read from the object data storage unit; and the first object A collision determination step of determining whether or not the first and second objects collide with each other using the predicted position of the first object and a first object when the collision determination unit determines that there is a collision. Calculating the correction position from the position and shape of the second object and the position and shape of the second object, and reading the speed of the first object from the object data storage unit and the predicted position , Using the correction position, the first
And a speed control step of correcting the speed of the object.

【0010】また、本発明によるコンピュータグラフィ
ックスにおける動物体のオーバーラップ防止方法は、上
記のオーバーラップ防止方法において、前記速度制御ス
テップにおいて、前記第1の物体の位置及び形状と前記
第2の物体の位置及び形状より補正位置を算出して、前
記物体データ記憶部から読み出した前記第1の物体の速
度と、前記予測位置と、前記補正位置と、前記第1の物
体の形状と、を用いて、前記第1の物体の速度を補正す
ることを特徴とする。
[0010] In the overlap prevention method for a moving object in computer graphics according to the present invention, in the overlap prevention method, the position and shape of the first object and the second object may be determined in the speed control step. A corrected position is calculated from the position and the shape of the first object, and the speed of the first object read from the object data storage unit, the predicted position, the corrected position, and the shape of the first object are used. And correcting the speed of the first object.

【0011】本発明によるコンピュータグラフィックス
における動物体のオーバーラップ防止装置は、物体の形
状、位置及び速度を物体データとし格納する物体データ
記憶部と、第1の物体の位置および速度を前記物体デー
タ記憶部から読み出し、定められた時間後の前記第1の
物体の予測位置を算出する予測位置算出部と、前記物体
データ記憶部から読み出した第2の物体の形状および位
置と、前記第1の物体の予測位置とを用いて、前記第1
と第2の物体同士が互いに衝突するか否かを判定する衝
突判定部と、前記衝突判定部において衝突ありと判定さ
れた場合、前記第1の物体の位置及び形状と前記第2の
物体の位置及び形状より補正位置を算出して、前記物体
データ記憶部から読み出した前記第1の物体の速度と、
前記予測位置と、前記補正位置を用いて、前記第1の物
体の速度を補正する速度制御部と、を備えることを特徴
とする。
According to the present invention, there is provided an apparatus for preventing a moving object from overlapping in computer graphics, comprising: an object data storage unit for storing the shape, position and speed of an object as object data; A predicted position calculation unit that reads from the storage unit and calculates a predicted position of the first object after a predetermined time; a shape and a position of the second object read from the object data storage unit; Using the predicted position of the object, the first
And a collision determination unit that determines whether the second object collides with each other. If the collision determination unit determines that there is a collision, the position and shape of the first object and the position of the second object Calculating a correction position from a position and a shape, and reading the speed of the first object from the object data storage unit;
A speed controller that corrects the speed of the first object using the predicted position and the correction position is provided.

【0012】また、本発明によるコンピュータグラフィ
ックスにおける動物体のオーバーラップ防止装置は、上
記のオーバーラップ防止装置において、前記第1の物体
の位置及び形状と前記第2の物体の位置及び形状より補
正位置を算出して、前記速度制御部は、前記物体データ
記憶部から読み出した前記第1の物体の速度と、前記予
測位置と、前記補正位置と、前記第1の物体の形状と、
を用いて、前記第1の物体の速度を補正することを特徴
とする。
According to the present invention, there is provided an apparatus for preventing a moving object from overlapping in computer graphics according to the present invention, wherein the position and shape of the first object and the position and shape of the second object are corrected. Calculating a position, the speed control unit reads the speed of the first object read from the object data storage unit, the predicted position, the corrected position, the shape of the first object,
Is used to correct the speed of the first object.

【0013】本発明によるコンピュータ読み取り可能な
記録媒体は、物体の形状、位置及び速度を物体データと
し格納する物体データ記憶部から第1の物体の位置およ
び速度を読み出し、定められた時間後の前記第1の物体
の予測位置を算出する予測位置算出ステップと、前記物
体データ記憶部から読み出した第2の物体の形状および
位置と、前記第1の物体の予測位置とを用いて、前記第
1と第2の物体同士が互いに衝突するか否かを判定する
衝突判定ステップと、前記衝突判定部において衝突あり
と判定された場合、前記第1の物体の位置及び形状と前
記第2の物体の位置及び形状より補正位置を算出して、
前記物体データ記憶部から読み出した前記第1の物体の
速度と、前記予測位置と、前記補正位置を用いて、前記
第1の物体の速度を補正する速度制御ステップと、をコ
ンピュータに実行させるためのプログラムを記録したこ
とを特徴とする。
A computer-readable recording medium according to the present invention reads out the position and speed of a first object from an object data storage unit that stores the shape, position and speed of the object as object data, and reads the position and speed of the first object after a predetermined time. A predicted position calculation step of calculating a predicted position of the first object; a shape and position of the second object read from the object data storage unit; and a predicted position of the first object, using the first position. And a collision determining step of determining whether or not the second object collides with each other. If the collision determining unit determines that there is a collision, the position and shape of the first object and the position of the second object Calculate the correction position from the position and shape,
Using the computer to execute a speed control step of correcting the speed of the first object using the speed of the first object read from the object data storage unit, the predicted position, and the correction position. Is recorded.

【0014】また、本発明によるコンピュータ読み取り
可能な記録媒体は、上記のコンピュータ読み取り可能な
記録媒体において、前記速度制御ステップにおいて、前
記第1の物体の位置及び形状と前記第2の物体の位置及
び形状より補正位置を算出して、前記物体データ記憶部
から読み出した前記第1の物体の速度と、前記予測位置
と、前記補正位置と、前記第1の物体の形状と、を用い
て、前記第1の物体の速度を補正することを特徴とす
る。
The computer-readable recording medium according to the present invention is the computer-readable recording medium described above, wherein in the speed control step, the position and shape of the first object and the position and shape of the second object are determined. Calculating a correction position from a shape, using the speed of the first object read from the object data storage unit, the predicted position, the correction position, and the shape of the first object, The speed of the first object is corrected.

【0015】[0015]

【発明の実施の形態】本発明の実施の形態について以下
に説明する。本発明は、その好ましい実施の形態とし
て、物体同士の衝突を検出する衝突検出装置において、
定められた時間後に移動物体が到達する位置を予測して
算出する予測位置算出部(図1の2)と、物体同士が衝
突したか否かを判定する衝突判定部(図1の3)と、互
いに衝突している物体の形状と位置に基づいて物体の速
度を算出する速度制御部(図1の4)を備え、衝突判定
部(図1の3)において衝突ありと判定された場合、移
動物体の速度を補正制御することを特徴としている。
Embodiments of the present invention will be described below. The present invention, as a preferred embodiment thereof, in a collision detection device that detects collision between objects,
A predicted position calculation unit (2 in FIG. 1) for predicting and calculating the position where the moving object reaches after a predetermined time; and a collision determination unit (3 in FIG. 1) for determining whether or not the objects have collided. A speed control unit (4 in FIG. 1) for calculating the speed of the object based on the shape and position of the object colliding with each other, and when the collision determination unit (3 in FIG. 1) determines that there is a collision, It is characterized in that the speed of a moving object is corrected and controlled.

【0016】運動シミュレーションでは、衝突判定処理
を繰り返す時間間隔が長くなると、単位時間内に物体が
移動する距離が増大し、物体同士の過度のめり込みが発
生してしまう。ところが、物体の現在の位置と速度は既
知であるため、めり込み直前の位置を計算で求めること
が可能である。
In the motion simulation, if the time interval at which the collision determination process is repeated becomes long, the distance that the objects move within a unit time increases, and excessive intrusion between the objects occurs. However, since the current position and speed of the object are known, the position immediately before the sinking can be obtained by calculation.

【0017】本発明の実施の形態においては、物体の現
行移動速度に基づいて単位時間後の存在位置を予測し、
その位置で他の物体と衝突する場合には、簡単な幾何演
算を用いて衝突直前の物体位置を算出し、さらに単位時
間後にその位置に至るように速度を逆算補正すること
で、物体同士の過度のめり込みを回避する。
In the embodiment of the present invention, the position of the object after a unit time is predicted based on the current moving speed of the object,
When colliding with another object at that position, the object position immediately before the collision is calculated using a simple geometric operation, and the speed is back-calculated and corrected to reach the position after a unit time, so that the objects can be compared with each other. Avoid excessive sinking.

【0018】[0018]

【実施例】上述した本発明の実施の形態について更に詳
細に説明すべく、本発明の実施例について図面を参照し
て以下に詳細に説明する。
BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a block diagram showing an embodiment of the present invention;

【0019】図1は、本発明の実施例の構成をブロック
図にて示したものである。図1を参照すると、本実施例
は、物体の形状および位置および速度を物体データとし
格納する物体データ記憶部1と、物体の位置および速度
を前記物体データ記憶部1から読み出し、予め定められ
た時間後の予測位置を算出する予測位置算出部2と、前
記物体データ記憶部1から読み出した物体の形状および
位置と、前記予測位置算出部2で求めた予測位置とを用
いて、該物体同士が互いに衝突するか否かを判定する衝
突判定部3と、前記衝突判定部3において衝突ありと判
定された場合、前記物体データ記憶部1から読み出した
該物体の形状および位置と該物体のうち移動している物
体の速度と、前記予測位置算出部2で求めた予測位置と
を用いて、移動している物体の速度を補正する速度制御
部4と、を備えて構成されている。
FIG. 1 is a block diagram showing the configuration of an embodiment of the present invention. Referring to FIG. 1, in the present embodiment, an object data storage unit 1 that stores the shape, position, and speed of an object as object data, and a position and speed of an object that are read from the object data storage unit 1 and are determined in advance. Using the predicted position calculating unit 2 that calculates a predicted position after a time, the shape and position of the object read from the object data storage unit 1, and the predicted position obtained by the predicted position calculating unit 2, And a collision determination unit 3 that determines whether or not the objects collide with each other. If the collision determination unit 3 determines that there is a collision, the shape and position of the object read from the object data storage unit 1 and the The speed control unit 4 is configured to correct the speed of the moving object using the speed of the moving object and the predicted position obtained by the predicted position calculation unit 2.

【0020】図2は、図1に示した本実施例全体の動作
を説明するためのフローチャートである。図1及び図2
を参照して、本実施例全体の動作について以下に説明す
る。
FIG. 2 is a flow chart for explaining the operation of the entire embodiment shown in FIG. 1 and 2
The operation of the entire embodiment will be described below with reference to FIG.

【0021】物体データ記憶部1には、物体の形状、空
間における物体の位置、空間内での移動速度に関する情
報が3次元ベクトルデータとして、予め格納されてい
る。
The object data storage unit 1 previously stores information on the shape of the object, the position of the object in the space, and the moving speed in the space as three-dimensional vector data.

【0022】最初に、予測位置算出部2が動作を開始す
る。
First, the predicted position calculation section 2 starts operation.

【0023】予測位置算出部2は、まず、物体データ記
憶部1にある物体データの中から、動いている物体すな
わち速度の大きさが0ではない物体を一つ選択する。以
下、この物体を第1の物体と呼ぶことにする。次に、第
1の物体の速度データと位置データとを物体データ記憶
部1から読み込む。そして、定められた時間後の予測位
置を求める(ステップS1)。現在の速度および位置の
ベクトルを各々VおよびPとすると、時間t後の予測位
置ベクトルは、 V・t+P で算出できる。この時間間隔tとして、予測位置算出部
2に設けられた記憶手段に格納された一定値を利用する
方法や、予測位置算出部2に設けた計時手段を用いて位
置算出の度に前回の位置算出時からの経過時間を計測し
て利用する方法等がある。後者の方法を利用して構成し
た本発明である衝突検出装置を用いれば、より高精度の
運動シミュレーションを実現することが可能である。
The predicted position calculating unit 2 first selects one moving object, that is, an object whose velocity magnitude is not 0, from the object data stored in the object data storage unit 1. Hereinafter, this object is referred to as a first object. Next, the speed data and the position data of the first object are read from the object data storage unit 1. Then, a predicted position after a predetermined time is obtained (step S1). Assuming that the current velocity and position vectors are V and P, respectively, the predicted position vector after time t can be calculated by V · t + P. As the time interval t, a method of using a constant value stored in the storage means provided in the predicted position calculation unit 2 or the time position calculation using the timekeeping means provided in the predicted position calculation unit 2 is performed every time the position is calculated. There is a method of measuring and using the elapsed time from the time of calculation and the like. The use of the collision detection device according to the present invention configured using the latter method makes it possible to realize a more accurate motion simulation.

【0024】続いて、衝突判定部3が動作を開始する。Subsequently, the collision judging section 3 starts the operation.

【0025】衝突判定部3は、まず、物体データ記憶部
1にある物体データの中から、第1の物体以外の物体を
一つ選択する。以下、この物体を第2の物体と呼ぶこと
にする。次に、第2の物体の形状データおよび位置デー
タと、第1の物体の形状データとを物体データ記憶部1
から読み込む。また、先に求めた第1の物体の予測位置
データを予測位置算出部2から読み込む。ここで、形状
データとして、物体の形状をそのまま利用する方法と、
物体を被覆する簡単な形状を想定して利用する方法等が
ある。前者の方法を利用すると、衝突判定に時間がかか
るものの高い精度で衝突の有無を判定することができ
る。一方、後者の方法を利用すると、衝突判定の精度は
劣るものの短時間で衝突の有無を判定することができ
る。後者の方法を利用する場合の簡単な形状の例とし
て、立方体、直方体、球等がある。
The collision determining unit 3 first selects one object other than the first object from the object data stored in the object data storage unit 1. Hereinafter, this object is referred to as a second object. Next, the shape data and position data of the second object and the shape data of the first object are stored in the object data storage unit 1.
Read from. In addition, the predicted position data of the first object obtained earlier is read from the predicted position calculation unit 2. Here, as the shape data, a method of using the shape of the object as it is,
There is a method of assuming and using a simple shape for covering an object. When the former method is used, although it takes time to determine the collision, it is possible to determine the presence or absence of the collision with high accuracy. On the other hand, if the latter method is used, it is possible to determine the presence or absence of a collision in a short time, although the accuracy of the collision determination is low. Examples of simple shapes when the latter method is used include a cube, a rectangular parallelepiped, and a sphere.

【0026】そして、第1の物体と第2の物体とが互い
に衝突しているか否かを計算によって求める(ステップ
S2)。この計算には、例えば、文献(コミュニケーシ
ョンズ・オブ・ザ・エイ・シー・エム(Communications
of the ACM)、第22巻、第1号、1979年、J.
W.Boyse氏の論文である「インターフェアレンス
ディテクション アマング ソリッド アンド サー
フィス(InterferenceDetection among Solids and Sur
faces)」)に記載されている方法を用いることができ
る。
Then, it is determined by calculation whether the first object and the second object collide with each other (step S2). This calculation includes, for example, a document (Communications of the ACM)
of the ACM), Vol. 22, No. 1, 1979, J.M.
W. Mr. Boyse's dissertation, "Interference Detection among Solids and Sur
faces) ”).

【0027】計算の結果、第1の物体と第2の物体とが
互いに衝突している場合には、速度制御部4が動作を開
始し、衝突していない場合には、本実施例全体の動作が
終了する(ステップS3)。
As a result of the calculation, when the first object and the second object collide with each other, the speed control unit 4 starts operating. The operation ends (step S3).

【0028】速度制御部4は、まず、第1の物体の形状
データと位置データと速度データとを物体データ記憶部
1から読み込む。また、第2の物体の形状データと位置
データとを物体データ記憶部1から読み込む。次に、第
1の物体の形状データと位置データおよび第2の物体の
形状データと位置データとを用いて、移動している第1
の物体が静止している第2の物体に衝突する瞬間におけ
る第1の物体の位置を算出する(ステップS4)。さら
に、第1の物体が第2の物体に衝突するまでに移動する
距離を算出する。そして、時間t内に第1の物体が移動
する距離をD、第1の物体が第2の物体に衝突するまで
に移動する距離をd、補正前における第1の物体の速度
をVとしたとき、補正後における第1の物体の速度を、
V・d/Dという計算式にしたがって求め、物体データ
記憶部1に書き込む(ステップS5)。 第1の物体が
第2の物体に衝突する「瞬間」における第1の物体の位
置を算出するのが困難である場合には、第1の物体と第
2の物体とが「少し」衝突している状態、すなわちコン
ピュータグラフィックスで表示した際に互いに「少し」
めり込んでいる状態における第1の物体の位置を算出す
ればよい。また、物体の形状が複雑なために、位置を算
出することが困難である場合には、その物体を近似する
簡単な形状の代替物体、例えばその物体を包含するよう
な球や直方体を用いて位置の算出を行えばよい。
The speed controller 4 first reads the shape data, position data, and speed data of the first object from the object data storage 1. Further, the shape data and the position data of the second object are read from the object data storage unit 1. Next, using the shape data and position data of the first object and the shape data and position data of the second object,
The position of the first object at the moment when the object collides with the stationary second object is calculated (step S4). Further, the distance that the first object moves until it collides with the second object is calculated. Then, the distance that the first object moves within the time t is D, the distance that the first object moves until it collides with the second object is d, and the speed of the first object before correction is V. When the speed of the first object after the correction is
It is obtained according to a calculation formula of V · d / D and is written in the object data storage unit 1 (step S5). If it is difficult to calculate the position of the first object at the “moment” when the first object collides with the second object, the first object and the second object collide “slightly”. "A little" to each other when displayed in computer graphics
What is necessary is just to calculate the position of the 1st object in the state where it is sinking. Also, if the position is difficult to calculate due to the complex shape of the object, use an alternative object with a simple shape that approximates the object, such as a sphere or a rectangular parallelepiped that encompasses the object. The position may be calculated.

【0029】以上のステップで、本実施例全体の動作が
終了する。
With the above steps, the operation of the entire embodiment is completed.

【0030】次に、具体的な物体形状を想定して、図1
における速度制御部4の動作についてさらに詳しく説明
する。
Next, assuming a specific object shape, FIG.
The operation of the speed control unit 4 in will be described in more detail.

【0031】ここでは、一例として、図3および図4に
示すようなシーンを想定する。これは、移動している球
が静止している多面体に接近する様子をモデル化したも
のである。なお、図3および図4では、本来は3次元的
に表現されるべきものを、説明のために2次元的な図形
で示している。
Here, as an example, a scene as shown in FIGS. 3 and 4 is assumed. This is a model of how a moving sphere approaches a stationary polyhedron. In FIGS. 3 and 4, what should be expressed three-dimensionally is shown by a two-dimensional figure for explanation.

【0032】ある時刻に物体1が位置aに存在している
とする。このとき、物体1の移動速度(速度ベクトル)
を用いて計算することによって、「物体1が単位時間後
に位置bに達する」と予測できる。このときの移動経路
が軌跡abである。図3は、移動速度が小さいために、
物体1が単位時間後に物体2と衝突しない例であり、図
4は、移動速度が大きいために、物体2と衝突する例で
ある。単位時間後に衝突すると予測される場合には、速
度ベクトルの大きさを補正することによって、物体1が
位置b'にしか達しないように制御し、物体2に衝突す
るのを回避する。
It is assumed that the object 1 exists at the position a at a certain time. At this time, the moving speed (speed vector) of the object 1
, It can be predicted that “the object 1 reaches the position b after a unit time”. The moving route at this time is the locus ab. FIG. 3 shows that the moving speed is low,
FIG. 4 shows an example in which the object 1 does not collide with the object 2 after a unit time, and FIG. If it is predicted that a collision will occur after a unit time, the magnitude of the velocity vector is corrected so that the object 1 is controlled so as to reach only the position b ′ and collision with the object 2 is avoided.

【0033】このために、まず、物体2の表面と軌跡a
bとの交点3を求める。次に、交点3から物体1の重心
の位置aまでの距離を算出する。この距離をd、物体1
の重心から物体1の表面までの平均距離をr、位置aか
ら位置bまでの距離をD、位置bにおける物体1の(補
正前の)速度をVとし、 V・(d−r)/D という式にしたがって物体1の速度を補正することによ
って、図5に示すように、物体2との衝突を回避するこ
とができる。
For this purpose, first, the surface of the object 2 and the trajectory a
Find intersection 3 with b. Next, the distance from the intersection 3 to the position a of the center of gravity of the object 1 is calculated. This distance is d, object 1
The average distance from the center of gravity of the object 1 to the surface of the object 1 is r, the distance from the position a to the position b is D, and the velocity (before correction) of the object 1 at the position b is V, V · (dr) / D By correcting the speed of the object 1 according to the following equation, it is possible to avoid collision with the object 2 as shown in FIG.

【0034】物体1の形状が球のときは、物体1の重心
から物体1の表面までの平均距離rは、物体1の半径に
一致する。したがって、物体1の形状が複雑な場合に
は、物体1を包含する球を考え、それを物体1の代替物
体として利用することにより、平均距離rを算出するた
めに必要な処理量を削減することができる。また、物体
1の大きさが物体2の大きさと比較して十分に小さい場
合には、平均距離rを0とみなしても差し支えない。
When the shape of the object 1 is a sphere, the average distance r from the center of gravity of the object 1 to the surface of the object 1 matches the radius of the object 1. Therefore, when the shape of the object 1 is complicated, a sphere containing the object 1 is considered, and the sphere is used as a substitute object of the object 1 to reduce the processing amount required for calculating the average distance r. be able to. When the size of the object 1 is sufficiently smaller than the size of the object 2, the average distance r may be regarded as 0.

【0035】以上説明したように、本実施例において
は、物体同士の衝突の有無を予め検出し、衝突する場合
には、衝突までの距離に基づいて物体の移動速度を補正
制御することにより、激しい衝突、すなわちコンピュー
タグラフィックスで表示した際に大きくめり込んでしま
う現象を回避することができる。なお、例えば図2に示
したフローチャートの処理手順等は、情報処理装置でプ
ログラムを実行することによって実現することができ
る。
As described above, in the present embodiment, the presence or absence of collision between objects is detected in advance, and when a collision occurs, the moving speed of the object is corrected and controlled based on the distance to the collision. It is possible to avoid a violent collision, that is, a phenomenon of being greatly sunk when displayed by computer graphics. Note that, for example, the processing procedure of the flowchart illustrated in FIG. 2 can be realized by executing a program on the information processing device.

【0036】[0036]

【発明の効果】以上説明したように、本発明によれば、
物体の移動速度を動的に制御することにより、激しい衝
突を回避することができるため、コンピュータグラフィ
ックスで表示する場合等において物体同士の過度のめり
込みが発生するという現象を抑える、という効果を奏す
る。
As described above, according to the present invention,
By dynamically controlling the moving speed of the object, a violent collision can be avoided, so that there is an effect that a phenomenon that objects are excessively immersed in display in computer graphics or the like is suppressed.

【0037】上記した効果は、コンピュータグラフィッ
クスを用いた高精度シミュレーションを実現する上で、
非常に有効であり、本発明の実用的価値は極めて高い。
The above-described effects are important in realizing a high-accuracy simulation using computer graphics.
It is very effective and the practical value of the present invention is extremely high.

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

【図1】本発明の実施例の構成を示すブロック図であ
る。
FIG. 1 is a block diagram showing a configuration of an embodiment of the present invention.

【図2】本発明の実施例全体の動作を説明するためのフ
ローチャートである。
FIG. 2 is a flowchart for explaining the operation of the entire embodiment of the present invention.

【図3】本発明の実施例を説明するための図であり、物
体同士が互いに衝突しない場合を示した図である。
FIG. 3 is a diagram for explaining an embodiment of the present invention, and is a diagram showing a case where objects do not collide with each other.

【図4】本発明の実施例を説明するための図であり、物
体同士が互いに衝突する場合を示した図である。
FIG. 4 is a diagram for explaining the embodiment of the present invention, and is a diagram showing a case where objects collide with each other.

【図5】本発明の実施例を説明するための図であり、速
度補正により、物体同士の衝突が回避された状態を示し
た図である。
FIG. 5 is a diagram for explaining the embodiment of the present invention, and is a diagram showing a state in which collision between objects is avoided by speed correction.

【図6】従来の装置を示すブロック図である。FIG. 6 is a block diagram showing a conventional device.

【符号の説明】[Explanation of symbols]

1 物体データ記憶部 2 予測位置算出部 3 衝突判定部 4 速度制御部 101 物体データ記憶部 103 衝突判定部 1031 代替形状生成部 1032 判定部 Reference Signs List 1 object data storage unit 2 predicted position calculation unit 3 collision determination unit 4 speed control unit 101 object data storage unit 103 collision determination unit 1031 alternative shape generation unit 1032 determination unit

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 物体の形状、位置及び速度を物体データ
とし格納する物体データ記憶部から第1の物体の位置お
よび速度を読み出し、定められた時間後の前記第1の物
体の予測位置を算出する予測位置算出ステップと、 前記物体データ記憶部から読み出した第2の物体の形状
および位置と、前記第1の物体の予測位置とを用いて、
前記第1と第2の物体同士が互いに衝突するか否かを判
定する衝突判定ステップと、 前記衝突判定部において衝突ありと判定された場合、前
記第1の物体の位置及び形状と前記第2の物体の位置及
び形状より補正位置を算出して、前記物体データ記憶部
から読み出した前記第1の物体の速度と、前記予測位置
と、前記補正位置を用いて、前記第1の物体の速度を補
正する速度制御ステップと、を有することを特徴とする
コンピュータグラフィックスにおける動物体のオーバー
ラップ防止方法。
1. A position and a speed of a first object are read from an object data storage unit that stores a shape, a position and a speed of the object as object data, and a predicted position of the first object after a predetermined time is calculated. A predicted position calculation step of performing, a shape and a position of the second object read from the object data storage unit, and a predicted position of the first object,
A collision determining step of determining whether or not the first and second objects collide with each other; and if the collision determining unit determines that there is a collision, the position and shape of the first object and the second The corrected position is calculated from the position and shape of the object, and the speed of the first object read from the object data storage unit, the predicted position, and the speed of the first object are calculated using the corrected position. And a speed control step of correcting a moving object.
【請求項2】 請求項1に記載のコンピュータグラフィ
ックスにおけるオーバーラップ防止方法において、前記
速度制御ステップにおいて、前記第1の物体の位置及び
形状と前記第2の物体の位置及び形状より補正位置を算
出して、前記物体データ記憶部から読み出した前記第1
の物体の速度と、前記予測位置と、前記補正位置と、前
記第1の物体の形状と、を用いて、前記第1の物体の速
度を補正することを特徴とするコンピュータグラフィッ
クスにおけるオーバーラップ防止方法。
2. The method for preventing overlap in computer graphics according to claim 1, wherein in the speed control step, a correction position is determined based on a position and a shape of the first object and a position and a shape of the second object. Calculated and read out from the object data storage unit.
Using the speed of the object, the predicted position, the corrected position, and the shape of the first object to correct the speed of the first object. Prevention method.
【請求項3】 物体の形状、位置及び速度を物体データ
とし格納する物体データ記憶部と、 第1の物体の位置および速度を前記物体データ記憶部か
ら読み出し、定められた時間後の前記第1の物体の予測
位置を算出する予測位置算出部と、 前記物体データ記憶部から読み出した第2の物体の形状
および位置と、前記第1の物体の予測位置とを用いて、
前記第1と第2の物体同士が互いに衝突するか否かを判
定する衝突判定部と、 前記衝突判定部において衝突ありと判定された場合、前
記第1の物体の位置及び形状と前記第2の物体の位置及
び形状より補正位置を算出して、前記物体データ記憶部
から読み出した前記第1の物体の速度と、前記予測位置
と、前記補正位置を用いて、前記第1の物体の速度を補
正する速度制御部と、を備えることを特徴とするコンピ
ュータグラフィックスにおける動物体のオーバーラップ
防止装置。
3. An object data storage unit for storing the shape, position and speed of the object as object data, and reading the position and speed of the first object from the object data storage unit, and reading the first object after a predetermined time. A predicted position calculation unit that calculates the predicted position of the object, using the shape and position of the second object read from the object data storage unit and the predicted position of the first object,
A collision determining unit that determines whether or not the first and second objects collide with each other; and, if the collision determining unit determines that there is a collision, the position and shape of the first object and the second The corrected position is calculated from the position and shape of the object, and the speed of the first object read from the object data storage unit, the predicted position, and the speed of the first object are calculated using the corrected position. And a speed control unit that corrects a moving object in the computer graphics.
【請求項4】 請求項3に記載のコンピュータグラフィ
ックスにおけるオーバーラップ防止装置において、前記
速度制御部は、前記第1の物体の位置及び形状と前記第
2の物体の位置及び形状より補正位置を算出して、前記
物体データ記憶部から読み出した前記第1の物体の速度
と、前記予測位置と、前記補正位置と、前記第1の物体
の形状と、を用いて、前記第1の物体の速度を補正する
ことを特徴とするコンピュータグラフィックスにおける
オーバーラップ防止装置。
4. The apparatus for preventing overlap in computer graphics according to claim 3, wherein the speed control unit determines a correction position based on the position and shape of the first object and the position and shape of the second object. Using the calculated speed of the first object read from the object data storage unit, the predicted position, the corrected position, and the shape of the first object, A device for preventing overlap in computer graphics, wherein the device corrects speed.
【請求項5】 物体の形状、位置及び速度を物体データ
とし格納する物体データ記憶部から第1の物体の位置お
よび速度を読み出し、定められた時間後の前記第1の物
体の予測位置を算出する予測位置算出ステップと、 前記物体データ記憶部から読み出した第2の物体の形状
および位置と、前記第1の物体の予測位置とを用いて、
前記第1と第2の物体同士が互いに衝突するか否かを判
定する衝突判定ステップと、 前記衝突判定部において衝突ありと判定された場合、前
記第1の物体の位置及び形状と前記第2の物体の位置及
び形状より補正位置を算出して、前記物体データ記憶部
から読み出した前記第1の物体の速度と、前記予測位置
と、前記補正位置を用いて、前記第1の物体の速度を補
正する速度制御ステップと、 をコンピュータに実行させるためのプログラムを記録し
たことを特徴とするコンピュータ読み取り可能な記録媒
体。
5. The position and speed of a first object are read from an object data storage unit that stores the shape, position and speed of the object as object data, and a predicted position of the first object after a predetermined time is calculated. A predicted position calculation step of performing, a shape and a position of the second object read from the object data storage unit, and a predicted position of the first object,
A collision determining step of determining whether or not the first and second objects collide with each other; and if the collision determining unit determines that there is a collision, the position and shape of the first object and the second The corrected position is calculated from the position and shape of the object, and the speed of the first object read from the object data storage unit, the predicted position, and the speed of the first object are calculated using the corrected position. A computer-readable recording medium, which stores a program for causing a computer to execute a speed control step of correcting the following.
【請求項6】 請求項5に記載のコンピュータ読み取り
可能な記録媒体において、前記速度制御ステップにおい
て、前記第1の物体の位置及び形状と前記第2の物体の
位置及び形状より補正位置を算出して、前記物体データ
記憶部から読み出した前記第1の物体の速度と、前記予
測位置と、前記補正位置と、前記第1の物体の形状と、
を用いて、前記第1の物体の速度を補正することを特徴
とするコンピュータ読み取り可能な記録媒体。
6. The computer-readable recording medium according to claim 5, wherein, in the speed control step, a correction position is calculated from a position and a shape of the first object and a position and a shape of the second object. The speed of the first object read from the object data storage unit, the predicted position, the corrected position, the shape of the first object,
A computer-readable recording medium for correcting a speed of the first object by using a computer.
JP10083666A 1998-03-30 1998-03-30 Overlap prevention method of moving object in computer graphics and device therefor Pending JPH11283048A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10083666A JPH11283048A (en) 1998-03-30 1998-03-30 Overlap prevention method of moving object in computer graphics and device therefor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10083666A JPH11283048A (en) 1998-03-30 1998-03-30 Overlap prevention method of moving object in computer graphics and device therefor

Publications (1)

Publication Number Publication Date
JPH11283048A true JPH11283048A (en) 1999-10-15

Family

ID=13808800

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10083666A Pending JPH11283048A (en) 1998-03-30 1998-03-30 Overlap prevention method of moving object in computer graphics and device therefor

Country Status (1)

Country Link
JP (1) JPH11283048A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010244256A (en) * 2009-04-03 2010-10-28 Fanuc Ltd Numerical controller having interference check function
JP2020132142A (en) * 2019-02-13 2020-08-31 富士通株式会社 Prediction of intention of passage deviation of vehicle
WO2020246508A1 (en) * 2019-06-07 2020-12-10 株式会社ソニー・インタラクティブエンタテインメント Physics computing device, physics computing method, and program

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010244256A (en) * 2009-04-03 2010-10-28 Fanuc Ltd Numerical controller having interference check function
JP2020132142A (en) * 2019-02-13 2020-08-31 富士通株式会社 Prediction of intention of passage deviation of vehicle
WO2020246508A1 (en) * 2019-06-07 2020-12-10 株式会社ソニー・インタラクティブエンタテインメント Physics computing device, physics computing method, and program
JP2020201622A (en) * 2019-06-07 2020-12-17 株式会社ソニー・インタラクティブエンタテインメント Physical computation device, physical computation method, and program

Similar Documents

Publication Publication Date Title
CN106651987B (en) Paths planning method and device
AU2006200314B2 (en) Automatic layout of items along an embedded one-manifold path
US5515489A (en) Collision detector utilizing collision contours
US6587106B1 (en) Computer graphics apparatus having an improved walk-through function
JP4521391B2 (en) Tile binning method and system using half-plane edge function
KR20070077598A (en) Method and apparatus for estimating 2-dimension trajectory of a gesture
KR101650269B1 (en) System and method for provding efficient interface for display control
JP5109868B2 (en) Symbol display method and symbol display program
JPH11161819A (en) Image processor, its method and recording medium recording image processing program
CN102929430B (en) The display mapped mode of many pointers indirect input device
JPH11283048A (en) Overlap prevention method of moving object in computer graphics and device therefor
US9274642B2 (en) Acceleration-based interaction for multi-pointer indirect input devices
JP2007066045A (en) Simulation device
JP4827427B2 (en) Particle behavior analysis apparatus, control method, and program
JPH0546311A (en) Mouse pointing operation control system
JPH1021415A (en) Graphic processor and graphic processing method
US11861815B2 (en) Composite image creating method, composite image creating apparatus, and computer program stored in recording medium to execute the method
JP2000020754A (en) Model display device
JP2727667B2 (en) Drawing equipment
KR950012266A (en) Triangular interpolator and search method for fast pong cat drawing
JP2714114B2 (en) Graphic processing method and graphic system
JPWO2019168190A1 (en) Operation estimation device, operation estimation method, and program
JP2001166767A (en) Device and method for processing drawing
CN118251645A (en) Efficient orientation tracking with future orientation prediction
CN118015150A (en) Self-adaptive fluid simulation method, system, medium and equipment based on fixation point