JP4425890B2 - Simulation apparatus, simulation method, and program - Google Patents

Simulation apparatus, simulation method, and program Download PDF

Info

Publication number
JP4425890B2
JP4425890B2 JP2006214379A JP2006214379A JP4425890B2 JP 4425890 B2 JP4425890 B2 JP 4425890B2 JP 2006214379 A JP2006214379 A JP 2006214379A JP 2006214379 A JP2006214379 A JP 2006214379A JP 4425890 B2 JP4425890 B2 JP 4425890B2
Authority
JP
Japan
Prior art keywords
mode
objects
speed
collision
update
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.)
Active
Application number
JP2006214379A
Other languages
Japanese (ja)
Other versions
JP2008040800A (en
Inventor
竜一郎 岡本
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.)
Konami Digital Entertainment Co Ltd
Original Assignee
Konami Digital Entertainment 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 Konami Digital Entertainment Co Ltd filed Critical Konami Digital Entertainment Co Ltd
Priority to JP2006214379A priority Critical patent/JP4425890B2/en
Publication of JP2008040800A publication Critical patent/JP2008040800A/en
Application granted granted Critical
Publication of JP4425890B2 publication Critical patent/JP4425890B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Processing Or Creating Images (AREA)

Description

本発明は、仮想空間に配置されるオブジェクトの移動や衝突を簡易な計算でシミュレートするのに好適なシミュレーション装置、シミュレーション方法、ならびに、これらをコンピュータにて実現するプログラムに関する。   The present invention relates to a simulation apparatus, a simulation method, and a program that realizes these on a computer, which are suitable for simulating movement and collision of an object arranged in a virtual space by simple calculation.

従来から、コンピュータグラフィックスやシミュレーションの分野では、仮想空間に配置されるオブジェクトの位置や速度を、当該仮想空間内の重力や外力に基づいて更新したり、オブジェクト同士の衝突をシミュレートする技術が提案されている。   Conventionally, in the field of computer graphics and simulation, there has been a technology for updating the position and speed of an object arranged in a virtual space based on gravity and external force in the virtual space, and simulating a collision between objects. Proposed.

このようなオブジェクトの運動および衝突のシミュレーション技術については、たとえば以下の文献に開示されている。
Mark Deloura編、川西 裕幸監訳、狩野智英飜訳、Game Programming Gems、2.2 剛体の運動方程式の数値積分(P.146−155)、4.5 3D衝突検出(P.376−387)、株式会社ボーンディジタル、2001年7月25日発行
Such object motion and collision simulation techniques are disclosed in, for example, the following documents.
Edited by Mark Deloura, translated by Hiroyuki Kawanishi, translated by Tomohide Kano, Game Programming Gems, 2.2 Numerical integration of equations of motion of rigid bodies (P.146-155), 4.5 3D collision detection (P.376-387), shares Company Born Digital, issued July 25, 2001

このような技術においては、[非特許文献1]に開示されるように、現実世界の物理法則に基づく微分方程式を所定の時間の刻み幅(「ステップ時間」もしくは「更新間隔時間」と呼ぶことがある。)で数値積分する技術が用いられる。   In such a technique, as disclosed in [Non-Patent Document 1], a differential equation based on a real world physical law is referred to as a predetermined time step ("step time" or "update interval time"). ) Is used for numerical integration.

また、衝突のシミュレーションでは、瞬間的に働く撃力という反発力を想定して、運動量保存則が成立するように、オブジェクトの速度を更新する。   In the simulation of the collision, the speed of the object is updated so that the momentum conservation law is established on the assumption of a repulsive force called a momentary working force.

オブジェクトの数が増加したときを考えると、数値積分の計算はオブジェクトの数に比例する計算量が必要となるが、あるオブジェクトと他のオブジェクトとの衝突判定についてはかなりの計算が必要になるとともに、衝突判定についてはオブジェクトの数の自乗に比例する計算量が必要となる。したがって、できるだけシミュレーションとしての自然さを維持したまま衝突判定の計算をできるだけ簡略化する技術が強く求められている。   Considering when the number of objects increases, the calculation of numerical integration requires a calculation amount proportional to the number of objects, but considerable calculation is required for collision detection between one object and another object. For the collision determination, a calculation amount proportional to the square of the number of objects is required. Therefore, there is a strong demand for a technique for simplifying the calculation of collision determination as much as possible while maintaining the naturalness of the simulation as much as possible.

本発明は、上記のような課題を解決するもので、仮想空間に配置されるオブジェクトの移動や衝突を簡易な計算でシミュレートするのに好適なシミュレーション装置、シミュレーション方法、ならびに、これらをコンピュータにて実現するプログラムを提供することを目的とする。   The present invention solves the above-described problems, and is a simulation apparatus, a simulation method, and a computer suitable for simulating the movement and collision of an object arranged in a virtual space with a simple calculation. The purpose is to provide a program to be realized.

以上の目的を達成するため、本発明の原理にしたがって、下記の発明を開示する。   In order to achieve the above object, the following invention is disclosed in accordance with the principle of the present invention.

本発明の第1の観点に係るシミュレーション装置は、仮想空間に配置される複数のオブジェクトの位置および速度をシミュレートし、記憶部、衝突判定部、衝突更新部、移動更新部、モード更新部を備えるように構成する。
すなわち、当該複数のオブジェクトの衝突と運動とをシミュレートする。仮想空間としては、3次元空間を考えるのが典型的であるが、たとえばピンボールゲームやパチンコゲームを実現するような場合、すなわち、略2次元空間内でのオブジェクトの衝突と運動とをシミュレートする場合にも、本発明の原理を適用することができる。
A simulation apparatus according to a first aspect of the present invention simulates the position and speed of a plurality of objects arranged in a virtual space, and includes a storage unit, a collision determination unit, a collision update unit, a movement update unit, and a mode update unit. Configure to include.
That is, the collision and motion of the plurality of objects are simulated. As a virtual space, a three-dimensional space is typically considered. For example, when a pinball game or a pachinko game is realized, that is, an object collision and motion in a substantially two-dimensional space are simulated. In this case, the principle of the present invention can be applied.

ここで、記憶部は、当該複数のオブジェクトのそれぞれについて、当該オブジェクトの位置および速度と、当該オブジェクトが衝突判定モードと通過モードとのいずれであるかを示す情報と、を記憶する。   Here, the storage unit stores, for each of the plurality of objects, the position and speed of the object and information indicating whether the object is in the collision determination mode or the passage mode.

オブジェクトの位置および速度は、仮想空間の次元数に合わせて、3次元ベクトルもしくは2次元ベクトルとして記憶するのが典型的である。また、オブジェクトのモードは、衝突判定モードと通過モードとのいずれかであり、前者の場合は衝突判定の対象とするが、後者の場合は衝突判定の対象としない。このようなモードの分別によって、計算処理の低減化を図る点に、本発明の特徴の一つがある。   The position and velocity of the object are typically stored as a three-dimensional vector or a two-dimensional vector according to the number of dimensions of the virtual space. The object mode is either a collision determination mode or a passing mode. The former is a target for collision determination, but the latter is not a target for collision determination. One feature of the present invention is that calculation processing is reduced by such mode separation.

一方、衝突判定部は、当該複数のオブジェクトのうち、少なくとも一方が衝突判定モードであるオブジェクト同士が衝突するか否かを、記憶された位置により判定する。   On the other hand, the collision determination unit determines, based on the stored position, whether or not objects in which at least one of the plurality of objects is in the collision determination mode collide with each other.

上記のように、通過モードのオブジェクトは、衝突判定の対象とされない。したがって、通過モードのオブジェクトの割合が大きくなればなるほど、衝突判定および衝突に伴う処理に要する計算の総量は、少なくなる。   As described above, the object in the passing mode is not a target for collision determination. Therefore, the greater the proportion of objects in the passing mode, the smaller the total amount of computation required for collision determination and processing associated with the collision.

衝突するか否かを判定する対象となるオブジェクト同士の組み合わせについては、以下のような2種類の態様がありうる。
(1)いずれか少なくとも一方が衝突判定モードであるオブジェクト同士については、他方が通過モードであるか衝突判定モードあるか否かにかかわらず、衝突判定を行う。
(2)両方とも衝突判定モードであるオブジェクト同士についてのみ、衝突判定を行う。
There can be the following two types of combinations of objects to be determined whether or not to collide.
(1) For objects whose at least one is in the collision determination mode, collision determination is performed regardless of whether the other is in the passing mode or the collision determination mode.
(2) Collision determination is performed only for objects that are both in the collision determination mode.

前者の場合は、より正確な衝突のシミュレーションが可能であり、後者の場合は、計算量をより抑制したシミュレーションが可能となる。したがって、いずれの態様を採用するか、は、用途に応じて適宜選択が可能である。   In the former case, a more accurate collision simulation is possible, and in the latter case, a simulation with a further reduced amount of calculation is possible. Therefore, which mode is adopted can be appropriately selected according to the application.

さらに、衝突更新部は、衝突すると判定されたオブジェクト同士のそれぞれの衝突後の速度を計算して、記憶部に記憶される当該オブジェクトの速度を当該衝突後の速度に更新し、当該オブジェクトのモードを通過モードに更新する。   Further, the collision update unit calculates the speed after each collision between the objects determined to collide, updates the speed of the object stored in the storage unit to the speed after the collision, and sets the mode of the object. Is updated to pass mode.

衝突のシミュレーションについては、両オブジェクトの位置から衝突の際に両オブジェクトが変形すると想定される衝突平面を考え、衝突後の速度のうち衝突平面に対する法線成分は反発係数を乗じることにより求め、衝突平面に沿う成分は摩擦係数に基づいて求めるのが典型的であるが、その他の各種の衝突にともなう反発のモデルを採用することができる。   For the collision simulation, consider the collision plane where both objects are supposed to be deformed during the collision from the position of both objects, and the normal component for the collision plane of the velocity after the collision is obtained by multiplying the coefficient of restitution. The component along the plane is typically obtained based on the coefficient of friction, but a model of repulsion associated with various other collisions can be employed.

また、衝突したオブジェクト同士は、通過モードに移行する。すなわち、本発明では、「あるオブジェクトについての衝突が短時間に連続して生ずるのは極めて稀であるため、これを無視する。」との仮定をするモデル化を行うのである。   Moreover, the collided objects shift to the passing mode. In other words, in the present invention, modeling is performed under the assumption that “a collision with respect to a certain object is extremely rare in a short time and is therefore ignored”.

そして、移動更新部は、当該複数のオブジェクトのそれぞれについて、記憶された位置および速度により所定の更新間隔時間後の位置および速度を計算して、記憶部に記憶される当該オブジェクトの位置および速度を、当該更新間隔時間後の位置および速度に更新する。   The moving update unit calculates the position and speed after a predetermined update interval time for each of the plurality of objects based on the stored position and speed, and calculates the position and speed of the object stored in the storage unit. The position and speed are updated after the update interval time.

上記のように、衝突のシミュレーションは、衝突判定モードのオブジェクトについてのみ行うが、移動のシミュレーションは、モードが衝突判定モードか通過モードかにかかわらず、すべてのオブジェクトについて行う。   As described above, the collision simulation is performed only on the object in the collision determination mode, but the movement simulation is performed on all objects regardless of whether the mode is the collision determination mode or the passing mode.

典型的には、各オブジェクトに印加される仮想空間の重力、各種の抵抗力(風力、摩擦力等。)、オブジェクト同士がバネなどの弾性体で連結されている場合はその弾性力などの総和、すなわち、当該オブジェクトに対する外力の総和を、当該オブジェクトの質量で割ることで、当該オブジェクトの加速度を求めることができる。求められた加速度に更新間隔時間を乗じて現在のオブジェクトの速度に加算すれば、更新間隔時間後のオブジェクトの速度が得られる。また、現在のオブジェクトの速度と更新間隔時間後のオブジェクトの速度の平均に更新間隔時間を乗じて、現在の位置に加算すれば、更新間隔時間後のオブジェクトの位置が得られる。   Typically, gravity in the virtual space applied to each object, various resistance forces (wind force, friction force, etc.), and the sum of the elastic forces when the objects are connected by an elastic body such as a spring. That is, the acceleration of the object can be obtained by dividing the sum of the external forces applied to the object by the mass of the object. By multiplying the obtained acceleration by the update interval time and adding it to the current object speed, the speed of the object after the update interval time can be obtained. Also, the object position after the update interval time can be obtained by multiplying the average of the current object speed and the object speed after the update interval time by the update interval time and adding it to the current position.

一方、モード更新部は、当該複数のオブジェクトのうち、通過モードのオブジェクトのそれぞれについて、所定のモード復帰条件が満たされている場合、記憶部に記憶される当該オブジェクトのモードを衝突判定モードに更新する。   On the other hand, the mode update unit updates the mode of the object stored in the storage unit to the collision determination mode when a predetermined mode return condition is satisfied for each of the objects in the pass mode among the plurality of objects. To do.

すなわち、通過モードに移行したオブジェクトは、モード復帰条件が満たされると、衝突判定モードに復帰する。本発明では、「あるオブジェクトについての衝突が短時間に連続して生ずるのは極めて稀であるが、ある程度の時間が経過すれば衝突が生じうる」との仮定をするモデル化を行うのである。なお、モード復帰条件の種々に態様については後述する。   That is, the object that has shifted to the passing mode returns to the collision determination mode when the mode return condition is satisfied. In the present invention, modeling is carried out under the assumption that “a collision with respect to a certain object is extremely rare in a short time, but a collision can occur after a certain period of time”. Various aspects of the mode return condition will be described later.

本発明によれば、衝突判定の対象となるオブジェクトの数を抑制することによって、オブジェクトの衝突と移動のシミュレーションをできるだけ少ない計算量で行うことができるようになる。   According to the present invention, by suppressing the number of objects that are subject to collision determination, it is possible to perform simulation of collision and movement of objects with as little calculation as possible.

また、本発明のシミュレーション装置において、移動更新部は、当該複数のオブジェクトのうち、
(a)モードが、衝突判定モードのオブジェクトのそれぞれについて、記憶部に記憶される当該オブジェクトの位置および速度を、当該更新間隔時間後の位置および速度に更新し、
(b)モードが、通過モードであるオブジェクトのそれぞれについて、記憶部に記憶される位置と速度を維持する
ように構成することができる。
Moreover, in the simulation apparatus of the present invention, the movement update unit includes the plurality of objects.
(A) For each object in which the mode is the collision determination mode, the position and speed of the object stored in the storage unit are updated to the position and speed after the update interval time,
(B) For each object whose mode is the passing mode, the position and speed stored in the storage unit can be maintained.

上記の発明では、移動更新部は、全オブジェクトについて、更新間隔時間おきに位置と速度の更新を行っていたが、本発明では、通過モードのオブジェクトについては、更新間隔時間おきの位置と速度の更新は行わないこととする。   In the above invention, the moving update unit updates the position and speed for every object at every update interval time. However, in the present invention, for the object in the passing mode, the position and the speed at every update interval time are updated. No updates will be made.

すなわち、本発明では、「衝突が生じてからモード復帰条件が満たされるまでの間」については、オブジェクトは事実上移動しない、とのモデル化を行う。   That is, in the present invention, modeling is performed such that the object does not actually move for “between the occurrence of the collision and the time until the mode return condition is satisfied”.

後述するように、オブジェクトが連続して通過モードとなっている時間の長さはある程度の短時間とするのが典型的であり、この「ある程度の短時間」は、「オブジェクトが互いに接触し合ってから、弾性変形して相手方のオブジェクトと押し合い、反発力によって逆向きに動き始め、相手方のオブジェクトから離れるまでに要する時間」に相当するものと考えることができる。   As will be described later, the length of time during which the objects are continuously in the passing mode is typically set to a certain short time, and this “a certain short time” is defined as “the objects are in contact with each other. Then, it can be considered to correspond to the time required to elastically deform and press against the other object, start moving in the opposite direction due to the repulsive force, and leave the other object.

本発明によれば、上記発明の効果に加え、移動計算の対象となるオブジェクトの数を抑制することによって、オブジェクトの衝突と移動のシミュレーションをできるだけ少ない計算量で行うことができるようになる。   According to the present invention, in addition to the effects of the above-described invention, by suppressing the number of objects to be subjected to movement calculation, it is possible to perform object collision and movement simulation with as little calculation amount as possible.

また、本発明のシミュレーション装置において、移動更新部は、当該複数のオブジェクトのうち、
(a)モードが、衝突判定モードのオブジェクトのそれぞれについて、記憶部に記憶される当該オブジェクトの位置および速度を、当該更新間隔時間後の位置および速度に更新し、
(b)モードが、前回は衝突判定モードであり、今回は通過モードであるオブジェクトのそれぞれについて、次にモード復帰条件が満たされるまでの経過時間後の位置および速度を計算して、記憶部に記憶される当該オブジェクトの位置および速度を、当該経過時間後の位置および速度に更新し、
(c)モードが、前回も今回も通過モードであるオブジェクトのそれぞれについて、記憶部に記憶される位置と速度を維持する
ように構成することができる。
Moreover, in the simulation apparatus of the present invention, the movement update unit includes the plurality of objects.
(A) For each object in which the mode is the collision determination mode, the position and speed of the object stored in the storage unit are updated to the position and speed after the update interval time,
(B) The position and speed after the elapsed time until the mode return condition is satisfied next are calculated for each object which is the collision determination mode last time and this time is the passing mode, and is stored in the storage unit. Update the stored position and speed of the object to the position and speed after the elapsed time,
(C) It can be configured to maintain the position and speed stored in the storage unit for each of the objects in which the mode is the passing mode both last time and this time.

上記の発明では、移動更新部は、全オブジェクトについて、更新間隔時間おきに位置と速度の更新を行っていたが、本発明では、通過モードに移行したときに、「衝突が生じてからモード復帰条件が満たされるまでの経過時間」を求め、その間の移動をまとめて計算して、移動更新部におけるオブジェクトの位置と速度の計算の繰り返しの一部をスキップするものである。   In the above invention, the moving update unit updates the position and speed for every object at every update interval time. However, in the present invention, when the mode is changed to the passing mode, “the mode is restored after a collision occurs”. The “elapsed time until the condition is satisfied” is obtained, the movements during that time are calculated together, and a part of the repetition of the calculation of the position and speed of the object in the movement update unit is skipped.

すなわち、本発明では、「衝突が生じてからモード復帰条件が満たされるまでの間」については、オブジェクトに加えられる外力は事実上変化しない、とのモデル化を行う。後述するように、オブジェクトが連続して通過モードとなっている時間の長さはある程度の短時間とするのが典型的であるから、上記のモデル化が適当である場合も多いからである。   That is, in the present invention, for the “between the occurrence of the collision and the time until the mode return condition is satisfied”, modeling is performed such that the external force applied to the object does not change substantially. As will be described later, it is typical that the length of time during which the object is continuously in the passing mode is set to a certain short time, and thus the above modeling is often appropriate.

本発明によれば、上記の発明の効果に加え、移動計算の対象となるオブジェクトの繰り返しの数を抑制することによって、オブジェクトの衝突と移動のシミュレーションをできるだけ少ない計算量で行うことができるようになる。   According to the present invention, in addition to the effects of the above-described invention, by suppressing the number of repetitions of the object that is the object of the movement calculation, the object collision and movement simulation can be performed with as little calculation amount as possible. Become.

また、本発明のシミュレーション装置において、モード更新部は、当該複数のオブジェクトのうち、通過モードのオブジェクトのそれぞれについて、当該オブジェクトのモードが、衝突判定モードから通過モードに移行してからの経過時間が、所定の通過維持時間に至ると、当該モード復帰条件が満たされるものとして、当該オブジェクトのモードを衝突判定モードに更新するように構成することができる。   In the simulation apparatus of the present invention, the mode update unit may, for each of the objects in the passing mode among the plurality of objects, the elapsed time after the mode of the object shifts from the collision determination mode to the passing mode. When the predetermined passage maintaining time is reached, the mode of the object can be updated to the collision determination mode on the assumption that the mode return condition is satisfied.

すなわち、オブジェクトが一旦衝突すると、通過維持時間が経過するまでは、他のオブジェクトとの衝突は生じない、と仮定するモデル化を行うものである。衝突が生じてからの経過時間の計測は、各オブジェクトごとに行うのが典型的であるが、全オブジェクトについてまとめて行うこととしても良い。   That is, modeling is performed assuming that once an object collides, no collision with another object occurs until the passage maintaining time elapses. The measurement of the elapsed time after the collision occurs is typically performed for each object, but may be performed for all the objects collectively.

本発明は上記発明の好適実施形態に係るもので、通過維持時間という衝突が連続して起きることが極めて珍しい時間を想定することによって、簡易かつ適切にオブジェクトの衝突と移動のシミュレーションを行うことができるようになる。   The present invention relates to a preferred embodiment of the above-described invention, and it is possible to easily and appropriately simulate the collision and movement of an object by assuming a very rare time in which a collision such as a passage maintenance time occurs continuously. become able to.

また、本発明のシミュレーション装置において、モード更新部は、当該複数のオブジェクトのうち、通過モードのオブジェクトのすべてについて、当該更新間隔時間の整数倍に等しいリフレッシュ時間おきに、当該モード復帰条件が満たされるものとして、当該通過モードのオブジェクトのそれぞれのモードを衝突判定モードに更新するように構成することができる。   In the simulation apparatus of the present invention, the mode update unit satisfies the mode return condition for every refresh mode equal to an integral multiple of the update interval time for all the objects in the passing mode among the plurality of objects. As a thing, it can comprise so that each mode of the object of the said passing mode may be updated to collision determination mode.

たとえば、リフレッシュ時間として画面表示の時間間隔である垂直同期割り込みの周期を採用し、更新間隔時間として、当該周期の整数分の1の時間を採用した場合、垂直同期割り込みが生じるごとに全オブジェクトのモードを衝突判定モードに移行するものである。   For example, if the period of vertical synchronization interrupt, which is the screen display time interval, is adopted as the refresh time, and the time of an integer of the period is adopted as the update interval time, every time a vertical synchronization interrupt occurs, all objects The mode is shifted to the collision determination mode.

本発明は、上記発明の好適実施形態に係るもので、全オブジェクトについて、リフレッシュ時間という更新間隔時間の整数倍の時間を想定し、リフレッシュ時間おきに全オブジェクトを衝突判定モードに設定することによって、簡易かつ適切にオブジェクトの衝突と移動のシミュレーションを行うことができるようになる。   The present invention relates to a preferred embodiment of the above invention, and for all objects, assuming an integral multiple of the update interval time called refresh time, and setting all objects to the collision determination mode every refresh time, It becomes possible to simulate object collision and movement easily and appropriately.

また、本発明のシミュレーション装置は、画像生成部をさらに備え、画像生成部は、当該リフレッシュ時間おきに、当該仮想空間に配置される複数のオブジェクトの画像を、記憶された複数のオブジェクトの位置により生成するように構成することができる。   In addition, the simulation apparatus of the present invention further includes an image generation unit, and the image generation unit generates images of a plurality of objects arranged in the virtual space at intervals of the refresh time according to the stored positions of the plurality of objects. Can be configured to generate.

上記のように、リフレッシュ時間として垂直同期割り込みの周期を採用した場合には、リフレッシュ時間(もしくはその2倍〜3倍程度の整数倍)おきに仮想空間のオブジェクト配置から画像を生成し、これを順次表示することによって、オブジェクトの運動の様子をアニメーション表示するのである。   As described above, when the period of the vertical synchronization interrupt is adopted as the refresh time, an image is generated from the object arrangement in the virtual space every refresh time (or an integer multiple of about 2 to 3 times the refresh time). By displaying sequentially, the movement of the object is animated.

本発明によれば、仮想空間内でオブジェクトが衝突したり運動したりする様子のアニメーション画像を、簡易な計算で生成することができるようになる。   According to the present invention, an animation image in which an object collides or moves in a virtual space can be generated by simple calculation.

また、本発明のシミュレーション装置において、衝突更新部は、衝突すると判定されたオブジェクト同士のそれぞれについて、当該オブジェクトが所定のモード維持条件を満たす場合、当該オブジェクトのモードを通過モードに更新するのにかえて、当該オブジェクトのモードを衝突判定モードに維持するように構成することができる。   In the simulation apparatus of the present invention, the collision update unit may update the mode of the object to the passing mode when the object satisfies a predetermined mode maintenance condition for each of the objects determined to collide. Thus, the mode of the object can be maintained in the collision determination mode.

すなわち、モード維持条件を満たすオブジェクトについては、衝突した後も通過モードに移行せずに衝突判定モードのままとする手法である。モード維持条件は、そのオブジェクトの運動が激しい場合や、そのオブジェクトが注目されるべきオブジェクトである場合などに満たされるなどの態様を採用することができる。   In other words, this is a technique in which an object that satisfies the mode maintenance condition remains in the collision determination mode without shifting to the passing mode even after collision. As the mode maintenance condition, it is possible to adopt a mode in which the mode maintenance condition is satisfied when the movement of the object is intense, or when the object is an object to be noticed.

本発明によれば、計算量を抑制しつつも、シミュレーションの精度に影響を与えやすいオブジェクトや、注目すべきオブジェクトについては、より正確なシミュレーションができるようになる。   According to the present invention, it is possible to perform a more accurate simulation for an object that tends to affect the accuracy of the simulation or an object to be noticed while suppressing the calculation amount.

本発明のその他の観点に係るシミュレーション方法は、仮想空間に配置される複数のオブジェクトの位置および速度をシミュレートし、当該複数のオブジェクトのそれぞれについて、当該オブジェクトの位置および速度と、当該オブジェクトが衝突判定モードと通過モードとのいずれであるかを示す情報と、を記憶する記憶部、衝突判定部、衝突更新部、移動更新部、モード更新部を備えるシミュレーション装置にて実行され、衝突判定工程、衝突更新工程、移動更新工程、モード更新工程を備え、以下のように構成する。   A simulation method according to another aspect of the present invention simulates the position and speed of a plurality of objects arranged in a virtual space, and the position and speed of the object and the object collide with each of the plurality of objects. Information indicating whether it is a determination mode or a passing mode; and a storage unit for storing, a collision determination unit, a collision update unit, a movement update unit, and a mode update unit. A collision update process, a movement update process, and a mode update process are provided and configured as follows.

すなわち、衝突判定工程では、衝突判定部が、当該複数のオブジェクトのうち、少なくとも一方が衝突判定モードであるオブジェクト同士が衝突するか否かを、記憶された位置により判定する。   That is, in the collision determination step, the collision determination unit determines whether or not objects having at least one of the plurality of objects in the collision determination mode collide with each other based on the stored position.

一方、衝突更新工程では、衝突更新部が、衝突すると判定されたオブジェクト同士のそれぞれの衝突後の速度を計算して、記憶部に記憶される当該オブジェクトの速度を当該衝突後の速度に更新し、当該オブジェクトのモードを通過モードに更新する。   On the other hand, in the collision update process, the collision update unit calculates the speed after each collision between the objects determined to collide, and updates the speed of the object stored in the storage unit to the speed after the collision. The mode of the object is updated to the passing mode.

さらに、移動更新工程では、移動更新部が、当該複数のオブジェクトのそれぞれについて、記憶された位置および速度により所定の更新間隔時間後の位置および速度を計算して、記憶部に記憶される当該オブジェクトの位置および速度を、当該更新間隔時間後の位置および速度に更新する。   Further, in the movement update step, the movement update unit calculates the position and speed after a predetermined update interval time for each of the plurality of objects based on the stored position and speed, and stores the object in the storage unit. Are updated to the position and speed after the update interval time.

そして、モード更新工程では、モード更新部が、当該複数のオブジェクトのうち、通過モードのオブジェクトのそれぞれについて、所定のモード復帰条件が満たされている場合、記憶部に記憶される当該オブジェクトのモードを衝突判定モードに更新する。   Then, in the mode update step, the mode update unit selects the mode of the object stored in the storage unit when a predetermined mode return condition is satisfied for each of the objects in the pass mode among the plurality of objects. Update to collision detection mode.

本発明のその他の観点に係るプログラムは、コンピュータを上記のシミュレーション装置として機能させ、コンピュータに上記のシミュレーション方法を実行させるように構成する。   A program according to another aspect of the present invention is configured to cause a computer to function as the simulation apparatus and to cause the computer to execute the simulation method.

また、本発明のプログラムは、コンパクトディスク、フレキシブルディスク、ハードディスク、光磁気ディスク、ディジタルビデオディスク、磁気テープ、半導体メモリ等のコンピュータ読取可能な情報記憶媒体に記録することができる。   The program of the present invention can be recorded on a computer-readable information storage medium such as a compact disk, flexible disk, hard disk, magneto-optical disk, digital video disk, magnetic tape, and semiconductor memory.

上記プログラムは、プログラムが実行されるコンピュータとは独立して、コンピュータ通信網を介して配布・販売することができる。また、上記情報記憶媒体は、コンピュータとは独立して配布・販売することができる。   The above program can be distributed and sold via a computer communication network independently of the computer on which the program is executed. The information storage medium can be distributed and sold independently from the computer.

本発明によれば、仮想空間に配置されるオブジェクトの移動や衝突を簡易な計算でシミュレートするのに好適なシミュレーション装置、シミュレーション方法、ならびに、これらをコンピュータにて実現するプログラムを提供することができる。   According to the present invention, it is possible to provide a simulation device, a simulation method, and a program for realizing these on a computer, which are suitable for simulating movement and collision of an object placed in a virtual space by simple calculation. it can.

以下に本発明の実施形態を説明する。以下では、理解を容易にするため、ゲーム用の情報処理装置を利用して本発明が実現される実施形態を説明するが、以下に説明する実施形態は説明のためのものであり、本願発明の範囲を制限するものではない。したがって、当業者であればこれらの各要素もしくは全要素をこれと均等なものに置換した実施形態を採用することが可能であるが、これらの実施形態も本発明の範囲に含まれる。   Embodiments of the present invention will be described below. In the following, for ease of understanding, an embodiment in which the present invention is realized using a game information processing device will be described. However, the embodiment described below is for explanation, and the present invention is described. It does not limit the range. Therefore, those skilled in the art can employ embodiments in which each or all of these elements are replaced with equivalent ones, and these embodiments are also included in the scope of the present invention.

図1は、プログラムを実行することにより、本発明のシミュレーション装置の機能を果たす典型的な情報処理装置の概要構成を示す模式図である。以下、本図を参照して説明する。   FIG. 1 is a schematic diagram showing a schematic configuration of a typical information processing apparatus that functions as a simulation apparatus of the present invention by executing a program. Hereinafter, a description will be given with reference to FIG.

情報処理装置100は、CPU(Central Processing Unit)101と、ROM(Read Only Memory) 102と、RAM(Random Access Memory)103と、インターフェイス104と、コントローラ105と、外部メモリ106と、画像処理部107と、DVD−ROM(Digital Versatile Disc ROM)ドライブ108と、NIC(Network Interface Card)109と、音声処理部110と、マイク111と、を備える。   The information processing apparatus 100 includes a CPU (Central Processing Unit) 101, a ROM (Read Only Memory) 102, a RAM (Random Access Memory) 103, an interface 104, a controller 105, an external memory 106, and an image processing unit 107. A DVD-ROM (Digital Versatile Disc ROM) drive 108, a NIC (Network Interface Card) 109, an audio processing unit 110, and a microphone 111.

ゲーム用のプログラムおよびデータを記憶したDVD−ROMをDVD−ROMドライブ108に装着して、情報処理装置100の電源を投入することにより、当該プログラムが実行され、本実施形態のシミュレーション装置が実現される。   A DVD-ROM storing a game program and data is loaded into the DVD-ROM drive 108 and the information processing apparatus 100 is turned on to execute the program, thereby realizing the simulation apparatus of the present embodiment. The

CPU 101は、情報処理装置100全体の動作を制御し、各構成要素と接続され制御信号やデータをやりとりする。また、CPU 101は、レジスタ(図示せず)という高速アクセスが可能な記憶域に対してALU(Arithmetic Logic Unit)(図示せず)を用いて加減乗除等の算術演算や、論理和、論理積、論理否定等の論理演算、ビット和、ビット積、ビット反転、ビットシフト、ビット回転等のビット演算などを行うことができる。さらに、マルチメディア処理対応のための加減乗除等の飽和演算や、三角関数等、ベクトル演算などを高速に行えるように、CPU 101自身が構成されているものや、コプロセッサを備えて実現するものがある。   The CPU 101 controls the overall operation of the information processing apparatus 100 and is connected to each component to exchange control signals and data. Further, the CPU 101 uses arithmetic operations such as addition / subtraction / multiplication / division, logical sum, logical product, etc. using an ALU (Arithmetic Logic Unit) (not shown) for a storage area called a register (not shown) that can be accessed at high speed. , Logic operations such as logical negation, bit operations such as bit sum, bit product, bit inversion, bit shift, and bit rotation can be performed. In addition, the CPU 101 itself is configured so that saturation operations such as addition / subtraction / multiplication / division for multimedia processing, vector operations such as trigonometric functions, etc. can be performed at a high speed, and those provided with a coprocessor. There is.

ROM 102には、電源投入直後に実行されるIPL(Initial Program Loader)が記録され、これが実行されることにより、DVD−ROMに記録されたプログラムをRAM 103に読み出してCPU 101による実行が開始される。また、ROM 102には、情報処理装置100全体の動作制御に必要なオペレーティングシステムのプログラムや各種のデータが記録される。   The ROM 102 records an IPL (Initial Program Loader) that is executed immediately after the power is turned on, and when this is executed, the program recorded on the DVD-ROM is read out to the RAM 103 and execution by the CPU 101 is started. The The ROM 102 stores an operating system program and various data necessary for operation control of the entire information processing apparatus 100.

RAM 103は、データやプログラムを一時的に記憶するためのもので、DVD−ROMから読み出したプログラムやデータ、その他ゲームの進行やチャット通信に必要なデータが保持される。また、CPU 101は、RAM 103に変数領域を設け、当該変数に格納された値に対して直接ALUを作用させて演算を行ったり、RAM 103に格納された値を一旦レジスタに格納してからレジスタに対して演算を行い、演算結果をメモリに書き戻す、などの処理を行う。   The RAM 103 is for temporarily storing data and programs, and holds programs and data read from the DVD-ROM and other data necessary for game progress and chat communication. Further, the CPU 101 provides a variable area in the RAM 103 and performs an operation by directly operating the ALU on the value stored in the variable, or temporarily stores the value stored in the RAM 103 in the register. Perform operations such as performing operations on registers and writing back the operation results to memory.

インターフェイス104を介して接続されたコントローラ105は、ユーザがゲーム実行の際に行う操作入力を受け付ける。   The controller 105 connected via the interface 104 receives an operation input performed when the user executes the game.

インターフェイス104を介して着脱自在に接続された外部メモリ106には、ゲーム等のプレイ状況(過去の成績等)を示すデータ、ゲームの進行状態を示すデータ、ネットワーク対戦の場合のチャット通信のログ(記録)のデータなどが書き換え可能に記憶される。ユーザは、コントローラ105を介して指示入力を行うことにより、これらのデータを適宜外部メモリ106に記録することができる。   The external memory 106 detachably connected via the interface 104 stores data indicating game play status (past results, etc.), data indicating game progress, and log of chat communication in the case of a network match ( Data) is stored in a rewritable manner. The user can record these data in the external memory 106 as appropriate by inputting an instruction via the controller 105.

DVD−ROMドライブ108に装着されるDVD−ROMには、ゲームを実現するためのプログラムとゲームに付随する画像データや音声データが記録される。CPU 101の制御によって、DVD−ROMドライブ108は、これに装着されたDVD−ROMに対する読み出し処理を行って、必要なプログラムやデータを読み出し、これらはRAM 103等に一時的に記憶される。   A DVD-ROM mounted on the DVD-ROM drive 108 stores a program for realizing the game and image data and audio data associated with the game. Under the control of the CPU 101, the DVD-ROM drive 108 performs a reading process on the DVD-ROM loaded therein, reads out necessary programs and data, and these are temporarily stored in the RAM 103 or the like.

画像処理部107は、DVD−ROMから読み出されたデータをCPU 101や画像処理部107が備える画像演算プロセッサ(図示せず)によって加工処理した後、これを画像処理部107が備えるフレームメモリ(図示せず)に記録する。フレームメモリに記録された画像情報は、所定の同期タイミングでビデオ信号に変換され画像処理部107に接続されるモニタ(図示せず)へ出力される。これにより、各種の画像表示が可能となる。   The image processing unit 107 processes the data read from the DVD-ROM by an image arithmetic processor (not shown) included in the CPU 101 or the image processing unit 107, and then processes the processed data on a frame memory ( (Not shown). The image information recorded in the frame memory is converted into a video signal at a predetermined synchronization timing and output to a monitor (not shown) connected to the image processing unit 107. Thereby, various image displays are possible.

画像演算プロセッサは、2次元の画像の重ね合わせ演算やαブレンディング等の透過演算、各種の飽和演算を高速に実行できる。   The image calculation processor can execute a two-dimensional image overlay calculation, a transmission calculation such as α blending, and various saturation calculations at high speed.

また、仮想3次元空間に配置され、各種のテクスチャ情報が付加されたポリゴン情報を、Zバッファ法によりレンダリングして、所定の視点位置から仮想3次元空間に配置されたポリゴンを所定の視線の方向へ俯瞰したレンダリング画像を得る演算の高速実行も可能である。   Also, polygon information arranged in the virtual three-dimensional space and added with various texture information is rendered by the Z buffer method, and the polygon arranged in the virtual three-dimensional space from the predetermined viewpoint position is determined in the direction of the predetermined line of sight It is also possible to perform high-speed execution of operations for obtaining rendered images.

さらに、CPU 101と画像演算プロセッサが協調動作することにより、文字の形状を定義するフォント情報にしたがって、文字列を2次元画像としてフレームメモリへ描画したり、各ポリゴン表面へ描画することが可能である。   Further, the CPU 101 and the image arithmetic processor operate in a coordinated manner, so that a character string can be drawn as a two-dimensional image in a frame memory or drawn on the surface of each polygon according to font information that defines the character shape. is there.

NIC 109は、情報処理装置100をインターネット等のコンピュータ通信網(図示せず)に接続するためのものであり、LAN(Local Area Network)を構成する際に用いられる10BASE−T/100BASE−T規格にしたがうものや、電話回線を用いてインターネットに接続するためのアナログモデム、ISDN(Integrated Services Digital Network)モデム、ADSL(Asymmetric Digital Subscriber Line)モデム、ケーブルテレビジョン回線を用いてインターネットに接続するためのケーブルモデム等と、これらとCPU 101との仲立ちを行うインターフェース(図示せず)により構成される。   The NIC 109 is used to connect the information processing apparatus 100 to a computer communication network (not shown) such as the Internet, and is based on the 10BASE-T / 100BASE-T standard used when configuring a LAN (Local Area Network). To connect to the Internet using an analog modem, ISDN (Integrated Services Digital Network) modem, ADSL (Asymmetric Digital Subscriber Line) modem, cable television line A cable modem or the like and an interface (not shown) that mediates between these and the CPU 101 are configured.

音声処理部110は、DVD−ROMから読み出した音声データをアナログ音声信号に変換し、これに接続されたスピーカ(図示せず)から出力させる。また、CPU 101の制御の下、ゲームの進行の中で発生させるべき効果音や楽曲データを生成し、これに対応した音声をスピーカから出力させる。   The audio processing unit 110 converts audio data read from the DVD-ROM into an analog audio signal and outputs the analog audio signal from a speaker (not shown) connected thereto. Further, under the control of the CPU 101, sound effects and music data to be generated during the progress of the game are generated, and sound corresponding to this is output from the speaker.

音声処理部110では、DVD−ROMに記録された音声データがMIDIデータである場合には、これが有する音源データを参照して、MIDIデータをPCMデータに変換する。また、ADPCM形式やOgg Vorbis形式等の圧縮済音声データである場合には、これを展開してPCMデータに変換する。PCMデータは、そのサンプリング周波数に応じたタイミングでD/A(Digital/Analog)変換を行って、スピーカに出力することにより、音声出力が可能となる。   When the audio data recorded on the DVD-ROM is MIDI data, the audio processing unit 110 refers to the sound source data included in the audio data and converts the MIDI data into PCM data. If the compressed audio data is in ADPCM format or Ogg Vorbis format, it is expanded and converted to PCM data. The PCM data can be output by performing D / A (Digital / Analog) conversion at a timing corresponding to the sampling frequency and outputting it to a speaker.

さらに、情報処理装置100には、インターフェイス104を介してマイク111を接続することができる。この場合、マイク111からのアナログ信号に対しては、適当なサンプリング周波数でA/D変換を行い、PCM形式のディジタル信号として、音声処理部110でのミキシング等の処理ができるようにする。   Furthermore, a microphone 111 can be connected to the information processing apparatus 100 via the interface 104. In this case, the analog signal from the microphone 111 is subjected to A / D conversion at an appropriate sampling frequency so that processing such as mixing in the sound processing unit 110 can be performed as a PCM format digital signal.

このほか、情報処理装置100は、ハードディスク等の大容量外部記憶装置を用いて、ROM 102、RAM 103、外部メモリ106、DVD−ROMドライブ108に装着されるDVD−ROM等と同じ機能を果たすように構成してもよい。   In addition, the information processing apparatus 100 uses a large-capacity external storage device such as a hard disk so as to perform the same function as the ROM 102, the RAM 103, the external memory 106, the DVD-ROM mounted on the DVD-ROM drive 108, and the like. You may comprise.

以上で説明した情報処理装置100は、いわゆる「コンシューマ向けテレビゲーム装置」に相当するものであるが、仮想空間を表示するような画像処理を行うものであれば本発明を実現することができる。したがって、携帯電話、携帯ゲーム機器、カラオケ装置、一般的なビジネス用コンピュータなど、種々の計算機上で本発明を実現することが可能である。   The information processing apparatus 100 described above corresponds to a so-called “consumer video game apparatus”, but the present invention can be realized as long as it performs image processing to display a virtual space. Therefore, the present invention can be realized on various computers such as a mobile phone, a portable game device, a karaoke apparatus, and a general business computer.

たとえば、一般的なコンピュータは、上記情報処理装置100と同様に、CPU、RAM、ROM、DVD−ROMドライブ、および、NICを備え、情報処理装置100よりも簡易な機能を備えた画像処理部を備え、外部記憶装置としてハードディスクを有する他、フレキシブルディスク、光磁気ディスク、磁気テープ等が利用できるようになっている。また、コントローラ105ではなく、キーボードやマウスなどを入力装置として利用する。   For example, a general computer, like the information processing apparatus 100, includes an image processing unit that includes a CPU, RAM, ROM, DVD-ROM drive, and NIC and has simpler functions than the information processing apparatus 100. In addition to having a hard disk as an external storage device, a flexible disk, a magneto-optical disk, a magnetic tape, and the like can be used. Further, not the controller 105 but a keyboard or a mouse is used as an input device.

(衝突のモデル)
以下では、本実施形態に係るシミュレーション装置にて想定するオブジェクト同士の衝突のモデルの種々の態様について説明する。本衝突モデルには、物理現象のシミュレーションをできるだけ忠実に行いたい場合のほか、計算を簡易に済ませるために尤もらしい近似を行う場合など、用途に合わせて種々適用することができる。
(Collision model)
Hereinafter, various aspects of a model of collision between objects assumed in the simulation apparatus according to the present embodiment will be described. This collision model can be applied in various ways according to the purpose, for example, when it is desired to simulate a physical phenomenon as faithfully as possible, or when a reasonable approximation is performed in order to simplify the calculation.

図2は、衝突するオブジェクト同士の位置関係を示す説明図である。以下、本図を参照して説明する。   FIG. 2 is an explanatory diagram showing the positional relationship between objects that collide. Hereinafter, a description will be given with reference to FIG.

本図に示すように、仮想空間201内に2つの球形のオブジェクトi 211、オブジェクトj 231が配置されており、原点203からオブジェクトi 211、オブジェクトj 231への位置ベクトル213、233を、それぞれr[i],r[j]とする。また、オブジェクトi 211、オブジェクトj 231の半径は、それぞれ、R[i],R[j]である。   As shown in the figure, two spherical objects i 211 and j 231 are arranged in the virtual space 201, and position vectors 213 and 233 from the origin 203 to the object i 211 and the object j 231 are respectively represented as r. Let [i] and r [j]. The radii of the object i 211 and the object j 231 are R [i] and R [j], respectively.

したがって、
|r[i] - r[j]| ≦ R[i] + R[j]
が成立すると、オブジェクトi 211、オブジェクトj 231は現在衝突中である、ということになる。ここで、|p|はベクトルpの長さを意味する。
Therefore,
| r [i]-r [j] | ≤ R [i] + R [j]
Is established, the object i 211 and the object j 231 are currently in collision. Here, | p | means the length of the vector p.

本図に示すように、オブジェクトi 211、オブジェクトj 231の速度ベクトル215、235を、それぞれv[i],v[j]とする。オブジェクトi 211に対するオブジェクトj 231の相対速度ベクトル251は、
v[j] - v[i]
であり、オブジェクトi 211に対するオブジェクトj 231の相対位置ベクトル252は、
r[j] - r[i]
であるが、相対速度ベクトル251と相対位置ベクトル252のなす角253(θ[j,i])が0度〜90度であれば、両者は離れつつあり、90度〜180度であれば、両者は近付きつつあることになる。
As shown in the figure, the velocity vectors 215 and 235 of the object i 211 and the object j 231 are v [i] and v [j], respectively. The relative velocity vector 251 of the object j 231 with respect to the object i 211 is
v [j]-v [i]
The relative position vector 252 of the object j 231 with respect to the object i 211 is
r [j]-r [i]
However, if the angle 253 (θ [j, i]) formed by the relative velocity vector 251 and the relative position vector 252 is 0 degrees to 90 degrees, the two are moving away from each other, and if the angle 253 (θ [j, i]) is 90 degrees to 180 degrees, Both are getting closer.

ここで、ベクトルp,qの内積をp・qと書くとすると、
(v[j] - v[i])・(r[j] - r[i]) = |v[j] - v[i]| |r[j] - r[i]| cosθ[j,i]
であるから、
(v[j] - v[i])・(r[j] - r[i])<0 … 衝突が始まりつつある。
(v[j] - v[i])・(r[j] - r[i])=0 … 現在衝突中。
(v[j] - v[i])・(r[j] - r[i])>0 … 衝突が終わりつつある。
のように考えることができる。
Here, if the inner product of vectors p and q is written as p · q,
(v [j]-v [i]) ・ (r [j]-r [i]) = | v [j]-v [i] | | r [j]-r [i] | cosθ [j, i]
Because
(v [j]-v [i]) ・ (r [j]-r [i]) <0… The collision is starting.
(v [j]-v [i]) ・ (r [j]-r [i]) = 0… Currently colliding.
(v [j]-v [i]) ・ (r [j]-r [i])> 0 ... The collision is ending.
Can be thought of as

ここで、相対位置ベクトル252
r[j] - r[i]
と同じ向きの方向ベクトル254を
z[j,i] = (r[j] - r[i])/|r[j] - r[i]|
と書くこととする。
Here, the relative position vector 252
r [j]-r [i]
Direction vector 254 in the same direction as
z [j, i] = (r [j]-r [i]) / | r [j]-r [i] |
I will write.

さて、本図は、オブジェクトi 211に対するオブジェクトj 231の相対位置ベクトル252
r[j] - r[i]
や、その方向ベクトル254
z[j,i]
に垂直な方向から、仮想空間201を見た様子を示している。
This figure shows the relative position vector 252 of the object j 231 with respect to the object i 211.
r [j]-r [i]
And its direction vector 254
z [j, i]
The state which looked at the virtual space 201 from the direction perpendicular | vertical to is shown.

ここで、オブジェクトi 211、オブジェクトj 231の衝突が生じている仮想的な衝突平面261を考えることができる。本モデルでは、衝突平面261は、その法線ベクトルが方向ベクトル254に等しく、オブジェクトi 211、オブジェクトj 231の位置をその半径の比で内分する内分点262を通過すると考える。   Here, a virtual collision plane 261 in which a collision between the object i 211 and the object j 231 occurs can be considered. In this model, the collision plane 261 has a normal vector equal to the direction vector 254 and is considered to pass through an internal dividing point 262 that internally divides the position of the object i 211 and the object j 231 by the ratio of the radii.

そして、この方向ベクトル254(z[j,i])に直交する2つの単位方向ベクトル301、302(x[j,i],y[j,i])を考える。衝突平面261は、2つの単位方向ベクトル301、302(x[j,i],y[j,i])のいずれに対しても平行である。   Then, consider two unit direction vectors 301 and 302 (x [j, i], y [j, i]) orthogonal to the direction vector 254 (z [j, i]). The collision plane 261 is parallel to both of the two unit direction vectors 301 and 302 (x [j, i], y [j, i]).

まず、衝突平面261に垂直な方向の方向ベクトル254に直交する2つの単位方向ベクトル301、302と、(x[j,i],y[j,i])方向ベクトル254(z[j,i])と、は、衝突平面261に固定された座標系における座標軸の方向をあらわす方向ベクトルである。なお、方向ベクトル301、302(x[j,i],y[j,i])が平面を張り、その平面が衝突平面261に平行であれば、その方向は任意である。典型的には、方向ベクトル301、302(x[j,i],y[j,i])も互いに直交する。   First, two unit direction vectors 301 and 302 orthogonal to a direction vector 254 in a direction perpendicular to the collision plane 261, and an (x [j, i], y [j, i]) direction vector 254 (z [j, i ]) Is a direction vector representing the direction of the coordinate axis in the coordinate system fixed to the collision plane 261. In addition, if the direction vectors 301 and 302 (x [j, i], y [j, i]) extend a plane and the plane is parallel to the collision plane 261, the direction is arbitrary. Typically, the direction vectors 301 and 302 (x [j, i], y [j, i]) are also orthogonal to each other.

図3は、各ベクトルの位置関係をさらに詳細に示す説明図である。以下、本図を参照して説明する。本図は、方向ベクトル302(y[j,i])に平行な視点・視線から当該仮想空間201内のベクトルを見たものである。したがって、方向ベクトル302(y[j,i])は点になるため、図示を省略している。また、衝突平面261は、直線で描かれることになる。   FIG. 3 is an explanatory diagram showing the positional relationship between the vectors in more detail. Hereinafter, a description will be given with reference to FIG. This figure shows a vector in the virtual space 201 viewed from a viewpoint / line of sight parallel to the direction vector 302 (y [j, i]). Therefore, the direction vector 302 (y [j, i]) is a point and is not shown. Further, the collision plane 261 is drawn with a straight line.

オブジェクトi 211、オブジェクトj 231の衝突前の速度ベクトル215、235(v[i],v[j])は、これらのベクトルx[j,i],y[j,i],z[j,i]を用いて、以下のように各成分に分解できる。
v[i] = (v[i]・x[j,i])x[j,i] + (v[i]・y[j,i])y[j,i] + (v[i]・z[j,i])z[j,i] = p x[j,i] + q y[j,i] + r z[j,i];
v[j] = (v[j]・x[j,i])x[j,i] + (v[j]・y[j,i])y[j,i] + (v[j]・z[j,i])z[j,i] = P x[j,i] + Q y[j,i] + R z[j,i]
The velocity vectors 215 and 235 (v [i], v [j]) before the collision of the object i 211 and the object j 231 are represented by these vectors x [j, i], y [j, i], z [j, i] can be decomposed into the following components.
v [i] = (v [i] ・ x [j, i]) x [j, i] + (v [i] ・ y [j, i]) y [j, i] + (v [i] Z [j, i]) z [j, i] = px [j, i] + qy [j, i] + rz [j, i];
v [j] = (v [j] ・ x [j, i]) x [j, i] + (v [j] ・ y [j, i]) y [j, i] + (v [j] Z [j, i]) z [j, i] = P x [j, i] + Q y [j, i] + R z [j, i]

ここで、オブジェクトi 211、オブジェクトj 231の衝突後の速度ベクトル215'、231'(v'[i],v'[j])を各成分に分解して以下のように表す。
v'[i] = p' x[j,i] + q' y[j,i] + r' z[j,i];
v'[j] = P' x[j,i] + Q' y[j,i] + R' z[j,i]
Here, the velocity vectors 215 ′, 231 ′ (v ′ [i], v ′ [j]) after the collision of the object i 211 and the object j 231 are decomposed into the respective components and expressed as follows.
v ′ [i] = p′x [j, i] + q′y [j, i] + r′z [j, i];
v '[j] = P' x [j, i] + Q 'y [j, i] + R' z [j, i]

ここで、p,q,r,P,Q,R,p',q',r',P',Q',R'は、いずれもスカラー量である。   Here, p, q, r, P, Q, R, p ′, q ′, r ′, P ′, Q ′, and R ′ are all scalar quantities.

本モデルでは、オブジェクトi 211、オブジェクトj 231の間の衝突反発係数をe[j,i]、衝突摩擦係数をμ[j,i]とおく。衝突反発係数は、衝突平面261に垂直な速度成分に係る量であり、衝突摩擦係数は、衝突平面261に平行な速度成分に係る量である。これらの2つの係数の値は、いずれも0以上1以下である。   In this model, the collision restitution coefficient between the object i 211 and the object j 231 is e [j, i], and the collision friction coefficient is μ [j, i]. The collision restitution coefficient is an amount related to a velocity component perpendicular to the collision plane 261, and the collision friction coefficient is an amount related to a velocity component parallel to the collision plane 261. The values of these two coefficients are both 0 or more and 1 or less.

以下では、誤解の生じない限り、e[j,i]をeと書き、μ[j,i]をμと書くこととする。衝突摩擦係数について、
P' - p' = μ(P - p);
Q' - q' = μ(Q - q)
が成立し、衝突反発係数について、
R' - r' = -e(R - r)
が成立するものと想定する。
In the following, e [j, i] is written as e and μ [j, i] is written as μ unless misunderstanding occurs. About the impact friction coefficient
P '-p' = μ (P-p);
Q '-q' = μ (Q-q)
And the collision coefficient of restitution
R '-r' = -e (R-r)
Is assumed to hold.

e = e[j,i]は、1であれば衝突しても完全弾性反発し、0であれば、反発せず一体化(接着・密着・合体)してしまうことを意味する。   e = e [j, i] means that if it is 1, it will completely repel even if it collides, and if it is 0, it means that it will not repel and it will be integrated (adhesion / contact / coalescence).

μ = μ[j,i]は、0であれば摩擦力によって両者が一体化(接着・密着・合体)してしまい、1であれば摩擦力がまったく生じないことを意味する。   μ = μ [j, i] means that both are integrated (adhesion / adhesion / merging) by frictional force if 0, and no frictional force is generated if it is 1.

本モデルにおいて、オブジェクトi 211、オブジェクトj 231のそれぞれの質量w[i],w[j](以下、理解を容易にするため、誤解の生じない限り、w[i]をmと書き、w[j]をMと書くものとする。)としたとき、現実世界と同様に運動量保存則が成立すると考えると、
mp + MP = mp' + MP';
mq + MQ = mq' + MQ';
mr + MR = mr' + MR'
が成立する。
In this model, the masses w [i] and w [j] of the object i 211 and the object j 231 (hereinafter, for ease of understanding, w [i] is written as m unless w When [j] is written as M.), the momentum conservation law is established as in the real world.
mp + MP = mp '+ MP';
mq + MQ = mq '+ MQ';
mr + MR = mr '+ MR'
Is established.

これらの方程式を解くことによって、p',q',r',P',Q',R'を求めることができる。すなわち、
p' = (m+μM)p/(m+M) + (1-μ)MP/(m+M);
q' = (m+μM)q/(m+M) + (1-μ)MQ/(m+M);
r' = (m-eM)r/(m+M) + (1+e)MR/(m+M);
P' = (M+μm)P/(m+M) + (1-μ)mp/(m+M);
Q' = (M+μm)Q/(m+M) + (1-μ)mq/(m+M);
R' = (M-em)R/(m+M) + (1+e)mr/(m+M)
である。
By solving these equations, p ′, q ′, r ′, P ′, Q ′, and R ′ can be obtained. That is,
p ′ = (m + μM) p / (m + M) + (1-μ) MP / (m + M);
q ′ = (m + μM) q / (m + M) + (1-μ) MQ / (m + M);
r ′ = (m−eM) r / (m + M) + (1 + e) MR / (m + M);
P ′ = (M + μm) P / (m + M) + (1-μ) mp / (m + M);
Q ′ = (M + μm) Q / (m + M) + (1-μ) mq / (m + M);
R '= (M-em) R / (m + M) + (1 + e) mr / (m + M)
It is.

これにより、衝突後のオブジェクトi 211、オブジェクトj 231の速度ベクトル215',235'(v'[i],v'[j])を定めることができる。   Thereby, the velocity vectors 215 ′ and 235 ′ (v ′ [i], v ′ [j]) of the object i 211 and the object j 231 after the collision can be determined.

このように、上記のモデルでは、2つのオブジェクトi 211、オブジェクトj 231を球形であると仮定し、衝突平面261の位置および向き(姿勢)をその位置関係から求め、衝突平面261を介して両者が衝突・反発し合うと仮定し、衝突反発係数と衝突摩擦係数を考慮するとともに、運動量保存則が成立するように物理現象をモデル化している。   As described above, in the above model, it is assumed that the two objects i 211 and j 231 are spherical, the position and orientation (posture) of the collision plane 261 are obtained from the positional relationship, and both are obtained via the collision plane 261. Physics phenomena are modeled so that the law of conservation of momentum is established, taking into account the impact resilience coefficient and the impact friction coefficient.

たとえばオブジェクトの形状が球形でない場合は、重心同士の位置関係とオブジェクトの大まかな大きさから、当該オブジェクトを「球形」で近似して、このモデルを適用することができる。また、衝突平面261の位置および向きを、その他の手法によって定めても良い。   For example, when the shape of the object is not spherical, this model can be applied by approximating the object in a “spherical shape” based on the positional relationship between the centroids and the approximate size of the object. Further, the position and orientation of the collision plane 261 may be determined by other methods.

このほか、オブジェクト同士の衝突のシミュレーションを適用する用途によっては、さらに計算の簡略化を図ることができる。たとえば、宇宙空間を舞台にしたシューティングゲームで小惑星帯を背景とするときに、小惑星同士の衝突をシミュレーションしたいときなどは、必ずしも現実の物理法則に則ったシミュレーションが必要なわけではなく、ある程度尤もらしい近似が得られれば十分である。   In addition, depending on the application to which the simulation of collision between objects is applied, the calculation can be further simplified. For example, when you want to simulate a collision between asteroids in a shooting game set in outer space, when you want to simulate collisions between asteroids, you do not necessarily need a simulation based on real physical laws, but it seems to some extent likely It is sufficient if an approximation is obtained.

このような場合には、以下のような近似解法を採用しても良い。まず、x[j,i],y[j,i]方向については、衝突に際して摩擦は生じないこととするのが最も単純である。すなわち、
p' = p,q' = q,P' = p,Q' = Q
とする。なお、このモデル化は、上記のモデルの単純な場合(μ[j,i] = 1)で、運動量保存則も維持される。
In such a case, the following approximate solution may be adopted. First, in the x [j, i] and y [j, i] directions, it is simplest that no friction occurs in the collision. That is,
p '= p, q' = q, P '= p, Q' = Q
And This modeling is a simple case of the above model (μ [j, i] = 1), and the momentum conservation law is also maintained.

一方、z[j,i]方向については、反発の計算を簡略化することが考えられる。すなわち、
r' = -r,R' = -R
あるいは、
r' = R,R' = r
とする。これらのモデルでは、必ずしも運動量保存則が成立しないが、用途によっては、このような近似で十分な場合がある。
On the other hand, for the z [j, i] direction, it is conceivable to simplify the calculation of repulsion. That is,
r '= -r, R' = -R
Or
r '= R, R' = r
And In these models, the momentum conservation law is not necessarily established, but such an approximation may be sufficient depending on the application.

このほか、各オブジェクトの質量w[i],w[j]や衝突摩擦係数μ[j,i]、衝突反発係数e[j,i]が一定の定数であるとする等の手法もある。   In addition, there is a method in which the masses w [i], w [j], the collision friction coefficient μ [j, i], and the collision restitution coefficient e [j, i] of each object are constant.

また、上記の手法においてp,q,r,P,Q,Rを求めるには、グローバル座標系から方向ベクトルz[j,i]を座標軸の一つとするローカル座標系への座標変換が必要となる。このような座標変換の処理を簡易な計算で近似する手法もありうる。   In addition, in order to obtain p, q, r, P, Q, and R in the above method, coordinate conversion from the global coordinate system to the local coordinate system with the direction vector z [j, i] as one of the coordinate axes is necessary. Become. There may be a method of approximating such coordinate conversion processing by simple calculation.

すなわち、グローバル座標系における方向ベクトル254(z[j,i])の成分のうち、絶対値が最も大きい成分の軸を、衝突平面261の法線方向とするという手法である。グローバル座標系の軸の方向は、3×2の6種類ありうるので、その中からいずれかを、方向ベクトル254(z[j,i])の方向として近似する。そして、衝突平面261に平行な方向の軸は、グローバル座標系における残りの2つの軸に合わせる。   That is, this is a method in which the axis of the component having the largest absolute value among the components of the direction vector 254 (z [j, i]) in the global coordinate system is set as the normal direction of the collision plane 261. Since there are six types of 3 × 2 axes in the global coordinate system, one of them is approximated as the direction of the direction vector 254 (z [j, i]). The axes in the direction parallel to the collision plane 261 are aligned with the remaining two axes in the global coordinate system.

本手法では、グローバル座標系におけるオブジェクトi 211、オブジェクトj 231等の位置ベクトル213、233や速度ベクトル215、235に対する座標変換は、各成分の符号を反転させるか否か、という計算のみで行うことができる。   In this method, the coordinate transformation for the position vectors 213 and 233 and the velocity vectors 215 and 235 of the object i 211 and the object j 231 in the global coordinate system is performed only by calculating whether or not the sign of each component is inverted. Can do.

このように、衝突のシミュレーションには種々の計算を要するため、これを簡易化するために、以下に説明する「間引き」を行う。「間引き」では、一旦衝突が生じたら、そのオブジェクトについては、それに続く所定の時間(定数の場合もあるし、変数の場合もある。)だけ、衝突判定を行わないこととする。以下詳細に説明する。   As described above, since various calculations are required for the simulation of the collision, in order to simplify this, “thinning” described below is performed. In “thinning”, once a collision occurs, the object is not judged for a predetermined time (may be a constant or a variable). This will be described in detail below.

(シミュレーション装置)
図4は、本実施形態に係るシミュレーション装置の概要構成を示す模式図である。以下、本図を参照して説明する。
(Simulation device)
FIG. 4 is a schematic diagram showing a schematic configuration of the simulation apparatus according to the present embodiment. Hereinafter, a description will be given with reference to FIG.

本実施形態に係るシミュレーション装置400は、記憶部401、衝突判定部402、衝突更新部403、移動更新部404、モード更新部405、画像生成部406を備え、情報処理装置100上にてプログラムを実行することによって実現される。   The simulation apparatus 400 according to the present embodiment includes a storage unit 401, a collision determination unit 402, a collision update unit 403, a movement update unit 404, a mode update unit 405, and an image generation unit 406. A program is executed on the information processing apparatus 100. It is realized by executing.

記憶部401には、M個のオブジェクトのそれぞれの情報が、配列として記憶される。すなわち、以下のような情報である。
位置ベクトルr[0],r[1],…,r[M-1];
速度ベクトルv[0],v[1],…,v[M-1];
質量w[0],w[1],…,w[M-1];
大きさ(半径)R[0],R[1],…,R[M-1];
モードc[0],c[1],…,c[M-1]
The storage unit 401 stores information on each of the M objects as an array. That is, the information is as follows.
Position vector r [0], r [1], ..., r [M-1];
Velocity vector v [0], v [1], ..., v [M-1];
Mass w [0], w [1], ..., w [M-1];
Size (radius) R [0], R [1], ..., R [M-1];
Mode c [0], c [1], ..., c [M-1]

ここで、モードc[0],c[1],c[M-1]のそれぞれには、当該オブジェクトの現在のモードが、「衝突判定モード」と「通過モード」のいずれであるかの情報が記録される。   Here, in each of the modes c [0], c [1], and c [M-1], information indicating whether the current mode of the object is “collision determination mode” or “passing mode” Is recorded.

このほか、仮想空間201内において各オブジェクトに印加される外力として、たとえば、重力、摩擦力、バネ等の弾性体で連結されている場合の弾性力、ロケットエンジンやジェットエンジンなどの推進力、粘性力などを想定することも可能である。   In addition, as an external force applied to each object in the virtual space 201, for example, gravity force, friction force, elastic force when connected by an elastic body such as a spring, propulsive force such as a rocket engine or a jet engine, viscosity It is also possible to assume power.

本実施形態では、当該オブジェクトに印加される外力ベクトルの総和もまた、記憶部401の配列に記憶することとする。すなわち、以下のような情報である。
外力ベクトルf[0],f[1],…,f[M-1]
In this embodiment, the sum of external force vectors applied to the object is also stored in the array of the storage unit 401. That is, the information is as follows.
External force vector f [0], f [1], ..., f [M-1]

本実施形態では、現在の仮想空間201の様子を表す画像を生成する周期、すなわちリフレッシュ時間Tは、垂直同期割り込みの整数倍とする。たとえば、垂直同期割り込み周期が1/60秒であるとき、T = 1/60 × 1 = 1/60秒、あるいは、T = 1/60 × 2 = 1/30秒とする、等である。   In the present embodiment, the cycle for generating an image representing the current state of the virtual space 201, that is, the refresh time T is an integer multiple of the vertical synchronization interrupt. For example, when the vertical synchronization interrupt period is 1/60 seconds, T = 1/60 × 1 = 1/60 seconds, T = 1/60 × 2 = 1/30 seconds, or the like.

そして、リフレッシュ時間TをD個(Dは2以上の整数)に分割して、Δt = T/Dをシミュレーションにおけるステップ時間(更新時間間隔)とする。そして、現在のステップが、周期Tにおける何回目のステップに相当するか、を表すカウンタdと、最後に画像を生成した時刻tと、を記憶するための領域も用意する。時刻tの単位は、発生した垂直同期割り込みの回数を表すカウンタの値とするのが典型的であるが、その他の種々の単位を採用しても良い。   Then, the refresh time T is divided into D (D is an integer of 2 or more), and Δt = T / D is set as a step time (update time interval) in the simulation. Then, an area for storing a counter d indicating how many times the current step corresponds to the cycle T and a time t when the image was last generated is also prepared. The unit of time t is typically the value of a counter that represents the number of vertical synchronization interrupts that have occurred, but other various units may be employed.

したがって、RAM 103は、記憶部401として機能する。   Therefore, the RAM 103 functions as the storage unit 401.

図5は、本シミュレーション装置400にて実行されるシミュレーション処理の制御の流れを示すフローチャートである。以下、本図を参照して説明する。   FIG. 5 is a flowchart showing a flow of control of simulation processing executed by the simulation apparatus 400. Hereinafter, a description will be given with reference to FIG.

本処理が開始されると、CPU 101は、記憶部401の各領域の初期化を行う(ステップS500)。初期化を行うための初期化データは、DVD−ROMドライブ108に装着されたDVD−ROMから読み出したり、乱数によって生成する等の手法を採用することができる。   When this process is started, the CPU 101 initializes each area of the storage unit 401 (step S500). Initialization data for performing initialization can be read out from a DVD-ROM mounted on the DVD-ROM drive 108 or generated by random numbers.

オブジェクトのモードについてi = 0,1,…,M-1のそれぞれについて、
c[i]←衝突判定モード
と初期化するのが典型的である。ここで、「←」は代入を意味する。すなわち、本実施形態では、処理の開始時については、全オブジェクトについて、衝突判定を行うものとする。ただし、c[i]についての初期化処理は、後述するステップS502においても行われるので、省略しても良い。
For each of the object modes i = 0, 1, ..., M-1,
c [i] ← Typically, the collision detection mode is initialized. Here, “←” means substitution. That is, in the present embodiment, at the start of processing, collision determination is performed for all objects. However, the initialization process for c [i] is also performed in step S502 described later, and may be omitted.

また、
d←0;
t←現在時刻
とする。本実施形態では、後述するように、dが0である場合は画像生成を行うこととしている。
Also,
d ← 0;
t ← Current time. In this embodiment, as will be described later, when d is 0, image generation is performed.

次に、CPU 101は、d = 0であるか否かを判定し(ステップS501)、d = 0である場合(ステップS501;Yes)、i = 0,1,…,M-1のそれぞれについて、
c[i]←衝突判定モード
と更新する(ステップS502)。
Next, the CPU 101 determines whether or not d = 0 (step S501). If d = 0 (step S501; Yes), each of i = 0, 1,. ,
c [i] ← Update to collision determination mode (step S502).

すなわち、本実施形態では、d = 0のときに、モード復帰条件が満たされ、全オブジェクトを衝突判定モードに移行する。したがって、CPU 101は、RAM 103と共働して、モード更新部405として機能する。   That is, in the present embodiment, when d = 0, the mode return condition is satisfied, and all objects are shifted to the collision determination mode. Therefore, the CPU 101 functions as the mode update unit 405 in cooperation with the RAM 103.

そして、時刻がt + Tになるまで待機する(ステップS503)。この待機の間は、他の各種の計算処理をコルーチン的に実行することも可能である。このほか、ユーザによるコントローラ105の操作に基づいて外力ベクトルf[0],f[1],…,f[M-1]を計算、更新したりする等の処理を行うことも可能である。   And it waits until time becomes t + T (step S503). During the standby, various other calculation processes can be executed in a coroutine manner. In addition, it is possible to perform processing such as calculating and updating the external force vectors f [0], f [1],..., F [M−1] based on the operation of the controller 105 by the user.

時刻tから時刻t + Tまでの間には、リフレッシュ時間Tを垂直同期割り込み周期で割った回数だけ、垂直同期割り込みが発生する。   Between time t and time t + T, vertical synchronization interrupts are generated by the number of times the refresh time T is divided by the vertical synchronization interrupt cycle.

そして、時刻tは、垂直同期割り込みが生じて画像生成を行った時刻を意味するから、時刻がt + Tになるまで待機する、ということもまた、画像生成のタイミングの直近の垂直同期割り込みが生じるまで待機することに相当する。   The time t means the time when the vertical synchronization interrupt occurred and the image was generated, so waiting until the time reaches t + T also means that the vertical synchronization interrupt closest to the image generation timing is Equivalent to waiting until it occurs.

この待機が終了し、垂直同期割り込みが生じた後は、CPU 101は、t←t + Tを実行して、画像生成を行った最終時刻を更新する(ステップS504)。   After this standby is completed and a vertical synchronization interrupt occurs, the CPU 101 executes t ← t + T and updates the last time when the image was generated (step S504).

さらに、画像生成部406は、RAM 103に記憶されるオブジェクトの情報を参照して、仮想空間201に配置されるオブジェクトの様子を表示する画像をフレームメモリ内に生成する(ステップS505)。   Further, the image generation unit 406 refers to the object information stored in the RAM 103, and generates an image in the frame memory that displays the state of the object arranged in the virtual space 201 (step S505).

このような画像生成には、各種の3次元コンピュータグラフィックスの手法を適用することができる。典型的には、仮想空間の中に視点と視線を設定し、視線とオブジェクトを結ぶ線分が視線と直交する投射面と交差する位置を、当該オブジェクトが画像内に描画される位置とする透視投影を行うが、平行投影や曲線・曲面を用いた投影(たとえば魚眼レンズで見た様子を表示する場合等)などのグラフィックス技術を採用することもできる。   Various three-dimensional computer graphics techniques can be applied to such image generation. Typically, a viewpoint and a line of sight are set in a virtual space, and a perspective where the line segment connecting the line of sight and the object intersects with a projection plane orthogonal to the line of sight is the position at which the object is drawn in the image. Although the projection is performed, a graphics technique such as parallel projection or projection using a curved / curved surface (for example, displaying a state viewed with a fisheye lens) may be employed.

フレームメモリに記録された画像情報は、所定の同期タイミングでビデオ信号に変換され画像処理部107に接続されるモニタ(図示せず)へ出力される。このようにして、リフレッシュ時間おきに表示される画像を更新することにより、仮想空間201におけるオブジェクトの運動の様子をアニメーション表示するのである。   The image information recorded in the frame memory is converted into a video signal at a predetermined synchronization timing and output to a monitor (not shown) connected to the image processing unit 107. In this manner, the state of the movement of the object in the virtual space 201 is animated by updating the image displayed every refresh time.

したがって、CPU 101は、RAM 103や画像処理部107と共同して、画像生成部406として機能する。   Therefore, the CPU 101 functions as the image generation unit 406 in cooperation with the RAM 103 and the image processing unit 107.

さて、画像が生成された(ステップS505)後、もしくは、d≠0である場合(ステップS501;No)、CPU 101は、衝突判定にともなう処理を開始する。この際、CPU 101は、RAM 103内もしくはCPU 101のレジスタにより表現される変数iおよび変数jを用いる。   Now, after an image is generated (step S505), or when d ≠ 0 (step S501; No), the CPU 101 starts processing associated with collision determination. At this time, the CPU 101 uses a variable i and a variable j expressed in the RAM 103 or by a register of the CPU 101.

i = 0,1,…,M-1のそれぞれについて、以下の処理を繰り返す(ステップS506〜)。まず、c[i]=衝突判定モードであるか否かを判定し(ステップS507)、そうでなければ(ステップS507;No)、iについての次の繰り返しステップに移行する。   The following processing is repeated for each of i = 0, 1,..., M−1 (step S506˜). First, it is determined whether or not c [i] = collision determination mode (step S507). Otherwise (step S507; No), the process proceeds to the next iteration step for i.

一方、c[i]=衝突判定モードである場合(ステップS507;Yes)、j = i+1,i+2,…,M-1のそれぞれについて、以下の処理を繰り返す(ステップS508〜)。まず、c[j]=衝突判定モードであるか否かを判定し(ステップS509)、そうでなければ(ステップS509;No)、jについての次の繰り返しステップに移行する。   On the other hand, when c [i] = collision determination mode (step S507; Yes), the following processing is repeated for each of j = i + 1, i + 2,. First, it is determined whether or not c [j] = collision determination mode (step S509). Otherwise (step S509; No), the process proceeds to the next iteration step for j.

一方、c[j]=衝突判定モードである場合(ステップS509;Yes)、RAM 103内に記憶されているオブジェクトの情報
r[i],r[j],R[i],R[j]
から、i番目のオブジェクトとj番目のオブジェクトが衝突しているか否かを判定する(ステップS510)。判定の基準としては、上述の手法を採用することができる。したがって、CPU 101は、RAM 103と共同して、衝突判定部402として機能する。
On the other hand, if c [j] = collision determination mode (step S509; Yes), the object information stored in the RAM 103
r [i], r [j], R [i], R [j]
From this, it is determined whether or not the i-th object and the j-th object collide (step S510). As a criterion for determination, the above-described method can be employed. Therefore, the CPU 101 functions as the collision determination unit 402 in cooperation with the RAM 103.

上記のように、オブジェクトのモードは、衝突判定モードと通過モードとのいずれかであり、前者の場合は衝突判定の対象とするが、後者の場合は衝突判定の対象としない。このようなモードの分別によって、計算処理の低減化を図るのである。   As described above, the object mode is either the collision determination mode or the passing mode, and the former is a target for collision determination, but the latter is not a target for collision determination. By such mode separation, calculation processing is reduced.

衝突していない場合(ステップS510;No)、jについての次の繰り返しステップに移行する。   If there is no collision (step S510; No), the process proceeds to the next iteration step for j.

一方、i番目のオブジェクトとj番目のオブジェクトが衝突している場合(ステップS510;Yes)、上記の手法に基づいて、それぞれのオブジェクトの衝突後の速度ベクトルv'[i],v'[j]を計算する(ステップS511)。   On the other hand, when the i-th object and the j-th object collide (step S510; Yes), the velocity vectors v ′ [i] and v ′ [j after the collision of the respective objects are based on the above method. ] Is calculated (step S511).

上記のように、通過モードのオブジェクトは、衝突判定の対象とされない。したがって、通過モードのオブジェクトの割合が大きくなればなるほど、衝突判定および衝突に伴う処理に要する計算の総量は、少なくなる。   As described above, the object in the passing mode is not a target for collision determination. Therefore, the greater the proportion of objects in the passing mode, the smaller the total amount of computation required for collision determination and processing associated with the collision.

そして、
v[i]←v'[i];
v[j]←v'[j];
c[i]←通過モード;
c[j]←通過モード
を実行し、オブジェクトの速度を更新するとともに、モードを通過モードに変更する(ステップS512)。したがって、CPU 101は、RAM 103と共同して、衝突更新部403として機能する。
And
v [i] ← v '[i];
v [j] ← v '[j];
c [i] ← passing mode;
c [j] ← Pass mode is executed, the speed of the object is updated, and the mode is changed to the pass mode (step S512). Therefore, the CPU 101 functions as the collision update unit 403 in cooperation with the RAM 103.

このように、本実施形態では、モードを変更することによって、「あるオブジェクトについての衝突が短時間に(次の画像生成時までに)連続して生ずるのは極めて稀であるため、これを無視する。」との仮定をするモデル化を行うのである。   As described above, in this embodiment, by changing the mode, it is extremely rare that the collision with respect to a certain object occurs continuously in a short time (by the time of the next image generation). Modeling that assumes "Yes."

さらに、両オブジェクトの現在位置r[i],r[j]、速度ベクトルv[i],v[j]、外力ベクトルf[i],f[j]、質量w[i],w[j]の情報に基づいて、経過時間δを
δ = (D-d)T/D = (D-d)Δt
として当該経過時間δだけ経過した後の、両オブジェクトの位置r'[i],r'[j]および速度v'[i],v'[j]を計算し(ステップS513)、
r[i]←r'[i];
r[j]←r'[j];
v[i]←v'[i];
v[j]←v'[j]
を実行して、オブジェクトの位置および速度を、次に画像を生成するタイミング時点の値に更新する(ステップS514)。したがって、CPU 101は、RAM 103と共同して、移動更新部404として機能する。
Furthermore, the current positions r [i], r [j], velocity vectors v [i], v [j], external force vectors f [i], f [j], masses w [i], w [j] of both objects ], The elapsed time δ is changed to δ = (Dd) T / D = (Dd) Δt
As follows, the positions r ′ [i], r ′ [j] and the speeds v ′ [i], v ′ [j] of both objects after the elapsed time δ have passed are calculated (step S513).
r [i] ← r '[i];
r [j] ← r '[j];
v [i] ← v '[i];
v [j] ← v '[j]
Is executed to update the position and speed of the object to the values at the timing when the next image is generated (step S514). Therefore, the CPU 101 functions as the movement update unit 404 in cooperation with the RAM 103.

一般に、現在のオブジェクトの位置ベクトルr、速度ベクトルv、外力ベクトルf、オブジェクトの質量wのとき、これから経過時間δだけ経過した後の速度ベクトルv'および位置ベクトルr'は、以下のように(近似)計算することができる。
v' = v + (f/w)δ;
r' = r + ((v+v')/2)δ
ステップS513では、この(近似)計算を採用する。また、後述する位置更新の処理では、δの設定をΔtに変更して、この(近似)計算を採用する。
In general, when the current object position vector r, velocity vector v, external force vector f, and object mass w, the velocity vector v ′ and the position vector r ′ after elapse of the elapsed time δ are expressed as follows ( Approximate) can be calculated.
v '= v + (f / w) δ;
r '= r + ((v + v') / 2) δ
In step S513, this (approximate) calculation is employed. Further, in the position update process described later, the setting of δ is changed to Δt, and this (approximate) calculation is adopted.

衝突したオブジェクトの位置と速度を更新(ステップS514)したら、ステップS515に進む。   When the position and speed of the collided object are updated (step S514), the process proceeds to step S515.

さて、jについての繰り返し(〜ステップS515)と、iについての繰り返し(〜ステップS516)が終了したら、CPU 101は、位置の更新を行っていないオブジェクト、すなわち、衝突判定モードのままのオブジェクトについて、位置の更新を行う。すなわち、i = 0,1,…,M-1のそれぞれについて、以下の処理を繰り返す(ステップS517〜)。   When the repetition for j (~ step S515) and the repetition for i (~ step S516) are completed, the CPU 101 determines the object that has not been updated, that is, the object in the collision determination mode. Update the position. That is, the following processing is repeated for each of i = 0, 1,..., M−1 (step S517˜).

まず、c[i]=衝突判定モードであるか否かを判定し(ステップS518)、そうでなければ(ステップS518;No)、iについての次の繰り返しステップに移行する。   First, it is determined whether c [i] = collision determination mode (step S518). If not (step S518; No), the process proceeds to the next iteration step for i.

一方、c[i]=衝突判定モードである場合(ステップS518;Yes)、
δ = Δt
として、当該経過時間δだけ経過した後の、オブジェクトの位置r'[i]と速度v'[i]を計算し(ステップS519)、
r[i]←r'[i];
v[i]←v'[i]
を実行して、当該オブジェクトの位置および速度を、更新時間間隔後の時点の値に更新して(ステップS520)、iについての繰り返し処理を続ける(〜ステップS521)。したがって、CPU 101は、RAM 103と共同して、移動更新部404として機能する。
On the other hand, when c [i] = collision determination mode (step S518; Yes),
δ = Δt
The position r ′ [i] and the velocity v ′ [i] of the object after the elapsed time δ has elapsed are calculated (step S519).
r [i] ← r '[i];
v [i] ← v '[i]
Is executed to update the position and speed of the object to the values at the time after the update time interval (step S520), and the iterative process for i is continued (˜step S521). Therefore, the CPU 101 functions as the movement update unit 404 in cooperation with the RAM 103.

iについての繰り返し処理が終了したら、CPU 101は、
d←(d+1)%D
を実行して(ステップS522)、カウンタを更新する。ここで、a%bは、aをbで割った余りを意味する。そして、ステップS501に戻る。
When the repetition processing for i is completed, the CPU 101
d ← (d + 1)% D
Is executed (step S522), and the counter is updated. Here, a% b means a remainder obtained by dividing a by b. Then, the process returns to step S501.

このように、本実施形態によれば、衝突判定の対象となるオブジェクトの数を抑制することによって、オブジェクトの衝突と移動のシミュレーションをできるだけ少ない計算量で行うことができるようになる。   As described above, according to the present embodiment, it is possible to perform the simulation of collision and movement of objects with as little calculation as possible by suppressing the number of objects to be subjected to collision determination.

上記実施形態では、オブジェクトのモードが衝突判定モードから通過モードに移行した場合に、ステップS513、S514において経過時間δを
δ = (D-d)T/D = (D-d)Δt
として、当該経過時間δだけ経過した後、すなわち、次に画像を生成するタイミング(次にモード復帰条件が満たされるタイミング)での両オブジェクトの位置r'[i],r'[j]および速度v'[i],v'[j]を計算することとしていた。
In the above embodiment, when the object mode is changed from the collision determination mode to the passing mode, the elapsed time δ is set to δ = (Dd) T / D = (Dd) Δt in steps S513 and S514.
The positions r ′ [i], r ′ [j] and the speeds of both objects after the elapsed time δ has elapsed, that is, at the next image generation timing (the timing at which the mode return condition is satisfied). v '[i] and v' [j] were to be calculated.

すなわち、「衝突が生じてからモード復帰条件が満たされるまでの間」については、オブジェクトに加えられる外力は事実上変化しない、とのモデル化を行っていた。   That is, for the “between the occurrence of a collision and the time until the mode return condition is satisfied”, the modeling is such that the external force applied to the object does not change substantially.

一方、ステップS519、S520において、
δ = Δt
として、当該経過時間δだけ経過した後の、オブジェクトの位置r'[i]と速度v'[i]を計算するのは、衝突判定モードのオブジェクトのみであり、通過モードについては、「すでに計算済である」として、ステップS518において事前に判断を行い、計算をスキップしていた。
On the other hand, in steps S519 and S520,
δ = Δt
The object position r ′ [i] and the velocity v ′ [i] after the elapsed time δ have elapsed are calculated only for the object in the collision determination mode. In step S518, the determination is made in advance and the calculation is skipped.

しかしながら、オブジェクトの位置や速度の更新については、画像処理部107にベクトルプロセッサなど、オブジェクトごとの並列計算機能がある場合には、このような条件分岐を採用するのではなく、単純に位置や速度の計算・更新を行った方が良い場合もある。   However, for updating the position and speed of an object, if the image processing unit 107 has a parallel calculation function for each object such as a vector processor, such a conditional branch is not adopted, but the position and speed are simply adopted. There are cases where it is better to perform calculation / update.

このような場合には、ステップS513、S514における処理を省略するとともに、ステップS518における判断を省略し、ステップS517に続いてステップS519に進むようにフローを変更することとしても良い。   In such a case, the processing in steps S513 and S514 may be omitted, the determination in step S518 may be omitted, and the flow may be changed to proceed to step S519 following step S517.

また、このような実施形態では、各種のループは、ベクトル化計算によって並列に計算することが望ましい。   In such an embodiment, it is desirable that the various loops are calculated in parallel by vectorization calculation.

このモデル化では、「衝突が生じてからモード復帰条件が満たされるまでの間」についても、オブジェクトに加えられる外力が変化するとのモデル化を行うことになる。   In this modeling, the modeling that the external force applied to the object is changed is also performed “from the time when the collision occurs until the mode return condition is satisfied”.

したがって、このような態様を採用した場合には、衝突計算については上記実施形態と同様の適切な近似を行うことができるとともに、オブジェクトの移動については、上記実施形態よりもより精密な近似を行うことができる。   Therefore, when such an aspect is adopted, it is possible to perform an appropriate approximation similar to that in the above embodiment for the collision calculation, and perform a more accurate approximation than the above embodiment for the movement of the object. be able to.

このほか、単純にステップS513、S514における計算・更新の処理を省略するだけとする実施態様もありうる。これは、衝突そのものに要する時間を、(D-d)T/D = (D-d)Δtに近似する手法である。   In addition, there may be an embodiment in which the calculation / update process in steps S513 and S514 is simply omitted. This is a method of approximating the time required for the collision itself to (D−d) T / D = (D−d) Δt.

すなわち、「衝突が生じてからモード復帰条件が満たされるまでの間」については、オブジェクトは事実上移動しない、とのモデル化を行う。   That is, for the “between the occurrence of the collision and the time until the mode return condition is satisfied”, modeling is performed such that the object does not actually move.

このとき、時間δは、「オブジェクトが互いに接触し合ってから、弾性変形して相手方のオブジェクトと押し合い、反発力によって逆向きに動き始め、相手方のオブジェクトから離れるまでに要する時間」に相当する。   At this time, time δ corresponds to “the time required for the object to elastically deform and press against the other object, start moving in the opposite direction due to the repulsive force, and move away from the other object”.

この態様では、衝突後の位置と速度が、次の画像生成のタイミングまでそのまま維持されることとなる。アニメーションの映像の特殊効果の一つに、印象深いシーンを一定時間静止させて表示する「止め絵」という演出手法があるが、本実施形態は、衝突したオブジェクトについてこのような「止め絵」の効果を与えるものと考えることもできる。   In this aspect, the position and speed after the collision are maintained as they are until the next image generation timing. One of the special effects of animated images is a “stop-picture” presentation technique that displays an impressive scene while standing still for a certain period of time. It can also be thought of as giving.

また、ステップS513における計算において、経過時間δ=Δtとして計算を行う手法もありうる。すなわち、「衝突が生じてからモード復帰条件が満たされるまでの間」については、オブジェクトはシミュレーションの更新間隔時間分だけ移動し、それ以外の時間については「衝突中」とする手法である。これは、上記の態様2つの中庸をとるものである。   In addition, in the calculation in step S513, there may be a method of calculating with the elapsed time δ = Δt. In other words, for the “between the occurrence of a collision and the time until the mode return condition is satisfied”, the object is moved by the simulation update interval time, and “the time of collision” is set for other times. This takes the middle of the two aspects described above.

これらの態様では、簡易な計算を採用することによって、計算量を抑制しながら衝突のシミュレーションを適切に行うことができるようになる。   In these aspects, by adopting simple calculation, it is possible to appropriately perform a collision simulation while suppressing the amount of calculation.

本発明によれば、上記発明の効果に加え、移動計算の対象となるオブジェクトの数を抑制することによって、オブジェクトの衝突と移動のシミュレーションをできるだけ少ない計算量で行うことができるようになる。   According to the present invention, in addition to the effects of the above-described invention, by suppressing the number of objects to be subjected to movement calculation, it is possible to perform object collision and movement simulation with as little calculation amount as possible.

このほか、上記実施形態では、画像生成のタイミングでステップS502において全オブジェクトを衝突判定モードに移行することとしているが、オブジェクトごとに、通過モードから衝突判定モードに復帰するタイミングをずらすこととしても良い。   In addition, in the above-described embodiment, all the objects are shifted to the collision determination mode in step S502 at the image generation timing. However, the timing for returning from the passing mode to the collision determination mode may be shifted for each object. .

典型的には、全オブジェクトに共通の通過維持時間という定数を定める。そして、各オブジェクトについて、衝突判定モードから通過モードに移行した移行時刻も記録することする。   Typically, a constant of pass maintenance time common to all objects is determined. For each object, the transition time from the collision determination mode to the passage mode is also recorded.

ステップS502においては、通過モードであるオブジェクトのうち、移行時刻に通過維持時間を加算した時刻が、現在時刻より前であるもの、すなわち、衝突判定モードから通過モードに移行した時刻から、通過維持時間が経過したオブジェクトについて、そのモードを衝突判定モードに復帰させるような繰り返し、判定、更新の処理を行うのである。   In step S502, among the objects in the passing mode, the passing maintenance time from the time when the passing maintenance time is added to the transition time is before the current time, that is, from the time when the collision determination mode is shifted to the passing mode. For the object that has passed, the process of repeating, determining, and updating the mode to return to the collision determination mode is performed.

この形態におけるモデル化は、オブジェクトが一旦衝突すると、通過維持時間が経過するまでは、他のオブジェクトとの衝突は生じない、と仮定するものである。   Modeling in this form assumes that once an object collides, it will not collide with other objects until the passage maintenance time has elapsed.

このほか、リフレッシュ時間の間隔を画像生成のタイミング以外の適当な定数として、全オブジェクトについてまとめて、衝突判定モードへの復帰を行うこととしても良い。   In addition, the refresh time interval may be set to an appropriate constant other than the image generation timing, and all objects may be collected together to return to the collision determination mode.

これらの態様では、通過維持時間という衝突が連続して起きることが極めて珍しい時間を想定することによって、簡易かつ適切にオブジェクトの衝突と移動のシミュレーションを行うことができるようになる。   In these modes, it is possible to easily and appropriately simulate the collision and movement of an object by assuming a time that is extremely rare in which collisions such as a passage maintaining time occur continuously.

衝突するか否かを判定する対象となるオブジェクト同士の組み合わせについては、上述のように、以下のような2種類の態様がありうる。
(1)いずれか少なくとも一方が衝突判定モードであるオブジェクト同士については、他方が通過モードであるか衝突判定モードあるか否かにかかわらず、衝突判定を行う。
(2)両方とも衝突判定モードであるオブジェクト同士についてのみ、衝突判定を行う。
As described above, there can be the following two types of combinations of objects that are targets for determining whether or not to collide.
(1) For objects whose at least one is in the collision determination mode, collision determination is performed regardless of whether the other is in the passing mode or the collision determination mode.
(2) Collision determination is performed only for objects that are both in the collision determination mode.

上記実施形態では、上記(2)の態様を採用しているが、上記(1)の態様を採用したい場合には、ステップS507の処理を省略し、ステップS509において、c[i]とc[j]の少なくとも一方が衝突判定モードである場合に、ステップS510に進むように、制御の流れを変更すれば良い。   In the above embodiment, the above aspect (2) is adopted. However, when it is desired to adopt the above aspect (1), the process of step S507 is omitted, and in step S509, c [i] and c [ If at least one of j] is in the collision determination mode, the control flow may be changed so as to proceed to step S510.

本実施形態では、衝突判定の対象となるオブジェクトの個数の抑制の度合は、上記実施形態にくらべて弱いものの、より正確なシミュレーションが可能となる。したがって、計算能力がある程度高いものの、全オブジェクトについての衝突判定は避けたいような用途に好適である。   In the present embodiment, the degree of suppression of the number of objects to be subjected to collision determination is weaker than that in the above embodiment, but a more accurate simulation is possible. Therefore, it is suitable for an application where it is desired to avoid collision determination for all objects, although the calculation ability is high to some extent.

上記実施形態では、オブジェクトが衝突する場合に、ステップS512において、衝突するオブジェクトのモードを一律に通過モードに更新していたが、本実施形態では、他の手法を採用する。   In the above embodiment, when the objects collide, the mode of the colliding object is uniformly updated to the passing mode in step S512. However, in this embodiment, another method is adopted.

すなわち、オブジェクトiとオブジェクトjのそれぞれについて、当該オブジェクトが所定のモード維持条件を満たしているか否かを判定し、満たしている場合には、当該オブジェクトのモードは、衝突判定モードのままとするものである。   That is, for each of the object i and the object j, it is determined whether or not the object satisfies a predetermined mode maintenance condition. If the object is satisfied, the mode of the object remains in the collision determination mode. It is.

モード維持条件としては、以下のような条件が考えられる。
(a)衝突後の速度の大きさが、所定の閾値よりも大きい。激しく運動するオブジェクトについては、衝突判定の対象とした方が良い用途がありうるからである。
(b)衝突前と衝突後の速度の変化が、所定の閾値よりも大きい。運動の様子が激変したオブジェクトについては、衝突判定の対象とした方が良い用途がありうるからである。
(c)常に衝突判定モードを維持するオブジェクトを想定する。たとえば、ゲームに本発明を適用する場合、プレイヤーが操作するキャラクターや敵キャラクターのうちの強いもの(「ボスキャラ」と呼ばれる。)については、常に衝突判定モードとし、通過モードには移行しないこととする態様である。一般に、オブジェクトが多数存在するのは、敵キャラクターのうちの弱いもの(「雑魚キャラ」と呼ばれる。)であるので、本態様でも十分な計算量抑制の効果が得られることも多い。
(d)上記条件(a)(b)(c)の適当な組み合わせ。
The following conditions can be considered as mode maintenance conditions.
(A) The speed after the collision is larger than a predetermined threshold. This is because an object that moves intensely may have a better use as a target of collision determination.
(B) The change in speed before and after the collision is greater than a predetermined threshold. This is because an object whose movement state has changed drastically may have a better use as a collision determination target.
(C) Assume an object that always maintains the collision determination mode. For example, when the present invention is applied to a game, a strong character (called a “boss character”) that is operated by a player or an enemy character is always set to a collision determination mode and is not shifted to a passing mode. It is an aspect. In general, since a large number of objects are weak enemy characters (called “small fish characters”), this embodiment often provides a sufficient amount of calculation suppression effect.
(D) An appropriate combination of the above conditions (a), (b) and (c).

本実施形態では、オブジェクトの個数の抑制の度合は、上記実施形態にくらべて弱いものの、より正確なシミュレーションが可能となる。したがって、計算能力がある程度高いものの、全オブジェクトについての衝突判定は避けたいような用途に好適である。   In the present embodiment, the degree of suppression of the number of objects is weaker than that in the above embodiment, but more accurate simulation is possible. Therefore, it is suitable for an application where it is desired to avoid collision determination for all objects, although the calculation ability is high to some extent.

以上説明したように、本発明によれば、仮想空間に配置されるオブジェクトの移動や衝突を簡易な計算でシミュレートするのに好適なシミュレーション装置、シミュレーション方法、ならびに、これらをコンピュータにて実現するプログラムを提供することができる。   As described above, according to the present invention, a simulation apparatus and a simulation method suitable for simulating movement and collision of an object arranged in a virtual space by simple calculation, and these are realized by a computer. A program can be provided.

プログラムを実行することにより、本発明のシミュレーション装置の機能を果たす典型的な情報処理装置の概要構成を示す模式図である。It is a schematic diagram which shows the outline | summary structure of the typical information processing apparatus which performs the function of the simulation apparatus of this invention by running a program. 衝突するオブジェクト同士の位置関係を示す説明図である。It is explanatory drawing which shows the positional relationship of the objects which collide. 各ベクトルの位置関係をさらに詳細に示す説明図である。It is explanatory drawing which shows the positional relationship of each vector in detail. 本実施形態に係るシミュレーション装置の概要構成を示す模式図である。It is a schematic diagram which shows schematic structure of the simulation apparatus which concerns on this embodiment. 本シミュレーション装置にて実行されるシミュレーション処理の制御の流れを示すフローチャートである。It is a flowchart which shows the flow of control of the simulation process performed with this simulation apparatus.

符号の説明Explanation of symbols

100 情報処理装置
101 CPU
102 ROM
103 RAM
104 インターフェイス
105 コントローラ
106 外部メモリ
107 画像処理部
108 DVD−ROMドライブ
109 NIC
110 音声処理部
111 マイク
201 仮想空間
203 原点
211 オブジェクトi
213 オブジェクトiの位置ベクトル
215 オブジェクトiの速度ベクトル
231 オブジェクトj
233 オブジェクトjの位置ベクトル
235 オブジェクトjの速度ベクトル
251 相対速度ベクトル
252 相対位置ベクトル
253 相対速度ベクトルと相対位置ベクトルのなす角
254 相対位置ベクトルの方向ベクトル
261 衝突平面
262 内分点
301 方向ベクトル
302 方向ベクトル
400 シミュレーション装置
401 記憶部
402 衝突判定部
403 衝突更新部
404 移動更新部
405 モード更新部
406 画像生成部
100 Information processing apparatus 101 CPU
102 ROM
103 RAM
104 Interface 105 Controller 106 External Memory 107 Image Processing Unit 108 DVD-ROM Drive 109 NIC
DESCRIPTION OF SYMBOLS 110 Sound processing part 111 Microphone 201 Virtual space 203 Origin 211 Object i
213 Position vector of object i 215 Speed vector of object i 231 Object j
233 Position vector of object j 235 Speed vector of object j 251 Relative velocity vector 252 Relative position vector 253 Angle formed by relative velocity vector and relative position vector 254 Direction vector of relative position vector 261 Colliding plane 262 Internal dividing point 301 Direction vector 302 Direction Vector 400 Simulation device 401 Storage unit 402 Collision determination unit 403 Collision update unit 404 Movement update unit 405 Mode update unit 406 Image generation unit

Claims (10)

仮想空間に配置される3個以上のオブジェクトの位置および速度をシミュレートするシミュレーション装置であって、
当該3個以上のオブジェクトのそれぞれについて、当該オブジェクトの位置および速度と、当該オブジェクトが衝突判定モードと通過モードとのいずれであるかを示す情報と、を記憶する記憶部、
当該3個以上のオブジェクトのうち、少なくとも一方が衝突判定モードである2個のオブジェクト同士が衝突するか否かを、前記記憶された位置および速度により判定する衝突判定部、
前記衝突すると判定された2個のオブジェクト同士のそれぞれの衝突後の速度を計算して、前記記憶部に記憶される当該オブジェクトの速度を当該衝突後の速度に更新し、当該オブジェクトのモードを通過モードに更新する衝突更新部、
当該3個以上のオブジェクトのそれぞれについて、前記記憶された位置および速度により所定の更新間隔時間後の位置および速度を計算して、前記記憶部に記憶される当該オブジェクトの位置および速度を、当該更新間隔時間後の位置および速度に更新する移動更新部、
当該3個以上のオブジェクトのうち、通過モードのオブジェクトのそれぞれについて、所定のモード復帰条件が満たされている場合、前記記憶部に記憶される当該オブジェクトのモードを衝突判定モードに更新するモード更新部
を備え、
前記モード更新部は、当該3個以上のオブジェクトのうち、通過モードのオブジェクトのすべてについて、所定のリフレッシュ時間おきに一斉に当該モード復帰条件が満たされるものとして、当該すべての通過モードのオブジェクトのモードを衝突判定モードに更新する
ことを特徴とするシミュレーション装置。
A simulation apparatus for simulating the position and speed of three or more objects arranged in a virtual space,
For each of the three or more objects, a storage unit that stores the position and speed of the object, and information indicating whether the object is in the collision determination mode or the passage mode;
A collision determination unit that determines whether or not two objects in which at least one of the three or more objects is in the collision determination mode collide with each other based on the stored position and speed;
Calculate the speed after each collision between the two objects determined to collide, update the speed of the object stored in the storage unit to the speed after the collision, and pass the mode of the object Collision update unit to update to mode,
For each of the three or more objects, the position and speed after a predetermined update interval time are calculated from the stored position and speed, and the position and speed of the object stored in the storage unit are updated. A moving update unit that updates to the position and speed after the interval time,
A mode update unit that updates the mode of the object stored in the storage unit to the collision determination mode when a predetermined mode return condition is satisfied for each of the objects in the passing mode among the three or more objects. With
The mode update unit assumes that the mode return condition is satisfied all at once at a predetermined refresh time for all the objects in the passing mode among the three or more objects, and the mode of all the objects in the passing mode is A simulation apparatus characterized in that the system is updated to a collision determination mode.
請求項1に記載のシミュレーション装置であって、
前記衝突更新部は、前記衝突すると判定された2個のオブジェクト同士のそれぞれについて、当該オブジェクトの衝突後の速度の大きさが所定の閾値を超える場合、当該オブジェクトのモードを通過モードに更新するのにかえて、当該オブジェクトのモードを衝突判定モードに維持する
ことを特徴とするシミュレーション装置。
The simulation apparatus according to claim 1,
For each of the two objects determined to collide, the collision update unit updates the mode of the object to the passing mode when the magnitude of the velocity after the collision of the object exceeds a predetermined threshold. Instead, a simulation apparatus that maintains the mode of the object in a collision determination mode .
請求項1に記載のシミュレーション装置であって、
前記衝突更新部は、前記衝突すると判定された2個のオブジェクト同士のそれぞれについて、当該オブジェクトの衝突前と衝突後の速度の変化の大きさが、所定の閾値を超える場合、当該オブジェクトのモードを通過モードに更新するのにかえて、当該オブジェクトのモードを衝突判定モードに維持する
ことを特徴とするシミュレーション装置。
The simulation apparatus according to claim 1,
For each of the two objects determined to collide, the collision update unit determines the mode of the object when the magnitude of the speed change before and after the collision of the object exceeds a predetermined threshold. A simulation apparatus characterized by maintaining the mode of the object in the collision determination mode instead of updating to the passing mode .
請求項1から3のいずれか1項に記載のシミュレーション装置であって、
前記移動更新部は、当該3個以上のオブジェクトのうち、
(a)モードが、衝突判定モードのオブジェクトのそれぞれについて、前記記憶部に記憶される当該オブジェクトの位置および速度を、当該更新間隔時間後の位置および速度に更新し、
(b)モードが、通過モードであるオブジェクトのそれぞれについて、前記記憶部に記憶される位置と速度を維持する
ことを特徴とするシミュレーション装置。
The simulation apparatus according to any one of claims 1 to 3,
The moving update unit includes the three or more objects.
(A) For each object in which the mode is the collision determination mode, the position and speed of the object stored in the storage unit are updated to the position and speed after the update interval time,
(B) A simulation apparatus characterized by maintaining the position and speed stored in the storage unit for each object whose mode is the passing mode .
請求項1から3のいずれか1項に記載のシミュレーション装置であって、
前記移動更新部は、当該3個以上のオブジェクトのうち、
(a)モードが、衝突判定モードのオブジェクトのそれぞれについて、前記記憶部に記憶される当該オブジェクトの位置および速度を、当該更新間隔時間後の位置および速度に更新し、
(b)モードが、前回は衝突判定モードであり、今回は通過モードであるオブジェクトのそれぞれについて、次にモード復帰条件が満たされるまでの経過時間後の位置および速度を計算して、前記記憶部に記憶される当該オブジェクトの位置および速度を、当該経過時間後の位置および速度に更新し、
(c)モードが、前回も今回も通過モードであるオブジェクトのそれぞれについて、前記記憶部に記憶される位置と速度を維持する
ことを特徴とするシミュレーション装置。
The simulation apparatus according to any one of claims 1 to 3,
The moving update unit includes the three or more objects.
(A) For each object in which the mode is the collision determination mode, the position and speed of the object stored in the storage unit are updated to the position and speed after the update interval time,
(B) calculating the position and speed after the elapsed time until the mode return condition is satisfied next for each object whose mode is the collision determination mode last time and this time is the passing mode; Update the position and speed of the object stored in to the position and speed after the elapsed time,
(C) A simulation apparatus characterized in that the position and speed stored in the storage unit are maintained for each object whose mode is the passing mode both in the previous time and this time .
請求項4または5に記載のシミュレーション装置であって、
前記モード更新部は、「当該3個以上のオブジェクトのうち、通過モードのオブジェクトのすべてについて、所定のリフレッシュ時間おきに一斉に当該モード復帰条件が満たされるものとして、当該すべての通過モードのオブジェクトのモードを衝突判定モードに更新」するのにかえて、「当該3個以上のオブジェクトのうち、通過モードのオブジェクトのそれぞれについて、当該オブジェクトのモードが、衝突判定モードから通過モードに移行してからの経過時間が、所定の通過維持時間に至ると、当該モード復帰条件が満たされるものとして、当該経過時間が所定の通過維持時間に至ったオブジェクトのモードを衝突判定モードに更新」する
ことを特徴とするシミュレーション装置。
The simulation apparatus according to claim 4 or 5, wherein
The mode update unit states that “the mode return condition is satisfied all at once for a predetermined refresh time for all the objects in the pass mode among the three or more objects. Instead of updating the mode to the collision determination mode, “for each of the objects in the passing mode among the three or more objects, the mode of the object has changed from the collision determination mode to the passing mode. When the elapsed time reaches a predetermined passage maintenance time, the mode return condition is satisfied, and the mode of the object whose elapsed time has reached the predetermined passage maintenance time is updated to the collision determination mode ”. Simulation device.
請求項1から5のいずれか1項に記載のシミュレーション装置であって、
当該リフレッシュ時間は当該更新間隔時間の整数倍であり、
当該リフレッシュ時間おきに、当該仮想空間に配置される3個以上のオブジェクトの画像を、前記記憶された3個以上のオブジェクトの位置により生成する画像生成部
をさらに備えることを特徴とするシミュレーション装置。
The simulation apparatus according to any one of claims 1 to 5,
The refresh time is an integer multiple of the update interval time,
A simulation apparatus, further comprising: an image generation unit that generates images of three or more objects arranged in the virtual space at the refresh time according to the positions of the three or more stored objects .
請求項1から7のいずれか1項に記載のシミュレーション装置であって、
前記衝突判定部は、当該3個以上のオブジェクトのうち、少なくとも一方が衝突判定モードである2個のオブジェクト同士が衝突するか否かを判定するのにかえて、両方が衝突判定モードである2個のオブジェクト同士が衝突するか否かを判定する
ことを特徴とするシミュレーション装置。
The simulation apparatus according to any one of claims 1 to 7,
The collision determination unit determines whether or not two objects in which at least one of the three or more objects is in the collision determination mode collide with each other, and both are in the collision determination mode 2 A simulation apparatus characterized by determining whether or not individual objects collide with each other .
仮想空間に配置される3個以上のオブジェクトの位置および速度をシミュレートするシミュレーション方法であって、当該3個以上のオブジェクトのそれぞれについて、当該オブジェクトの位置および速度と、当該オブジェクトが衝突判定モードと通過モードとのいずれであるかを示す情報と、を記憶する記憶部、衝突判定部、衝突更新部、移動更新部、モード更新部を備えるシミュレーション装置にて実行され、
前記衝突判定部が、当該3個以上のオブジェクトのうち、少なくとも一方が衝突判定モードである2個のオブジェクト同士が衝突するか否かを、前記記憶された位置および速度により判定する衝突判定工程、
前記衝突更新部が、前記衝突すると判定された2個のオブジェクト同士のそれぞれの衝突後の速度を計算して、前記記憶部に記憶される当該オブジェクトの速度を当該衝突後の速度に更新し、当該オブジェクトのモードを通過モードに更新する衝突更新工程、
前記移動更新部が、当該3個以上のオブジェクトのそれぞれについて、前記記憶された位置および速度により所定の更新間隔時間後の位置および速度を計算して、前記記憶部に記憶される当該オブジェクトの位置および速度を、当該更新間隔時間後の位置および速度に更新する移動更新工程、
前記モード更新部が、当該3個以上のオブジェクトのうち、通過モードのオブジェクトのそれぞれについて、所定のモード復帰条件が満たされている場合、前記記憶部に記憶される当該オブジェクトのモードを衝突判定モードに更新するモード更新工程
を備え、
前記モード更新工程では、当該3個以上のオブジェクトのうち、通過モードのオブジェクトのすべてについて、所定のリフレッシュ時間おきに一斉に当該モード復帰条件が満たされるものとして、当該すべての通過モードのオブジェクトのモードを衝突判定モードに更新する
ことを特徴とするシミュレーション方法。
A simulation method for simulating positions and velocities of three or more objects arranged in a virtual space, wherein for each of the three or more objects, the positions and velocities of the objects, the object is in a collision determination mode, and Information indicating whether it is a passing mode, and a storage unit for storing, a collision determination unit, a collision update unit, a movement update unit, is executed in a simulation device including a mode update unit,
A collision determination step in which the collision determination unit determines whether or not two objects in which at least one of the three or more objects is in a collision determination mode collide with each other based on the stored position and speed;
The collision update unit calculates the post-collision speed of each of the two objects determined to collide, and updates the speed of the object stored in the storage unit to the post-collision speed, A collision update process for updating the mode of the object to a passing mode;
The movement update unit calculates the position and speed after a predetermined update interval time based on the stored position and speed for each of the three or more objects, and the position of the object stored in the storage unit And a moving update process for updating the speed to the position and speed after the update interval time,
When the mode update unit satisfies a predetermined mode return condition for each of the objects in the passing mode among the three or more objects, the mode update unit sets the mode of the object stored in the storage unit to the collision determination mode. With a mode update process to update
In the mode update step, among all the three or more objects, it is assumed that the mode return condition is satisfied all at once every predetermined refresh time for all the objects in the pass mode, and the modes of all the objects in the pass mode A simulation method characterized by updating to a collision determination mode.
仮想空間に配置される3個以上のオブジェクトの位置と速度をシミュレートさせるため、コンピュータを、
当該3個以上のオブジェクトのそれぞれについて、当該オブジェクトの位置および速度と、当該オブジェクトが衝突判定モードと通過モードとのいずれであるかを示す情報と、を記憶する記憶部、
当該3個以上のオブジェクトのうち、少なくとも一方が衝突判定モードである2個のオブジェクト同士が衝突するか否かを、前記記憶された位置および速度により判定する衝突判定部、
前記衝突すると判定された2個のオブジェクト同士のそれぞれの衝突後の速度を計算して、前記記憶部に記憶される当該オブジェクトの速度を当該衝突後の速度に更新し、当該オブジェクトのモードを通過モードに更新する衝突更新部、
当該3個以上のオブジェクトのそれぞれについて、前記記憶された位置および速度により所定の更新間隔時間後の位置および速度を計算して、前記記憶部に記憶される当該オブジェクトの位置および速度を、当該更新間隔時間後の位置および速度に更新する移動更新部、
当該3個以上のオブジェクトのうち、通過モードのオブジェクトのそれぞれについて、所定のモード復帰条件が満たされている場合、前記記憶部に記憶される当該オブジェクトのモードを衝突判定モードに更新するモード更新部
として機能させ、
前記モード更新部は、当該3個以上のオブジェクトのうち、通過モードのオブジェクトのすべてについて、所定のリフレッシュ時間おきに一斉に当該モード復帰条件が満たされるものとして、当該すべての通過モードのオブジェクトのモードを衝突判定モードに更新する
ように機能させることを特徴とするプログラム。
To simulate the position and speed of three or more objects placed in the virtual space,
For each of the three or more objects, a storage unit that stores the position and speed of the object, and information indicating whether the object is in the collision determination mode or the passage mode;
A collision determination unit that determines whether or not two objects in which at least one of the three or more objects is in the collision determination mode collide with each other based on the stored position and speed;
Calculate the speed after each collision between the two objects determined to collide, update the speed of the object stored in the storage unit to the speed after the collision, and pass the mode of the object Collision update unit to update to mode,
For each of the three or more objects, the position and speed after a predetermined update interval time are calculated from the stored position and speed, and the position and speed of the object stored in the storage unit are updated. A moving update unit that updates to the position and speed after the interval time,
A mode update unit that updates the mode of the object stored in the storage unit to the collision determination mode when a predetermined mode return condition is satisfied for each of the objects in the passing mode among the three or more objects. Function as
The mode update unit assumes that the mode return condition is satisfied all at once at a predetermined refresh time for all the objects in the passing mode among the three or more objects, and the mode of all the objects in the passing mode is A program characterized in that it functions to update to the collision judgment mode.
JP2006214379A 2006-08-07 2006-08-07 Simulation apparatus, simulation method, and program Active JP4425890B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006214379A JP4425890B2 (en) 2006-08-07 2006-08-07 Simulation apparatus, simulation method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006214379A JP4425890B2 (en) 2006-08-07 2006-08-07 Simulation apparatus, simulation method, and program

Publications (2)

Publication Number Publication Date
JP2008040800A JP2008040800A (en) 2008-02-21
JP4425890B2 true JP4425890B2 (en) 2010-03-03

Family

ID=39175726

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006214379A Active JP4425890B2 (en) 2006-08-07 2006-08-07 Simulation apparatus, simulation method, and program

Country Status (1)

Country Link
JP (1) JP4425890B2 (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8904430B2 (en) * 2008-04-24 2014-12-02 Sony Computer Entertainment America, LLC Method and apparatus for real-time viewer interaction with a media presentation
US8721444B2 (en) * 2009-07-21 2014-05-13 Sony Corporation Game device for performing operation object control and non-operation object control
JP4882012B2 (en) * 2010-03-05 2012-02-22 株式会社コナミデジタルエンタテインメント Image processing apparatus, image processing apparatus control method, and program
KR101068673B1 (en) 2010-08-11 2011-09-28 한국과학기술원 Method and apparatatus for simulating collision splash
JP5498437B2 (en) 2011-05-25 2014-05-21 株式会社ソニー・コンピュータエンタテインメント Information processing device, information processing method, information processing program, computer-readable recording medium storing information processing program, thickness region setting device, thickness region setting method, thickness region setting program, computer readable storing thickness region setting program Data structure related to various recording media and surfaces in virtual space
JP5372116B2 (en) * 2011-11-18 2013-12-18 株式会社スクウェア・エニックス Character movement control device and program
JP5466786B1 (en) 2013-08-28 2014-04-09 株式会社 ディー・エヌ・エー Image processing apparatus and image processing program
JP6173226B2 (en) * 2014-01-24 2017-08-02 株式会社 ディー・エヌ・エー Image processing apparatus and image processing program

Also Published As

Publication number Publication date
JP2008040800A (en) 2008-02-21

Similar Documents

Publication Publication Date Title
JP4425890B2 (en) Simulation apparatus, simulation method, and program
US9990754B1 (en) System for rendering using position based finite element simulation
US10022628B1 (en) System for feature-based motion adaptation
CN107067451B (en) Method and device for realizing dynamic skeleton in animation
US8452721B2 (en) Region of interest tracking for fluid simulation
JP3863165B2 (en) Audio output device, audio output method, and program
JP2007164291A (en) Sound effect generator, sound effect generation method, and computer program
KR100898671B1 (en) Image processor, image processing method, and computer-readable information recording medium having a program recorded thereon
JP3926307B2 (en) Three-dimensional image drawing apparatus and method, program, and recording medium
JP4037889B2 (en) Image generating apparatus, image generating method, and program
WO2022127241A1 (en) Virtual-sphere deformation control method, apparatus, program, and readable medium
KR100950835B1 (en) Image creating device, image creating method, and computer-readable information recording medium having a program recorded thereon
JP4584203B2 (en) Voice simulation apparatus, voice simulation method, and program
JP2002222435A (en) Image generation system, program, and information storage medium
JP2004220273A (en) Simulation device, simulation method and program
Song et al. A brief technical note on haptic jellyfish with Falcon and OpenGL
JP4210293B2 (en) Simulation apparatus, simulation method, and program
JP4113179B2 (en) Simulation apparatus, simulation method, and program
JP4068093B2 (en) Simulation apparatus, simulation method, and program
JP2019149153A (en) Simulation of multiple connected bodies for real-time application
JP5155262B2 (en) Image generating apparatus, image generating method, and program
Hou et al. A prediction method using interpolation for smooth six-DOF haptic rendering in multirate simulation
Filipczuk et al. Real-time simulation of a sailboat
Kouřil Underwater excavation serious game
Hou et al. Stable dynamic algorithm based on virtual coupling for 6-dof haptic rendering

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090302

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090310

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090508

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20090602

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090901

A911 Transfer to examiner for re-examination before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20090914

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20091208

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20091209

R150 Certificate of patent or registration of utility model

Ref document number: 4425890

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121218

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20131218

Year of fee payment: 4

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250