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

Simulation apparatus, simulation method, and program Download PDF

Info

Publication number
JP4068093B2
JP4068093B2 JP2004339348A JP2004339348A JP4068093B2 JP 4068093 B2 JP4068093 B2 JP 4068093B2 JP 2004339348 A JP2004339348 A JP 2004339348A JP 2004339348 A JP2004339348 A JP 2004339348A JP 4068093 B2 JP4068093 B2 JP 4068093B2
Authority
JP
Japan
Prior art keywords
correction
end points
stored
update
storage unit
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.)
Expired - Fee Related
Application number
JP2004339348A
Other languages
Japanese (ja)
Other versions
JP2006146806A (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 JP2004339348A priority Critical patent/JP4068093B2/en
Publication of JP2006146806A publication Critical patent/JP2006146806A/en
Application granted granted Critical
Publication of JP4068093B2 publication Critical patent/JP4068093B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、布状体と当該布状体が交差しない障害物との仮想3次元空間における移動を模擬実験して、たとえばスカートが人の足にまとわりつくような状況を近似的に再現するのに好適な、シミュレーション装置、シミュレート方法、ならびに、これらをコンピュータにて実現するプログラムに関する。   The present invention simulates the movement of a cloth-like body and an obstacle that does not intersect the cloth-like body in a virtual three-dimensional space, and approximately reproduces a situation where, for example, a skirt clings to a human foot. The present invention relates to a suitable simulation apparatus, a simulation method, and a program for realizing these on a computer.

従来から、3次元グラフィックスの分野では、布などの動的に形状が変化するオブジェクトをシミュレート(simulate;模擬、模倣)するための技術が提案されている。このような技術はクロスアニメーション(cloth animation)と呼ばれることもあり、現実の物理現象のシミュレーション(simulation;模擬実験)に相当するものである。たとえば以下の文献に、その技術が開示されている。
こてつ、3D動きのアルゴリズム、PART2 人体と衣服のモデルの動作原理、Cマガジン2000年9月号、第20頁〜第23頁、ソフトバンクパブリッシング発行、2000年9月1日発行
Conventionally, in the field of 3D graphics, a technique for simulating an object whose shape changes dynamically, such as cloth, has been proposed. Such a technique is sometimes called cloth animation, and corresponds to a simulation of an actual physical phenomenon. For example, the technique is disclosed in the following documents.
Trowel, 3D motion algorithm, PART2 Human body and clothing model operating principle, C magazine September 2000 issue, pages 20-23, Softbank publishing, September 1, 2000 issue

このような技術では、1枚の布を、当該布の表面状に配置されると想定される複数の質点と、質点同士を結ぶバネとでモデル化し、微分方程式や差分方程式を数値計算により解く技術を適用して、質点同士の距離からバネに生ずる張力を計算し、当該張力により各質点の微小時間における移動を求め、当該質点を移動させることによって、布の変形をシミュレートしていた。   In such a technique, a single cloth is modeled with a plurality of mass points assumed to be arranged on the surface of the cloth and a spring connecting the mass points, and a differential equation or a difference equation is solved by numerical calculation. By applying the technique, the tension generated in the spring is calculated from the distance between the mass points, the movement of each mass point in a minute time is obtained by the tension, and the deformation of the cloth is simulated by moving the mass point.

そして、[非特許文献1]には、質点のうち限られたものについて位置の拘束条件が課せられた場合(四角形の布の上端の2つの隅が固定されている場合)についてのシミュレーションの結果が開示されている。   In [Non-Patent Document 1], the result of the simulation when the position constraint is imposed on a limited number of mass points (when the two corners of the upper end of the rectangular cloth are fixed) Is disclosed.

しかしながら、リアルな3次元グラフィックスを実現するためには、スカートの布が人間の足にまとわりついたりする場合など、布状体と、当該布状態が交差しない障害物との移動をシミュレートする手法が強く求められている。   However, in order to realize realistic three-dimensional graphics, a method of simulating the movement of a cloth-like body and an obstacle that does not intersect the cloth state, such as when a skirt cloth clings to a human foot. Is strongly demanded.

一方で、上記のモデル化によれば、質点およびバネのいずれも、障害物にその一部や全部が包含されてはならない、という拘束条件が課せられることとなるが、このようなシミュレーションの結果を提示する分野によっては、近似的手法によって、高速なシミュレーションを可能にしたい、との要望も強い。   On the other hand, according to the above modeling, a constraint condition that all or both of the mass point and the spring must not be included in the obstacle is imposed. Depending on the field that presents, there is a strong demand to enable high-speed simulation by an approximate method.

本発明は、上記のような課題を解決するためになされたもので、布状体と当該布状体が交差しない障害物との仮想3次元空間における移動をシミュレーションして、たとえばスカートが人の足にまとわりつくような状況を近似的に再現するのに好適な、シミュレーション装置、シミュレート方法、ならびに、これらをコンピュータにて実現するプログラムを提供することを目的とする。   The present invention has been made to solve the above-described problems, and simulates the movement of a cloth-like body and an obstacle that does not intersect the cloth-like body in a virtual three-dimensional space. It is an object of the present invention to provide a simulation apparatus, a simulation method, and a program for realizing these on a computer, which are suitable for approximately reproducing a situation clinging to a foot.

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

本発明の第1の観点に係るシミュレーション装置は、伸縮する複数の線分状オブジェクトと、当該複数の線分状オブジェクトのいずれとも交差すべきでない複数の障害物オブジェクトと、が仮想3次元空間内で移動する様子をシミュレーションし、記憶部、計算部、更新部、補正部、出力部を備え、以下のように構成する。   In the simulation device according to the first aspect of the present invention, a plurality of line-segment objects that expand and contract and a plurality of obstacle objects that should not intersect any of the plurality of line-segment objects are in a virtual three-dimensional space. The moving state is simulated, and a storage unit, a calculation unit, an update unit, a correction unit, and an output unit are provided and configured as follows.

すなわち、記憶部は、当該複数の線分状オブジェクトの端点の位置および速度情報と、当該複数の障害物オブジェクトの形状、位置、速度および姿勢情報と、を記憶し、当該複数の端点のそれぞれに、当該複数の障害物オブジェクトのいずれかを補正用オブジェクトとして対応付けて記憶する。   That is, the storage unit stores the position and speed information of the end points of the plurality of line-segment objects and the shape, position, speed, and posture information of the plurality of obstacle objects, and stores each of the end points. Any one of the plurality of obstacle objects is stored in association with the correction object.

ここで、線分状オブジェクトは、バネをモデル化したものであり、線分状オブジェクトの端点は、質点をモデル化したものである。したがって、線分状オブジェクトとその端点によって、布状の物体をモデル化することなる。一方、障害物オブジェクトは、当該仮想3次元空間内で、当該布状の物体と衝突しうるものをモデル化したものである。たとえば、布状の物体が、スカートの布である場合、障害物オブジェクトは、人間の足に相当することになる。   Here, the line segment object is a model of a spring, and the end point of the line segment object is a model of a mass point. Therefore, a cloth-like object is modeled by the line-like object and its end points. On the other hand, the obstacle object is a model of an object that can collide with the cloth-like object in the virtual three-dimensional space. For example, when the cloth-like object is a skirt cloth, the obstacle object corresponds to a human foot.

なお、障害物オブジェクトとしては、変形しないもののほか、変形するものを考えることができる。たとえば、人間の足をモデル化する場合には、片足をもも部、すね部、足首からつま先部の3つの変形しない内部オブジェクトに分割し、その間を関節により接続して自由度を制限し、外力や筋肉モデルによる内力が伝達されるようにする。   In addition, as an obstacle object, the thing which deform | transforms can be considered besides the thing which does not deform | transform. For example, when modeling a human foot, divide one foot into three non-deformable internal objects, the thigh, shin, and ankle to toe, and connect them with joints to limit the degree of freedom, The external force and the internal force by the muscle model are transmitted.

一方、計算部は、記憶部に記憶された当該複数の端点のそれぞれの位置および速度情報から、当該端点同士を結ぶ線分状オブジェクトの張力を計算し、当該計算された張力によって当該端点が所定の微小時間の後に移動すべき位置を計算し、記憶部に記憶された当該複数の障害物オブジェクトのそれぞれの形状、位置、速度および姿勢情報から、当該障害物オブジェクトが当該所定の微小時間の後にとるべき形状、位置および姿勢を所定の規則に基づいて計算する。   On the other hand, the calculation unit calculates the tension of the line-shaped object connecting the end points from the position and speed information of the end points stored in the storage unit, and the end points are determined by the calculated tension. The position to be moved after the minute time is calculated, and from the shape, position, speed and posture information of the obstacle objects stored in the storage unit, the obstacle object is moved after the predetermined minute time. The shape, position and orientation to be taken are calculated based on a predetermined rule.

線分状オブジェクトはバネをモデル化したものであるので、自然長より長くなれば(端点が遠ざかれば)、端点同士を引っ張り合う張力が生じ、自然長より短くなれば(端点が近付けば)、端点同士を離す方向の負の張力(反発力)が生じる。この張力の大きさは、バネの現在の長さとその自然長との差に比例することとするのがもっとも単純なモデルであるが、たとえば、しわになりやすい布をシミュレートするために反発力は一切生じないものとしたり、堅い布をシミュレートするために一定以上の長さになると極めて大きな反発力が生じるものとしたりすることができ、張力の決め方には種々の技法を採用することができる。   Since the line-shaped object is a model of a spring, if it becomes longer than the natural length (if the end points are moved away), a tension that pulls the end points occurs, and if it becomes shorter than the natural length (if the end points are closer) Negative tension (repulsive force) in the direction of separating the end points is generated. The simplest model is that the magnitude of this tension is proportional to the difference between the current length of the spring and its natural length, but for example, the repulsive force is used to simulate a wrinkled fabric. Can be generated at all times, or a very large repulsive force can be generated when the length exceeds a certain length in order to simulate a hard cloth, and various techniques can be used to determine the tension. it can.

一方、障害物オブジェクトは、一般の仮想3次元空間におけるオブジェクトの運動をシミュレートして、位置、姿勢を求めれば良い。また、障害物オブジェクトが複数の変形しない内部オブジェクトからなる場合は、内部オブジェクト同士の接続関係も考慮して外力や内力、接続関係の拘束条件等計算を行うことにより、それぞれの位置を求めれば、障害物オブジェクトがどのように変形するか判明する。   On the other hand, the obstacle object may be obtained by simulating the movement of the object in a general virtual three-dimensional space to obtain the position and orientation. In addition, when the obstacle object consists of a plurality of internal objects that do not deform, by calculating the external force and internal force, the constraint condition of the connection relationship, etc. in consideration of the connection relationship between the internal objects, It turns out how the obstacle object deforms.

さらに、更新部は、当該複数の端点のそれぞれが当該微小時間の後に移動すべきと計算された位置を、当該線分状オブジェクトの端点の位置および速度情報として記憶部に記憶させ、当該複数の障害物オブジェクトのそれぞれが当該微小時間の後にとるべき形状、位置および姿勢を当該障害物オブジェクトの形状、位置、速度および姿勢情報として記憶部に記憶させて、記憶部に記憶される情報を当該微小時間の後の情報に更新する。   Further, the update unit stores the position where each of the plurality of end points is calculated to move after the minute time in the storage unit as the position and speed information of the end points of the line segment object, and The shape, position, and posture that each obstacle object should take after the minute time are stored in the storage unit as the shape, position, velocity, and posture information of the obstacle object, and the information stored in the storage unit is stored in the minute unit. Update to information after hours.

これによって、記憶部には、各オブジェクトの形状、位置、姿勢情報が記憶されることになる。   As a result, the storage unit stores the shape, position, and orientation information of each object.

そして、補正部は、更新部による更新が行われる毎に、当該複数の端点の一部または全部を補正の対象とし、当該補正の対象となる端点が当該複数の障害物オブジェクトのいずれかに包含されるか否かを判断し、包含される場合、当該包含される端点の位置を、当該端点に対応付けられて記憶部に記憶される補正用オブジェクトの形状、位置、速度および姿勢情報により、補正した位置を、当該端点の位置および速度情報として記憶部に記憶させ、記憶部に記憶される情報を補正する。   Then, each time the update unit performs an update, the correction unit sets a part or all of the plurality of end points as correction targets, and the correction target end points are included in any of the plurality of obstacle objects. In the case of inclusion, the position of the included end point is associated with the end point according to the shape, position, speed, and posture information of the correction object stored in the storage unit. The corrected position is stored in the storage unit as the position and speed information of the end point, and the information stored in the storage unit is corrected.

上記の例でいえば、スカートが足の中に入り込むことはなく、布は足の表面にとどまる。これをシミュレートするために、本発明では、布の形状を表す端点(質点)を結ぶ線分状オブジェクトが、足の形状を表す障害物オブジェクトと交差するか否か、を判定するものとする。ここで、「交差」するか否かの判定には、後述するような種々の技術を採用することができる。   In the above example, the skirt does not go into the foot and the fabric stays on the surface of the foot. In order to simulate this, in the present invention, it is determined whether or not the line-shaped object connecting the end points (mass points) representing the shape of the cloth intersects the obstacle object representing the shape of the foot. . Here, various techniques as described later can be adopted to determine whether or not to “cross”.

本発明では、線分状オブジェクトが「いずれか」の障害物オブジェクトと交差する場合に、当該線分状オブジェクトの端点に対応付けられる補正用オブジェクトの表面の近傍に、当該端点を移動することによって、両者が交差しないように、位置を補正するのである。   In the present invention, when the line-shaped object intersects with any obstacle object, the end point is moved to the vicinity of the surface of the correction object associated with the end point of the line-shaped object. The position is corrected so that they do not intersect.

一方、出力部は、記憶部に記憶される当該複数の線分状オブジェクトの端点の位置および速度情報と、当該複数の障害物オブジェクトの形状、位置および姿勢情報と、から、これらのオブジェクトの様子を示す画像を所定の周期で生成して出力する。   On the other hand, the output unit, based on the position and speed information of the end points of the plurality of line-shaped objects stored in the storage unit, and the shape, position, and posture information of the plurality of obstacle objects, Is generated and output at a predetermined cycle.

典型的には、所定の周期は、テレビジョン装置などの垂直同期信号の割り込み周期であり、生成された画像は一時的にフレームメモリに記憶され、垂直同期割り込みに合致したタイミングで、フレームメモリの情報が画面への表示用の信号に変換されて出力される。   Typically, the predetermined period is an interrupt period of a vertical synchronization signal of a television device or the like, and the generated image is temporarily stored in the frame memory, and the frame memory has a timing that matches the vertical synchronization interrupt. Information is converted into a signal for display on the screen and output.

さらに、当該所定の周期は当該所定の微小時間の2倍以上の長さであり、補正部は、更新部による更新が出力部により画像が生成される直前の更新である場合、当該複数の端点の全部を補正の対象として補正を行い、更新部による更新が出力部により画像が生成される直前の更新でない場合、当該複数の端点の一部を補正の対象として補正を行う。   Further, when the predetermined period is at least twice as long as the predetermined minute time, and the update by the update unit is an update immediately before the output unit generates an image, the plurality of end points Are all corrected, and if the update by the updating unit is not the update immediately before the output unit generates an image, the correction is performed by correcting a part of the plurality of end points.

これにより、重い計算処理を要する補正の処理を、画面表示等の直前ではすべての端点について行い、それ以外では一部の端点について行うことで、トレードオフの関係にあるより正確なシミュレーションと計算量の低減との適切な調整を図る。   As a result, correction processing requiring heavy calculation processing is performed for all end points immediately before screen display, etc., and for other end points, it is possible to perform more accurate simulation and calculation amount in a trade-off relationship. Make appropriate adjustments to reduce

このように、本発明により、仮想3次元空間において、布状のオブジェクトが、ある形状を有するオブジェクトと衝突する様子を適切な計算量でシミュレートすることができるようになる。   As described above, according to the present invention, it is possible to simulate, with an appropriate amount of calculation, how a cloth-like object collides with an object having a certain shape in a virtual three-dimensional space.

また、本発明のシミュレーション装置において、整数m (2≦m)、整数i (1≦i≦m)について、当該所定の周期は、当該所定の微小時間の(m+1)倍の長さであり、当該複数の端点は、記憶部に、1番目からm番目までのm個のグループに分類されて記憶され、更新部による更新が出力部により画像が生成される直前の更新(以下、「0番目の更新」という。)から数えてi番目の更新である場合、当該複数の端点のうち記憶部にi番目のグループに分類されて記憶される端点を補正の対象として補正を行うように構成することができる。   Further, in the simulation apparatus of the present invention, for the integer m (2 ≦ m) and the integer i (1 ≦ i ≦ m), the predetermined period is (m + 1) times as long as the predetermined minute time. The plurality of end points are classified and stored in the storage unit into m groups from the first to the m-th, and the update immediately before the update unit generates an image (hereinafter, “ In the case of the i-th update counted from “0th update”), correction is performed using the end points classified into the i-th group and stored in the storage unit among the plurality of end points as correction targets. Can be configured.

本発明では、1回の周期において、端点を分類するm個のグループがそれぞれ1回ずつ補正され、画面表示の直前では、全端点について補正が行われる。したがって、本発明によれば、適切な補正を行いつつ計算量の低減を図ることができる。   In the present invention, m groups for classifying end points are corrected once each in one cycle, and correction is performed for all end points immediately before screen display. Therefore, according to the present invention, it is possible to reduce the calculation amount while performing appropriate correction.

また、本発明のシミュレーション装置において、整数m (2≦m)、整数s、定数の整数Cについて、当該所定の周期は、当該所定の微小時間の(m+1)倍以上の長さであり、当該複数の端点は、記憶部に、1番目からm番目までのm個のグループに分類されて記憶され、更新部による更新が出力部により画像が生成される直前の更新でない更新のうち、s回目の更新である場合、当該複数の端点のうち記憶部に((s+C) mod m) + 1番目のグループに分類されて記憶される端点を補正の対象として補正を行うように構成することができる。   Further, in the simulation apparatus of the present invention, for the integer m (2 ≦ m), the integer s, and the constant integer C, the predetermined period is not less than (m + 1) times the predetermined minute time. The plurality of endpoints are stored in the storage unit by being classified into m groups from the first to the m-th, and the update by the update unit is not the update immediately before the image is generated by the output unit, In the case of the s-th update, the correction is performed using the end points classified and stored in the storage unit as ((s + C) mod m) + the first group among the plurality of end points. can do.

本発明では、端点を分類するm個のグループがそれぞれ同じ程度の頻度で補正され、画面表示の直前では、全端点について補正が行われる。したがって、本発明によれば、適切な補正を行いつつ計算量の低減を図ることができる。   In the present invention, the m groups for classifying the end points are corrected with the same frequency, and all the end points are corrected immediately before the screen display. Therefore, according to the present invention, it is possible to reduce the calculation amount while performing appropriate correction.

また、本発明のシミュレーション装置において、記憶部は、当該複数の端点のそれぞれについて、当該端点が、当該端点と線分状オブジェクトを介して隣接する他の端点とは、異なるグループに分類されるように記憶するように構成することができる。   In the simulation apparatus of the present invention, the storage unit may classify each of the plurality of end points into a different group from the other end points adjacent to the end points via the line-shaped object. Can be configured to store.

本発明では、隣り合う端点を別のグループに分類することにより、端点のグループができるだけ均一に分散されることとなる。したがって、本発明によれば、計算量の低減を図りながら、より正確なシミュレーションを行うことができる。   In the present invention, by classifying adjacent end points into different groups, the end point groups are dispersed as uniformly as possible. Therefore, according to the present invention, more accurate simulation can be performed while reducing the amount of calculation.

また、本発明のシミュレーション装置において、補正部は、当該補正の対象となる端点のそれぞれについて、当該端点の位置が、当該端点に対応付けられて記憶部に記憶される補正用オブジェクトの形状、位置、速度および姿勢情報により、当該補正用オブジェクトに包含される場合、当該端点の更新前の位置を当該補正用オブジェクトの当該更新による移動と同じ方向に同じ距離だけ移動した位置と、当該端点の更新後の位置と、を結ぶ線分が、当該補正用オブジェクトの表面と交差する位置に、当該端点の位置を補正するように構成することができる。   Further, in the simulation apparatus of the present invention, the correction unit, for each of the end points to be corrected, the position and position of the correction object stored in the storage unit in association with the end point. When the correction object includes the speed and orientation information, the position of the end point before the update is moved by the same distance in the same direction as the movement of the correction object by the update, and the end point is updated. It can be configured such that the position of the end point is corrected at a position where a line segment connecting the subsequent position intersects the surface of the correction object.

すなわち、端点(質点、布の表面に配置される点)が、障害物の内部に含まれる(スカートの布の表面の点が足の中にめり込んでしまっている)場合に、「交差」が生じる、と判断するものである。   That is, if the end point (mass point, point placed on the surface of the cloth) is included inside the obstacle (the point on the surface of the cloth on the skirt has been sunk into the foot), the “intersection” is It is determined that it will occur.

本発明では、すべての障害物オブジェクトのそれぞれと、端点のそれぞれと、を順次対比して、包含されるか否かを判定するのではなく、端点のそれぞれについて、当該端点が、当該端点にあらかじめ対応付けられた補正用オブジェクト(障害物オブジェクトのいずれかである)に包含されるか否かを判断して「交差」を判定するので、計算処理を高速に行うことができる一方で、交差が生じる場合には、適切な場所に端点の位置を移動することができるようになる。   In the present invention, each of the obstacle objects and each of the end points are sequentially compared to determine whether or not they are included, and for each of the end points, the end point is set in advance to the end point. Since it is determined whether the object is included in the associated correction object (which is one of the obstacle objects) and “intersection” is determined, the calculation process can be performed at high speed, while the intersection is If it occurs, the position of the end point can be moved to an appropriate place.

また、本発明のシミュレーション装置であって、補正部は、当該補正の対象となる端点のそれぞれについて、当該端点の位置が、当該複数の障害物オブジェクトについて記憶部に記憶される形状、位置、速度および姿勢情報により、当該複数の障害物オブジェクトのいずれかに包含される場合、当該端点の更新前の位置を当該補正用オブジェクトの当該更新による移動と同じ方向に同じ距離だけ移動した位置と、当該端点の更新後の位置と、を結ぶ線分が、当該補正用オブジェクトの表面と交差する位置に、当該端点の位置を補正するように構成することができる。   Further, in the simulation device of the present invention, the correction unit is configured such that, for each of the end points to be corrected, the positions of the end points are stored in the storage unit for the plurality of obstacle objects. When the position information is included in any of the plurality of obstacle objects, the position before the end point is updated by the same distance in the same direction as the movement of the correction object by the update, It can be configured such that the position of the end point is corrected at a position where a line segment connecting the updated position of the end point intersects the surface of the correction object.

本発明においても、端点(質点、布の表面に配置される点)が、障害物の内部に含まれる(スカートの布の表面の点が足の中にめり込んでしまっている)場合に、「交差」が生じる、と判断するのは、上記のものと同様である。   Also in the present invention, when the end points (mass points, points arranged on the surface of the cloth) are included inside the obstacle (the points on the surface of the cloth of the skirt are recessed in the foot), It is the same as described above that it is determined that an “intersection” occurs.

本発明では、すべての障害物オブジェクトのそれぞれと、端点のそれぞれと、を順次対比して、包含されるか否かを判定して、「交差」を判定するので、本発明によれば、より正確な交差判定ができる一方で、交差が生じる場合には、適切な場所に端点の位置を移動することができるようになる。   In the present invention, each of the obstacle objects and each of the end points are sequentially compared to determine whether or not they are included, so that “intersection” is determined. While accurate intersection determination can be performed, when an intersection occurs, the position of the end point can be moved to an appropriate place.

また、本発明のシミュレーション装置において、記憶部に記憶される補正用オブジェクトの形状が円柱である場合、補正部は、当該補正用オブジェクトに対応付けられる端点の位置を補正する場合、当該円柱の中心軸のいずれかの点から開始され、当該中心軸に直交し、当該補正前の端点の位置を通過する半直線が、当該円柱の表面と交差する位置を、当該端点の補正後の位置とするように構成することができる。   In the simulation apparatus of the present invention, when the shape of the correction object stored in the storage unit is a cylinder, the correction unit corrects the position of the end point associated with the correction object, and the center of the cylinder The position where the half line that starts from any point on the axis and intersects the surface of the cylinder perpendicular to the central axis and passes through the position of the end point before correction is the corrected position of the end point. It can be constituted as follows.

本発明は、補正用オブジェクトが円柱である場合の、端点の近傍を定める一つの手法を開示するものであり、本発明によれば、簡易に端点の位置の補正を行うことができるようになる。   The present invention discloses one method for determining the vicinity of an end point when the correction object is a cylinder. According to the present invention, the position of the end point can be easily corrected. .

また、本発明のシミュレーション装置において、記憶部に記憶される補正用オブジェクトの形状が円柱である場合、補正部は、当該補正用オブジェクトに対応付けられる端点の位置を補正する場合、当該円柱の中心軸のいずれかの点から開始され、当該中心軸に直交し、当該補正前の端点の位置を通過する半直線が、当該円柱の表面と交差する位置からさらに所定の微小距離だけ進んだ位置を、当該端点の補正後の位置とするように構成することができる。   In the simulation apparatus of the present invention, when the shape of the correction object stored in the storage unit is a cylinder, the correction unit corrects the position of the end point associated with the correction object, and the center of the cylinder Starting from any point of the axis, a position where the half line perpendicular to the central axis and passing through the position of the end point before correction has advanced further by a predetermined minute distance from the position intersecting the surface of the cylinder The end point can be configured to be a corrected position.

本発明は、補正用オブジェクトが円柱である場合の、端点の近傍を定める一つの手法を開示するものであり、本発明によれば、簡易に端点の位置の補正を行うことができるようになる。   The present invention discloses one method for determining the vicinity of an end point when the correction object is a cylinder. According to the present invention, the position of the end point can be easily corrected. .

また、本発明のシミュレーション装置において、記憶部に記憶される補正用オブジェクトの形状が多面体であり、当該多面体の面のうち、いずれか1つ以上が補正用面として設定される場合、補正部は、当該補正用オブジェクトに対応付けられる端点の位置を補正する場合、当該多面体の補正用面として設定された面のうち、当該端点に最も近いものに下ろした垂線が当該側面と交差する位置を、当該端点の補正後の位置とするように構成することができる。   In the simulation apparatus of the present invention, when the shape of the correction object stored in the storage unit is a polyhedron, and any one or more of the surfaces of the polyhedron is set as a correction surface, the correction unit is When correcting the position of the end point associated with the correction object, the position where the perpendicular line that is the closest to the end point among the planes set as the correction surface of the polyhedron intersects the side surface, It can be configured to be the corrected position of the end point.

本発明は、補正用オブジェクトが多面体(直方体や角柱、角錐台、正多面体などの凸多面体のほか、凹多面体など、任意の形状の多面体)である場合の、端点の近傍を定める一つの手法を開示するものであり、本発明によっても、簡易に端点の位置の補正を行うことができるようになる。   The present invention provides a method for determining the vicinity of an end point when a correction object is a polyhedron (a polyhedron having an arbitrary shape such as a concave polyhedron in addition to a convex polyhedron such as a rectangular parallelepiped, a prism, a truncated pyramid, and a regular polyhedron). The present invention is disclosed, and according to the present invention, the position of the end point can be easily corrected.

また、本発明のシミュレーション装置において、記憶部に記憶される補正用オブジェクトの形状が多面体であり、当該多面体の面のうち、いずれか1つ以上が補正用面として設定される場合、補正部は、当該補正用オブジェクトに対応付けられる端点の位置を補正する場合、当該多面体の補正用面として設定された面のうち、当該端点に最も近いものに下ろした垂線が当該補正用面と交差する位置からさらに所定の微小距離だけ進んだ位置を、当該端点の補正後の位置とするように構成することができる。   In the simulation apparatus of the present invention, when the shape of the correction object stored in the storage unit is a polyhedron, and any one or more of the surfaces of the polyhedron is set as a correction surface, the correction unit is When correcting the position of the end point associated with the correction object, a position where a perpendicular line that is closest to the end point out of the planes set as the correction surface of the polyhedron intersects the correction surface The position further advanced by a predetermined minute distance from the position can be configured as the corrected position of the end point.

本発明は、補正用オブジェクトが多面体(直方体や角柱、角錐台、正多面体などの凸多面体のほか、凹多面体など、任意の形状の多面体)である場合の、端点の近傍を定める一つの手法を開示するものであり、本発明によっても、簡易に端点の位置の補正を行うことができるようになる。   The present invention provides a method for determining the vicinity of an end point when a correction object is a polyhedron (a polyhedron having an arbitrary shape such as a concave polyhedron in addition to a convex polyhedron such as a rectangular parallelepiped, a prism, a truncated pyramid, and a regular polyhedron). The present invention is disclosed, and according to the present invention, the position of the end point can be easily corrected.

本発明のその他の観点に係るシミュレート方法は、伸縮する複数の線分状オブジェクトと、当該複数の線分状オブジェクトのいずれとも交差すべきでない複数の障害物オブジェクトと、が仮想3次元空間内で移動する様子をシミュレーションし、記憶部、計算部、更新部、補正部、出力部を備えるシミュレーション装置にて実行され、計算工程、更新工程、補正工程、出力工程を備え、以下のように構成する。   A simulation method according to another aspect of the present invention includes: a plurality of line-shaped objects that expand and contract; and a plurality of obstacle objects that should not intersect any of the plurality of line-shaped objects. It is executed by a simulation apparatus including a storage unit, a calculation unit, an update unit, a correction unit, and an output unit, and includes a calculation process, an update process, a correction process, and an output process, and is configured as follows. To do.

ここで、記憶部には、当該複数の線分状オブジェクトの端点の位置および速度情報と、当該複数の障害物オブジェクトの形状、位置、速度および姿勢情報と、が記憶され、当該複数の端点のそれぞれが当該複数の障害物オブジェクトのいずれかに補正用オブジェクトとして対応付けて記憶される。   Here, the storage unit stores the position and speed information of the end points of the plurality of line segment objects, and the shape, position, speed, and posture information of the plurality of obstacle objects. Each is stored in association with one of the plurality of obstacle objects as a correction object.

さて、計算工程では、計算部が、記憶部に記憶された当該複数の端点のそれぞれの位置および速度情報から、当該端点同士を結ぶ線分状オブジェクトの張力を計算し、当該計算された張力によって当該端点が所定の微小時間の後に移動すべき位置を計算し、記憶部に記憶された当該複数の障害物オブジェクトのそれぞれの形状、位置、速度および姿勢情報から、当該障害物オブジェクトが当該所定の微小時間の後にとるべき形状、位置および姿勢を所定の規則に基づいて計算する。   In the calculation step, the calculation unit calculates the tension of the line-shaped object connecting the end points from the position and speed information of the end points stored in the storage unit, and the calculated tension The position where the end point should move after a predetermined minute time is calculated, and the obstacle object is determined from the shape, position, speed and posture information of the plurality of obstacle objects stored in the storage unit. The shape, position and posture to be taken after a minute time are calculated based on a predetermined rule.

一方、更新工程では、更新部が、当該複数の端点のそれぞれが当該微小時間の後に移動すべきと計算された位置を、当該線分状オブジェクトの端点の位置および速度情報として記憶部に記憶させ、当該複数の障害物オブジェクトのそれぞれが当該微小時間の後にとるべき形状、位置および姿勢を当該障害物オブジェクトの形状、位置、速度および姿勢情報として記憶部に記憶させて、記憶部に記憶される情報を当該微小時間の後の情報に更新する。   On the other hand, in the update step, the update unit stores the position calculated that each of the plurality of end points should move after the minute time in the storage unit as the position and speed information of the end points of the line segment object. The shape, position, and posture that each of the plurality of obstacle objects should take after the minute time are stored in the storage unit as the shape, position, velocity, and posture information of the obstacle object, and are stored in the storage unit. Information is updated to information after the minute time.

さらに、補正工程では、更新部が、更新部による更新が行われる毎に、当該複数の端点の一部または全部を補正の対象とし、当該補正の対象となる端点が当該複数の障害物オブジェクトのいずれかに包含されるか否かを判断し、包含される場合、当該包含される端点の位置を、当該端点に対応付けられて記憶部に記憶される補正用オブジェクトの形状、位置、速度および姿勢情報により、補正した位置を、当該端点の位置および速度情報として記憶部に記憶させ、記憶部に記憶される情報を補正する。   Further, in the correction step, each time the update unit performs an update by the update unit, a part or all of the plurality of end points are set as correction targets, and the end points to be corrected are set as the plurality of obstacle objects. If it is included, the position of the included end point is associated with the end point, and the shape, position, speed, and speed of the correction object stored in the storage unit are stored. Based on the posture information, the corrected position is stored in the storage unit as the position and speed information of the end point, and the information stored in the storage unit is corrected.

そして、出力工程では、出力部が、記憶部に記憶される当該複数の線分状オブジェクトの端点の位置および速度情報と、当該複数の障害物オブジェクトの形状、位置および姿勢情報と、から、これらのオブジェクトの様子を示す画像を所定の周期で生成して出力する。   Then, in the output step, the output unit, from the position and speed information of the end points of the plurality of line segment objects stored in the storage unit, and the shape, position and orientation information of the plurality of obstacle objects, An image showing the state of the object is generated and output at a predetermined cycle.

一方、当該所定の周期は当該所定の微小時間の2倍以上の長さである。   On the other hand, the predetermined period is twice or more the predetermined minute time.

さらに、補正工程では、更新工程による更新が出力工程により画像が生成される直前の更新である場合、当該複数の端点の全部を補正の対象として補正を行い、更新部による更新が出力部により画像が生成される直前の更新でない場合、当該複数の端点の一部を補正の対象として補正を行う。   Further, in the correction process, when the update in the update process is an update immediately before the image is generated in the output process, the correction is performed on all of the plurality of end points, and the update by the update unit is performed by the output unit. If the update is not performed immediately before generation, correction is performed using a part of the plurality of end points as correction targets.

また、本発明のプログラムは、コンパクトディスク、フレキシブルディスク、ハードディスク、光磁気ディスク、ディジタルビデオディスク、磁気テープ、半導体メモリ等のコンピュータ読取可能な情報記憶媒体に記録することができる。
上記プログラムは、プログラムが実行されるコンピュータとは独立して、コンピュータ通信網を介して配布・販売することができる。また、上記情報記憶媒体は、コンピュータとは独立して配布・販売することができる。
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.

本発明によれば、布状体と当該布状体が交差しない障害物との仮想3次元空間における移動をシミュレートして、たとえばスカートが人の足にまとわりつくような状況を近似的に再現するのに好適な、シミュレーション装置、シミュレート方法、ならびに、これらをコンピュータにて実現するプログラムを提供することができる。   According to the present invention, a movement in a virtual three-dimensional space between a cloth body and an obstacle that does not intersect with the cloth body is simulated, and a situation in which, for example, a skirt clings to a human foot is approximately reproduced. Therefore, it is possible to provide a simulation apparatus, a simulation method, and a program that realizes these on a computer.

以下に本発明の実施形態を説明する。以下では、理解を容易にするため、ゲーム装置として動作する情報処理装置に対して本発明が適用される実施形態を説明するが、各種のコンピュータ、PDA(Personal Data Assistants)、携帯電話などの情報処理装置においても同様に本発明を適用することができる。すなわち、以下に説明する実施形態は説明のためのものであり、本願発明の範囲を制限するものではない。したがって、当業者であればこれらの各要素もしくは全要素をこれと均等なものに置換した実施形態を採用することが可能であるが、これらの実施形態も本発明の範囲に含まれる。   Embodiments of the present invention will be described below. In the following, for ease of understanding, an embodiment in which the present invention is applied to an information processing device that operates as a game device will be described. However, information on various computers, PDAs (Personal Data Assistants), mobile phones, and the like is described. The present invention can be similarly applied to a processing apparatus. That is, the embodiment described below is for explanation, and does not limit the scope of the present invention. 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 an explanatory diagram showing a schematic configuration of a typical information processing apparatus in which the simulation apparatus of the present invention is realized. Hereinafter, a description will be given with reference to FIG.

情報処理装置100は、CPU 101と、ROM 102と、RAM 103と、インターフェイス104と、コントローラ105と、外部メモリ106と、画像処理部107と、DVD−ROMドライブ108と、NIC(Network Interface Card)109と、音声処理部110とを備える。
ゲーム用のプログラムおよびデータを記憶したDVD−ROMをDVD−ROMドライブ108に装着して、情報処理装置100の電源を投入することにより、当該プログラムが実行され、本実施形態のシミュレーション装置が実現される。
The information processing apparatus 100 includes a CPU 101, a ROM 102, a RAM 103, an interface 104, a controller 105, an external memory 106, an image processing unit 107, a DVD-ROM drive 108, and a NIC (Network Interface Card). 109 and an audio processing unit 110.
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 by a user when executing a game such as an action game.

インターフェイス104を介して着脱自在に接続された外部メモリ106には、対戦ゲーム等のプレイ状況(過去の成績等)を示すデータ、ゲームの進行状態を示すデータ、対戦に伴うチャット通信のログ(記録)のデータなどが書き換え可能に記憶される。ユーザは、コントローラ105を介して指示入力を行うことにより、これらのデータを適宜外部メモリ106に記録することができる。   The external memory 106 detachably connected via the interface 104 stores data indicating the play status (past results, etc.) of the battle game, data indicating the progress of the game, and chat communication log (record) associated with the battle. ) 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, audio data, and moving image information 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に接続されるモニタ(図示せず)へ出力される。これにより、各種の画像表示が可能となる。このような画像処理部107の処理は、CPU 101の演算処理とは並行して行うことができる。
画像演算プロセッサは、2次元の画像の重ね合わせ演算やαブレンディング等の透過演算、各種の飽和演算を高速に実行できる。
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 ( Buffering recording (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. Such processing of the image processing unit 107 can be performed in parallel with the arithmetic processing of the CPU 101.
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次元空間に配置されたポリゴンを所定の視線の方向へ俯瞰したレンダリング画像を得る演算の高速実行も可能である。
さらに、CPU 101と画像演算プロセッサが協調動作することにより、文字の形状を定義するフォント情報にしたがって、文字列を2次元画像としてフレームメモリへ描画したり、各ポリゴン表面へ描画することが可能である。フォント情報は、ROM 102に記録されているが、DVD−ROMに記録された専用のフォント情報を利用することも可能である。
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.
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. The font information is recorded in the ROM 102, but it is also possible to use dedicated font information recorded in the DVD-ROM.

このほか、DVD−ROMに記録された動画情報や、これをあらかじめRAM 103等に転送した場合の動画情報は、画像処理部107によって、画面の所定の領域にスーパーインポーズするような形式で、動画表示を行うことができる。   In addition, the moving image information recorded on the DVD-ROM and the moving image information when this is transferred to the RAM 103 or the like in advance are superimposed on a predetermined area of the screen by the image processing unit 107, Movie display can be performed.

さて、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 used in configuring a LAN (Local Area Network). 10BASE-T / 100BASE- Connect to the Internet using an analog modem, ISDN (Integrated Services Digital Network) modem, ADSL (Asymmetric Digital Subscriber Line) modem, or cable television line to connect to the Internet using a telephone line. For example, and an interface (not shown) that mediates between them and the CPU 101.

インターネット内のSNTPサーバにNIC 109を介して接続し、ここから情報を得ることによって現在の日時情報を得ることができる。また、各種のネットワークゲームのサーバ装置が、SNTPサーバと同様の機能を果たすように構成設定してもよい。   The current date and time information can be obtained by connecting to an SNTP server in the Internet via the NIC 109 and obtaining information therefrom. In addition, various network game server devices may be configured and configured to perform the same functions as the SNTP server.

音声処理部110は、DVD−ROMから読み出した音声データをアナログ音声信号に変換し、これに接続されたスピーカ(図示せず)から出力させる。また、CPU 101の制御の下、ゲームの進行の中で発生させるべき効果音や楽曲データを生成し、これに対応した音声をスピーカから出力させる。
音声処理部110では、DVD−ROMに記録された音声データがMIDIデータである場合には、これが有する音源データを参照して、MIDIデータをPCMデータに変換する。また、ADPCM形式やOgg Vorbis形式等の圧縮済音声データである場合には、これを展開してPCMデータに変換する。PCMデータは、そのサンプリング周波数に応じたタイミングでD/A(Digital/Analog)変換を行って、スピーカに出力することにより、音声出力が可能となる。
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.
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でのミキシング等の処理ができるようにする。情報処理装置100をゲーム装置として利用する場合には、マイク111から入力された音声データを指示入力データとして、コントローラ105のかわりに入力デバイスとして用いることも可能である。   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. When the information processing apparatus 100 is used as a game apparatus, voice data input from the microphone 111 can be used as instruction input data as an input device instead of the controller 105.

このほか、情報処理装置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にかえて、汎用のパーソナルコンピュータを利用することもできる。   Further, it is possible to adopt a form in which a keyboard for accepting a character string editing input from a user, a mouse for accepting various position designations and selection inputs, and the like are connected. In addition, a general-purpose personal computer can be used instead of the information processing apparatus 100 of the present embodiment.

一般的なコンピュータは、上記情報処理装置100と同様に、CPU、RAM、ROM、DVD−ROMドライブ、および、NICを備え、ゲームにおける画面表示には必ずしも特化していない画像処理部を備え、外部記憶装置としてハードディスクを有する他、フレキシブルディスク、光磁気ディスク、磁気テープ等が利用できるようになっているのが一般的である。また、コントローラではなく、キーボードやマウスなどを入力装置として利用する。
したがって、このような一般的なコンピュータを、本発明のシミュレーション装置として動作させることも可能である。
Similar to the information processing apparatus 100, a general computer includes a CPU, RAM, ROM, DVD-ROM drive, and NIC, and includes an image processing unit that is not necessarily specialized for screen display in a game. In addition to having a hard disk as a storage device, a flexible disk, a magneto-optical disk, a magnetic tape, or the like is generally available. In addition, a keyboard, a mouse or the like is used as an input device instead of a controller.
Therefore, it is possible to operate such a general computer as the simulation apparatus of the present invention.

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

シミュレーション装置201は、伸縮する複数の線分状オブジェクトと、当該複数の線分状オブジェクトのいずれとも交差すべきでない複数の障害物オブジェクトと、が仮想3次元空間内で移動する様子をシミュレートし、記憶部202、計算部203、更新部204、補正部205、出力部206を備える。   The simulation apparatus 201 simulates the movement of a plurality of line-segment objects that expand and contract and a plurality of obstacle objects that should not intersect any of the plurality of line-segment objects in a virtual three-dimensional space. A storage unit 202, a calculation unit 203, an update unit 204, a correction unit 205, and an output unit 206.

記憶部202は、当該複数の線分状オブジェクトの端点の位置および速度情報と、当該複数の障害物オブジェクトの形状、位置、速度および姿勢情報と、を記憶し、当該複数の端点のそれぞれに、当該複数の障害物オブジェクトのいずれかを補正用オブジェクトとして対応付けて記憶する。   The storage unit 202 stores the position and speed information of the end points of the plurality of line-segment objects and the shape, position, speed, and posture information of the plurality of obstacle objects, and each of the plurality of end points includes: One of the plurality of obstacle objects is stored in association with the correction object.

図3は、線分状オブジェクトとその端点の様子を示す説明図である。   FIG. 3 is an explanatory diagram showing the state of the line segment object and its end points.

図3に示すように、布状の物体のモデル301として、バネのように振舞う線分状オブジェクト302を網目状に結合する。そして、その結合される端点303を質点とする。各端点303が均一に分布する場合には、当該布状の物体の質量を端点303の総数で割った質量を、各端点303の質点の質量とすれば良い。   As shown in FIG. 3, as a cloth-like object model 301, a line-like object 302 that behaves like a spring is connected in a mesh shape. Then, the end point 303 to be combined is set as a mass point. When the end points 303 are evenly distributed, the mass obtained by dividing the mass of the cloth-like object by the total number of end points 303 may be the mass of each end point 303.

布状の物体が自然な状態(外力がかかっていない状態)のときの各質点の位置を決め、そのときの質点(端点)同士の距離を線分状オブジェクト302の自然長とする。したがって、自然長を適宜調整することによって、立体的な形状(たとえば、しわやひだのある形状)の布をモデル化することも可能である。   The position of each mass point when the cloth-like object is in a natural state (a state where no external force is applied) is determined, and the distance between the mass points (end points) at that time is defined as the natural length of the line-shaped object 302. Accordingly, it is possible to model a cloth having a three-dimensional shape (for example, a shape having wrinkles or folds) by appropriately adjusting the natural length.

図3(a)は、質点(端点303)を正三角形のメッシュの頂点に配置し、正三角形の辺に線分状オブジェクト302を配置する手法である。なお、有限要素法などで用いられる領域分割と同様、三角形の形状としては、必ずしも正三角形を利用する必要はなく、また、布状の物体の縁近傍では、正三角形を採用できない場合もある。このような場合には、できるだけ、正三角形に近い形状(細長くない形状)を採用することが望ましい。   FIG. 3A shows a technique in which the mass points (end points 303) are arranged at the vertices of the equilateral triangle mesh, and the line segment objects 302 are arranged on the sides of the equilateral triangle. Note that, as in the area division used in the finite element method or the like, it is not always necessary to use a regular triangle as a triangular shape, and there are cases where a regular triangle cannot be adopted near the edge of a cloth-like object. In such a case, it is desirable to adopt a shape that is as close to an equilateral triangle as possible (a shape that is not elongated).

図3(b)は、質点(端点303)を格子点に配置し、格子点が頂点となる正方形のメッシュの辺に線分状オブジェクト302を配置する手法である。図3(a)、(b)の手法では、殆どの線分状オブジェクト302が同じ長さとなるため、計算の単純化を図ることが可能である。   FIG. 3B shows a technique in which mass points (end points 303) are arranged at lattice points, and line segment objects 302 are arranged on the sides of a square mesh whose lattice points are the vertices. In the methods of FIGS. 3A and 3B, since most of the line-shaped objects 302 have the same length, it is possible to simplify the calculation.

図3(c)は、図3(b)の手法に加えて、さらに、正方形のメッシュの対角線にも線分状オブジェクト302を配置する手法である。この手法では、長さの異なる2種類の線分状オブジェクト302を利用することとなるため、計算は少々複雑になるが、より自然な布の変形を表現することが可能となる。   FIG. 3C is a method of arranging the line segment object 302 on the diagonal of the square mesh in addition to the method of FIG. 3B. In this method, since two types of line-segment objects 302 having different lengths are used, calculation is slightly complicated, but more natural cloth deformation can be expressed.

線分状オブジェクト302はバネをモデル化したものであるから、最も単純な手法では、自然長よりも伸びた場合は、その伸び長に比例する張力で端点同士が引っぱられ、自然長よりも縮んだ場合は、その縮み長に比例する反発力(負の張力)で端点同士が遠ざけられる方向に力が働くことになる。   Since the line-shaped object 302 is a model of a spring, in the simplest method, when it extends beyond the natural length, the end points are pulled by a tension proportional to the extension length, and it shrinks below the natural length. In this case, a force acts in a direction in which the end points are moved away by a repulsive force (negative tension) proportional to the contraction length.

このように、線分状オブジェクト302は、バネをモデル化したものであり、線分状オブジェクト302の端点303は、質点をモデル化したものである。したがって、線分状オブジェクト302とその端点303によって、布状の物体をモデル化するのである。   As described above, the line segment object 302 models a spring, and the end point 303 of the line segment object 302 models a mass point. Therefore, a cloth-like object is modeled by the line-shaped object 302 and its end points 303.

一方、障害物オブジェクトは、当該仮想3次元空間内で、当該布状の物体と衝突しうるものをモデル化したものである。たとえば、布状の物体が、スカートの布である場合、障害物オブジェクトは、人間の足に相当する。   On the other hand, the obstacle object is a model of an object that can collide with the cloth-like object in the virtual three-dimensional space. For example, when the cloth-like object is a skirt cloth, the obstacle object corresponds to a human foot.

図4は、仮想3次元空間内における障害物オブジェクトと線分状オブジェクトの関係を示す説明図である。図4(a)は、仮想3次元空間内に、片足を模した形状のオブジェクトと線分状オブジェクトが配置される様子を示しており、図4(b)は、片足を模した形状のオブジェクトを、より単純な形状の障害物オブジェクトで表現した様子が示されている。   FIG. 4 is an explanatory diagram illustrating a relationship between an obstacle object and a line-shaped object in the virtual three-dimensional space. FIG. 4A shows a state in which an object shaped like a leg and a line segment object are arranged in a virtual three-dimensional space, and FIG. 4B shows an object shaped like a leg. Is represented by an obstacle object having a simpler shape.

本図に示すように、人間の片足の腿412、膝の関節413、脛414、足首の関節415、足首よりつま先までの足先416は、それぞれ、四角柱の障害物オブジェクト402a、球の障害物オブジェクト402b、円柱の障害物オブジェクト402c、球の障害物オブジェクト402d、台状体の障害物オブジェクト402eによって表現されている。   As shown in the figure, a human thigh 412, a knee joint 413, a shin 414, an ankle joint 415, and an ankle to toe 416 are a quadrangular prism obstacle object 402a and a ball obstacle, respectively. It is represented by a physical object 402b, a cylindrical obstacle object 402c, a spherical obstacle object 402d, and a trapezoidal obstacle object 402e.

この5つの障害物オブジェクト402については、四角柱402aの底面の中心は球402bに接し、円柱402cの底面の中心は球402bおよび球402dに接し、台状体402eの上面の所定の点が球402dに接する、という拘束条件のもとで運動をすることによって、人間の足をシミュレートしている。このほか、足をシミュレートするために、各部に加わる力や膝、足首を曲げ、伸ばそうとする力を種々の筋肉モデルによって設計して、内力や各種の外力が伝達されるようにして、物理シミュレーションを行うことができるようにしている。このような、人体の物理的なシミュレーションについては、種々の公知の技術を適用することができる。   For these five obstacle objects 402, the center of the bottom surface of the quadrangular prism 402a is in contact with the sphere 402b, the center of the bottom surface of the cylinder 402c is in contact with the sphere 402b and the sphere 402d, and a predetermined point on the upper surface of the trapezoidal body 402e is a sphere. The human foot is simulated by exercising under the restraint condition of touching 402d. In addition, in order to simulate the foot, the force applied to each part and the force to bend and stretch the knee and ankle are designed by various muscle models so that internal force and various external forces are transmitted, A simulation can be performed. Various known techniques can be applied to such a physical simulation of the human body.

さて、本図に示すように、障害物オブジェクト402の外側には、線分状オブジェクト302およびその端点303により構成される布状の物体のモデル301が配置されることになる。   As shown in the figure, a cloth-like object model 301 constituted by a line segment object 302 and its end point 303 is arranged outside the obstacle object 402.

スカートの布が人間の足にめり込むことがないのと同様、線分状オブジェクト302の端点303が障害物オブジェクト402にめり込むことがないようにしなければならない。   The end point 303 of the line-shaped object 302 should not be sunk into the obstacle object 402, just as the skirt fabric does not sunk into the human foot.

一方、布状の物体を実際に三次元グラフィックス描画することを考えた場合、各メッシュの頂点(端点303)と障害物オブジェクト402との遠近を判定し、どちらがどちらの前にあるかを調べてから、Zバッファ法によりメッシュにテクスチャを貼り込むこととなる。   On the other hand, when thinking about actually drawing a cloth-like object in three-dimensional graphics, the distance between the vertex (end point 303) of each mesh and the obstacle object 402 is determined, and which one is in front is checked. Then, the texture is pasted on the mesh by the Z buffer method.

したがって、線分状オブジェクト302の線分の一部が障害物オブジェクト402の表面にめり込むことがあったとしても、実用上は問題がないことが多い。この場合は、必要な精度で布状の物体をシミュレートできる程度にメッシュを細かくしておけば十分である。   Therefore, even if a part of the line segment of the line segment object 302 is sunk into the surface of the obstacle object 402, there is often no practical problem. In this case, it is sufficient to make the mesh fine enough to simulate the cloth-like object with the required accuracy.

このように、以下の実施形態では、「線分状オブジェクト302と障害物オブジェクト402との交差」を、「障害物オブジェクト402の内部に線分状オブジェクト302のいずれかの端点が包含される」こととして取り扱うものとする。その詳細は後述する。   As described above, in the following embodiment, “the intersection of the line-shaped object 302 and the obstacle object 402” is described as “one of the end points of the line-shaped object 302 is included in the obstacle object 402”. It shall be handled as a thing. Details thereof will be described later.

もっとも、適用分野によっては、「交差しない」ということを、線分状オブジェクト302全体が常に障害物オブジェクト402よりも外側にある(少なくとも障害物オブジェクト402の表面に接する)ことによって定義した方が良いこともある。このような場合についても後述する。   However, depending on the application field, it is better to define “does not intersect” by the fact that the entire line segment object 302 is always outside the obstacle object 402 (at least in contact with the surface of the obstacle object 402). Sometimes. Such a case will also be described later.

なお、上記の説明では、人間の腿、膝関節、脛、足首、足首より先つま先まで、の5つの部分を5個の障害物オブジェクト402として取り扱うこととしたが、これらを1個の変形する障害物オブジェクト402として取り扱っても良い。すなわち、1個の障害物オブジェクト402が、自由度を拘束する条件によって接続された複数の(単純な形状の)内部オブジェクトから構成されることとし、各内部オブジェクト同士は、種々の筋肉モデル等により内力が伝達されて、変形する、ということとするものである。   In the above description, the five parts from the human thigh, knee joint, shin, ankle, and ankle to the tiptoe are treated as the five obstacle objects 402, but these are transformed into one. It may be handled as the obstacle object 402. That is, one obstacle object 402 is composed of a plurality of (simple-shaped) internal objects connected by a condition that restricts the degree of freedom, and each internal object is based on various muscle models or the like. The internal force is transmitted and deformed.

さて、上述のように、記憶部202には、このような各種オブジェクトの位置情報、速度情報、姿勢情報、形状情報などが記憶されるほか、各種オブジェクトの物理シミュレーションに必要な各種の情報も記憶される。また、ユーザからのコントローラ105を介した指示入力も、一時的に記憶部202に記憶される。後述する計算部203は、記憶された情報を参照する。したがって、本実施形態では、RAM 103が記憶部202として機能する。   As described above, the storage unit 202 stores position information, speed information, posture information, shape information, and the like of various objects, and also stores various information necessary for physical simulation of various objects. Is done. An instruction input from the user via the controller 105 is also temporarily stored in the storage unit 202. The calculation unit 203 described later refers to the stored information. Therefore, in the present embodiment, the RAM 103 functions as the storage unit 202.

図5は、本実施形態におけるシミュレーション処理の制御の流れを示す模式図である。以下、本図を参照して説明する。   FIG. 5 is a schematic diagram showing a flow of control of simulation processing in the present embodiment. Hereinafter, a description will be given with reference to FIG.

まず、CPU 101の制御の下、記憶部202に、各種情報の初期値が設定される(ステップS501)。これらの初期値は、外部メモリ106やDVD−ROMドライブ108に装着されたDVDから読み出すこととしても良いし、ユーザからのコントローラ105を介した指示入力により設定されることとしても良い。   First, under the control of the CPU 101, initial values of various types of information are set in the storage unit 202 (step S501). These initial values may be read from a DVD loaded in the external memory 106 or the DVD-ROM drive 108, or may be set by an instruction input from the user via the controller 105.

一方、計算部203は、記憶部202に記憶された当該複数の端点303のそれぞれの位置情報から、当該端点303同士を結ぶ線分状オブジェクト302の張力を計算する(ステップS502)。   On the other hand, the calculation unit 203 calculates the tension of the line-shaped object 302 connecting the end points 303 from the position information of the end points 303 stored in the storage unit 202 (step S502).

ここで、線分状オブジェクト302の自然長をL、考慮する端点303の仮想3次元空間401内における座標を(x1,y1,z1)と(x2,y2,z2)、線分状オブジェクト302のバネ定数をkとおくと、最も簡単なバネモデルの一つによれば、線分状オブジェクト302の張力の大きさFは、以下のように表現できる。
F = k(D - L)
ただし、Dは、現在の線分状オブジェクト302の長さであり、以下のように計算できる。
D = ((x2-x1)2+(y2-y1)2+(z2-z1)2)1/2
Here, the natural length of the line-shaped object 302 is L, the coordinates of the end point 303 to be considered in the virtual three-dimensional space 401 are (x 1 , y 1 , z 1 ) and (x 2 , y 2 , z 2 ), If the spring constant of the line segment object 302 is k, according to one of the simplest spring models, the magnitude F of the tension of the line segment object 302 can be expressed as follows.
F = k (D-L)
However, D is the length of the current line-shaped object 302 and can be calculated as follows.
D = ((x 2 -x 1 ) 2 + (y 2 -y 1 ) 2 + (z 2 -z 1 ) 2 ) 1/2

したがって、座標(x1,y1,z1)にある質点(端点303)は、以下のベクトルで表現される力を受けることになる。
(F(x2-x1)/D,F(y2-y1)/D,F(z2-z1)/D)
Therefore, the mass point (end point 303) at the coordinates (x 1 , y 1 , z 1 ) receives a force expressed by the following vector.
(F (x 2 -x 1 ) / D, F (y 2 -y 1 ) / D, F (z 2 -z 1 ) / D)

一方、座標(x2,y2,z2)にある質点(端点303)は、以下のベクトルで表現される力を受けることになる。
(-F(x2-x1)/D,-F(y2-y1)/D,-F(z2-z1)/D)
On the other hand, the mass point (end point 303) at the coordinates (x 2 , y 2 , z 2 ) receives a force expressed by the following vector.
(-F (x 2 -x 1 ) / D, -F (y 2 -y 1 ) / D, -F (z 2 -z 1 ) / D)

張力の大きさFが正である場合はバネが端点同士を引き合う力が、負である場合はバネが端点同士を離し合う力が、それぞれ生じることを意味する。   When the magnitude F of the tension is positive, it means that the spring pulls the end points, and when the tension is negative, the spring pulls the end points apart.

なお、バネにより生じる張力のモデル化は、上記の形態に限られず、種々の手法を採用することができる。たとえば、Dが一定の上限を超えた場合や一定の下限を下回った場合には、Fも所定の定数をとることとしたり、単なる比例ではなくより複雑な計算によって張力が計算されることとしたり、DとFとの関係が連続的に比例して変化するのではなく、階段状に不連続に変化するようにしても良い。   The modeling of the tension generated by the spring is not limited to the above form, and various methods can be employed. For example, when D exceeds a certain upper limit or falls below a certain lower limit, F also takes a predetermined constant, or the tension is calculated by a more complicated calculation rather than a mere proportion. The relationship between D and F may not be changed continuously in proportion, but may be discontinuously changed stepwise.

ついで、計算部203は、各端点303について当該計算された張力の和をとって、当該端点303にかかる外力を計算し(ステップS503)、当該外力によって当該端点303が所定の微小時間の後に移動すべき位置を計算する(ステップS504)。上記のように、各線分状オブジェクト302のそれぞれについて張力を計算し、その総和をとれば、各質点(端点303)にかかる力がわかる。   Next, the calculation unit 203 calculates the external force applied to the end point 303 by taking the sum of the calculated tensions for each end point 303 (step S503), and the end point 303 is moved after a predetermined minute time by the external force. The position to be calculated is calculated (step S504). As described above, the force applied to each mass point (end point 303) can be found by calculating the tension for each line segment object 302 and taking the sum of the tensions.

たとえば、図3(a)に示すモデルの場合、代表的な質点(端点303)には線分状オブジェクト302が6個集まっているので、これら6つの張力の総和を求める。図3(b)の場合は、線分状オブジェクト302が4個集まっているので、これら4つの張力の総和を求める。図3(c)の場合は、線分状オブジェクト302が8個集まっているので、これら8つの張力の総和を求める。   For example, in the case of the model shown in FIG. 3A, since six line segment objects 302 are gathered at a representative mass point (end point 303), the sum of these six tensions is obtained. In the case of FIG. 3B, since four line-like objects 302 are gathered, the sum of these four tensions is obtained. In the case of FIG. 3C, since eight line-like objects 302 are gathered, the sum of these eight tensions is obtained.

このほか、質点(端点303)に外力がかかっている場合は、その力も可算する。外力としては、たとえば重力や風力などが考えられる。質点(端点303)の質量をmとし、重力加速度ベクトルをgとした場合、重力はmgとなる。   In addition, when an external force is applied to the mass point (end point 303), the force is also counted. As the external force, for example, gravity or wind force can be considered. If the mass of the mass point (end point 303) is m and the gravitational acceleration vector is g, gravity is mg.

さて、ある質点(端点303)にかかる力ベクトルをfであり、現在の記憶部302に記憶されている質点(端点303)の位置情報による位置ベクトルをr(上記の端点303の座標に対応する。)、速度情報による速度ベクトルをv、所定の微小時間をdtとするとき、当該端点303が所定の微小時間後に移動すべき位置を表す位置ベクトルr'および当該端点303の所定の微小時間後の速度を現わす速度ベクトルv'は、最も単純には、以下のように表現できる。
v' = v + f・dt/m;
r' = r + (v+v')・dt/2
= r + v・dt + f・dt2/(2m)
The force vector applied to a certain mass point (end point 303) is f, and the position vector based on the position information of the mass point (end point 303) stored in the current storage unit 302 is r (corresponding to the coordinates of the end point 303). .), When the velocity vector based on the velocity information is v and the predetermined minute time is dt, the position vector r ′ representing the position where the end point 303 should move after the predetermined minute time and the end point 303 after the predetermined minute time The velocity vector v ′ representing the velocity of can be expressed most simply as follows.
v '= v + f · dt / m;
r '= r + (v + v') ・ dt / 2
= r + v ・ dt + f ・ dt 2 / (2m)

これは、計算機を用いた積分の最も単純な構成であり、より詳細にシミュレーションを行うためには、たとえばRunge-Kutta法などの技術を適用することもできる。   This is the simplest configuration of integration using a computer, and a technique such as the Runge-Kutta method can be applied to perform more detailed simulation.

ここで、本シミュレーションの結果をゲームにおいて画面に表示する場合などには、この微小時間dtは、画面表示のリフレッシュレートに比例させることが望ましい。たとえば、一般的なゲーム装置では、垂直同期が60Hzで生じるので、微小時間dtは、1/60秒をさらに整数で割った時間とする。   Here, when the result of this simulation is displayed on a screen in a game, it is desirable that this minute time dt is proportional to the refresh rate of the screen display. For example, in a general game device, since vertical synchronization occurs at 60 Hz, the minute time dt is a time obtained by further dividing 1/60 seconds by an integer.

次に、計算部203は、記憶部に記憶された当該複数の障害物オブジェクト402のそれぞれの形状、位置、速度および姿勢情報から、当該障害物オブジェクト402が当該所定の微小時間の後にとるべき形状、位置および姿勢を所定の規則に基づいて計算する(ステップS505)。   Next, the calculation unit 203 calculates the shape that the obstacle object 402 should take after the predetermined minute time from the shape, position, speed, and posture information of each of the plurality of obstacle objects 402 stored in the storage unit. The position and orientation are calculated based on a predetermined rule (step S505).

障害物オブジェクト402にかかる力を求め、上記の質点(端点303)の場合と同様の計算を行えば良い。一方、障害物オブジェクト402は、一般の仮想3次元空間におけるオブジェクトの運動をシミュレートして、位置、姿勢を求めれば良い。また、障害物オブジェクト402が複数の変形しない内部オブジェクトからなる場合は、内部オブジェクト同士の接続関係も考慮して外力や内力、接続関係の拘束条件等計算を行うことにより、それぞれの位置を求めれば、障害物オブジェクト402がどのように変形するか判明する。   The force applied to the obstacle object 402 is obtained, and the same calculation as in the case of the mass point (end point 303) may be performed. On the other hand, the obstacle object 402 may be obtained by simulating the movement of the object in a general virtual three-dimensional space to obtain the position and orientation. If the obstacle object 402 is composed of a plurality of internal objects that are not deformed, each position can be obtained by calculating external force, internal force, constraint conditions of the connection relationship, etc. in consideration of the connection relationship between the internal objects. And how the obstacle object 402 is deformed.

なお、上記の計算では、障害物オブジェクト402や端点303が自由に運動できる場合を考えたが、これらが拘束されている場合もある。たとえば、スカートの上側の縁は人間の腰に固定されているし、旗の横の2頂点はポールに固定されている。そこで、このような拘束条件がある場合には、微分方程式を解いた結果を修正し、あるいは、微分方程式を解くまでもなく、次の位置を決定したりするのである。このような修正や決定の技法についても、公知の技術を採用することができる。   In the above calculation, the case where the obstacle object 402 and the end point 303 can freely move is considered, but there are cases where these are constrained. For example, the upper edge of the skirt is fixed to the human waist, and the two vertices next to the flag are fixed to the pole. Therefore, when there are such constraint conditions, the result of solving the differential equation is corrected, or the next position is determined without solving the differential equation. Known techniques can be employed for such correction and determination techniques.

このように、CPU 102は、RAM 103と共働して、計算部203として機能する。なお、ステップS502〜ステップS504の線分状オブジェクト302に関係する計算や、ステップS505の障害物オブジェクト402に関係する計算は、各オブジェクトについて独立に行うことができるため、ベクトル化が可能である。したがって、CPU 102が直接繰り返し計算を行う手法、ベクトル化指令やマルチメディア指令を用いて並列に計算を行う方法、並列数値演算コプロセッサを利用する手法など、種々の手法を採用することができる。   As described above, the CPU 102 functions as the calculation unit 203 in cooperation with the RAM 103. Note that the calculation related to the line segment object 302 in step S502 to step S504 and the calculation related to the obstacle object 402 in step S505 can be performed for each object independently, and thus can be vectorized. Therefore, various methods such as a method in which the CPU 102 directly performs calculation repeatedly, a method in which calculation is performed in parallel using a vectorization command or a multimedia command, and a method in which a parallel numerical arithmetic coprocessor is used can be employed.

さて、更新部204は、当該複数の端点303のそれぞれが当該微小時間の後に移動すべきと計算された位置を、当該線分状オブジェクト302の端点303の位置情報として記憶部202に記憶させ(ステップS506)、当該複数の障害物オブジェクト402のそれぞれが当該微小時間の後にとるべき形状、位置および姿勢を当該障害物オブジェクト402の形状、位置、速度および姿勢情報として記憶部202に記憶させて(ステップS507)、記憶部202に記憶される情報を当該微小時間の後の情報に更新する。   Now, the update unit 204 causes the storage unit 202 to store, as position information of the end point 303 of the line segment object 302, the position where each of the plurality of end points 303 is calculated to move after the minute time ( In step S506, the shape, position, and posture that each of the plurality of obstacle objects 402 should take after the minute time are stored in the storage unit 202 as shape, position, velocity, and posture information of the obstacle object 402 ( Step S507), the information stored in the storage unit 202 is updated to the information after the minute time.

これによって、記憶部202には、各オブジェクトの形状、位置、姿勢情報が記憶されることになる。   As a result, the storage unit 202 stores the shape, position, and orientation information of each object.

この段階では、微小時間dtだけ時間経過が起きたとしたときの、単純な物理シミュレーションを行ったのみであるため、ここで記憶部202に記憶される値によると、線分状オブジェクト302と障害物オブジェクト402とが「交差」していることがありうる。すなわち、障害物オブジェクト402に質点(端点303)がめり込んでいることがありうる。そこで、質点(端点303)の位置を補正するのが、補正部205の機能である。   At this stage, only a simple physical simulation is performed when the time has elapsed by the minute time dt. Therefore, according to the values stored in the storage unit 202, the line segment object 302 and the obstacle It is possible that the object 402 is “intersecting”. That is, a mass point (end point 303) may be embedded in the obstacle object 402. Therefore, the function of the correction unit 205 is to correct the position of the mass point (end point 303).

各質点(端点303)について、補正部205は、ステップS508〜ステップS512の以下の処理を繰り返す(ステップS508)。まず、今回の繰返し未処理の質点(端点303)を1つ取得し(ステップS509)、当該端点303が障害物にめり込んでいるか否かを判断する(ステップS510)。   For each mass point (end point 303), the correction unit 205 repeats the following processing from step S508 to step S512 (step S508). First, one repetitively unprocessed mass point (end point 303) of this time is acquired (step S509), and it is determined whether or not the end point 303 is embedded in an obstacle (step S510).

具体的には、次の(a)(b)の2種類の手法が考えられる。
(a)当該端点303の位置と、複数の障害物オブジェクト402のそれぞれと、を対比して、当該端点303が当該障害物オブジェクト402のいずれかに包含されているか否かを判定する。
Specifically, the following two methods (a) and (b) can be considered.
(A) The position of the end point 303 and each of the plurality of obstacle objects 402 are compared to determine whether the end point 303 is included in any of the obstacle objects 402.

障害物オブジェクトの数が少ない場合に好適であり、交差するか否かをより適切に判断できる。
(b)当該端点303の位置と、複数の障害物オブジェクト402のうち、当該端点303に対応付けられる旨、記憶部202に記憶されているもの(以下、当該対応付けられている障害物オブジェクト402を「補正用オブジェクト」という。)と、を対比して、当該端点303が当該補正用オブジェクトに包含されるか否かを判定する。
This is suitable when the number of obstacle objects is small, and it is possible to more appropriately determine whether or not to intersect.
(B) The position of the end point 303 and the object stored in the storage unit 202 to be associated with the end point 303 among the plurality of obstacle objects 402 (hereinafter referred to as the associated obstacle object 402 Is referred to as “correction object”), and it is determined whether or not the end point 303 is included in the correction object.

典型的には、1つの端点303には、補正用オブジェクトが1つ対応付けられる。なお、1つの端点303に複数の障害物オブジェクト402を対応付けたい場合には、当該対応付けたい複数の障害物オブジェクト402を内部オブジェクトとして持つ1つの障害物オブジェクトを補正用オブジェクトとし、当該補正用オブジェクトが変形することとすれば良い。   Typically, one correction object is associated with one end point 303. When a plurality of obstacle objects 402 are to be associated with one end point 303, one obstacle object having the plurality of obstacle objects 402 to be associated as an internal object is used as a correction object, and the correction object is used. The object may be deformed.

たとえば、スカートの布が足にまとわりつく状況を考えればわかる通り、スカートのある領域は専ら腿にまとわりつき、ある領域は専ら膝に、ある領域は専ら脛にまとわりつく。したがって、このような状況下では、腿にまとわりつく領域の質点(端点303)の補正用オブジェクトは、四角柱の障害物オブジェクト402とする、等の対応付けをすれば良い。   For example, as can be seen from the situation where the fabric of the skirt clings to the foot, a certain area of the skirt clings to the thigh, a certain area to the knee, and a certain area to the shin. Therefore, in such a situation, the correction object of the mass point (end point 303) of the region clinging to the thigh may be associated with the obstacle object 402 having a quadrangular prism.

手法(a)(b)は、利用分野に応じて適宜選択すれば良い。   The methods (a) and (b) may be appropriately selected according to the field of use.

そして、「交差」する、すなわち、当該端点303が障害物にめり込んでいると判定された場合(ステップS510;Yes)、当該端点303の位置情報を、当該補正用オブジェクトの形状、位置、速度および姿勢情報により補正して(ステップS511)、補正された結果の位置情報を記憶部202に記憶させ(ステップS512)、ステップS508に戻る。   Then, when it is determined that the vehicle intersects, that is, the end point 303 is indented into the obstacle (step S510; Yes), the position information of the end point 303 is changed to the shape, position, speed, and the correction object. It correct | amends by attitude | position information (step S511), memorize | stores the positional information of the corrected result in the memory | storage part 202 (step S512), and returns to step S508.

ここで、補正の手法について、具体的に説明する。代表的な手法は、以下の通りである。
(1)端点303の位置を、補正用オブジェクトの表面のうち、当該端点303に最も近い点もしくはその近傍に移動する。
(2)補正用オブジェクトに固定された座標系で考え、当該微小時間における端点303の位置の変化の経路が、補正用オブジェクトの表面と交わる点もしくはその近傍に移動する。
以下、順に説明する。
Here, the correction method will be specifically described. A typical method is as follows.
(1) The position of the end point 303 is moved to the point closest to or near the end point 303 on the surface of the correction object.
(2) Considering a coordinate system fixed to the correction object, the path of change of the position of the end point 303 in the minute time moves to or near the point where it intersects the surface of the correction object.
Hereinafter, it demonstrates in order.

まず、手法(1)は、補正用オブジェクトが、単純な形状であるときに特に容易に補正先の位置を求めることができる利点がある。   First, the method (1) has an advantage that the position of the correction destination can be easily obtained particularly when the correction object has a simple shape.

図6は、手法(1)において、補正用オブジェクトが種々の形状の場合の、補正用オブジェクトと、端点303の補正前の位置と、補正後の位置との関係を示す説明図である。   FIG. 6 is an explanatory diagram showing the relationship among the correction object, the position before correction of the end point 303, and the position after correction when the correction object has various shapes in the method (1).

本図(a)に示すように、補正用オブジェクト601が球である場合は、球の中心611から端点303の補正前の位置602を通過する半直線を伸ばし、これが球面と交わった点603を補正後の位置とすれば良い。もしくは、当該球面内の交点からさらに所定の微小距離αだけ進んだ点604を補正後の位置としても良い。   As shown in FIG. 5A, when the correction object 601 is a sphere, a half line passing through the position 602 before correction of the end point 303 is extended from the center 611 of the sphere, and a point 603 where this intersects the spherical surface is obtained. The corrected position may be used. Alternatively, a point 604 further advanced by a predetermined minute distance α from the intersection in the spherical surface may be set as the corrected position.

本図(b)では、補正用オブジェクトが多面体(各種の直方体、立方体、正多面体、角柱、角錐台、台状体なども含まれる。)である場合を考えている。この場合は、端点303の補正前の位置602から、多面体の各面612に垂線613を下ろし、当該垂線613が最小距離となる面612に対する垂線613の足、すなわち、垂線613と面612の交点を補正後の位置とすれば良い。もしくは、当該最小距離となった垂線613と当該面612との交点603からさらに所定の微小距離αだけ進んだ点604を補正後の位置としても良い。   In this figure (b), the case where the object for correction is a polyhedron (including various rectangular parallelepipeds, cubes, regular polyhedrons, prisms, pyramids, trapezoids, etc.) is considered. In this case, a perpendicular line 613 is dropped on each surface 612 of the polyhedron from the position 602 before correction of the end point 303, and the foot of the perpendicular line 613 with respect to the surface 612 where the perpendicular line 613 is the minimum distance, that is, the intersection of the perpendicular line 613 and the surface 612. May be the corrected position. Alternatively, a point 604 further advanced by a predetermined minute distance α from the intersection 603 between the perpendicular line 613 and the surface 612 that is the minimum distance may be set as the corrected position.

本図(c)では、補正用オブジェクトが円柱の場合を考えている。この場合は、円柱の中心軸614のいずれかの一点から始まる半直線615で、当該中心軸614と直交し、端点303を通過するものと、円柱の表面との交点603を補正後の位置とすれば良い。もしくは、当該半直線615が交点603からさらに所定の微小距離αだけ進んだ点604を補正後の位置としても良い。   In this figure (c), the case where the object for correction | amendment is a cylinder is considered. In this case, the half line 615 starting from one point of the center axis 614 of the cylinder, which is perpendicular to the center axis 614 and passes through the end point 303, and the intersection 603 of the cylinder surface with the corrected position Just do it. Alternatively, the corrected point may be a point 604 where the half line 615 is further advanced from the intersection 603 by a predetermined minute distance α.

ここで採用する所定の微小距離αは、布状の物体のメッシュのサイズよりも小さいことが望ましい。すなわち、各線分状オブジェクト302の自然長の長さよりも小さい値としておくのが良い。   The predetermined minute distance α employed here is preferably smaller than the mesh size of the cloth-like object. That is, it is preferable to set a value smaller than the natural length of each line segment object 302.

次に、手法(2)は、端点303の物理モデルに基づく移動を追跡して、その経路が補正用オブジェクトと交わる交点を補正後の位置とするので、最も尤もらしい結果が得られるという利点がある。   Next, since the method (2) tracks the movement of the end point 303 based on the physical model and sets the intersection where the path intersects with the correction object as the corrected position, there is an advantage that the most likely result is obtained. is there.

手法(2)を率直に実装する場合は、まず、補正用オブジェクト601に固定された移動座標系を考える。一般に当該移動座標系は、グローバル座標系に対して、更新の前後で移動ならびに回転している。   In order to implement the method (2) frankly, first, consider a moving coordinate system fixed to the correction object 601. In general, the moving coordinate system moves and rotates before and after the update with respect to the global coordinate system.

次に、当該移動座標系内において、端点303が更新の前後でどのように移動するかを考える。移動座標系は、グローバル座標系に対して移動ならびに回転しており、端点303は、グローバル座標系に対して移動しているから、移動座標系内で、端点303は、移動ならびに回転することになる。   Next, consider how the end point 303 moves before and after the update in the moving coordinate system. Since the moving coordinate system moves and rotates with respect to the global coordinate system, and the end point 303 moves with respect to the global coordinate system, the end point 303 moves and rotates within the moving coordinate system. Become.

しかしながら、移動ならびに回転する軌跡が、補正用オブジェクト601と交わる交点603を求めるのは、難しいことも多い。そこで、回転については無視することとし、補正用オブジェクト601の重心(もしくは中心や所定の代表点)の移動と、端点303の移動のみを考え、移動座標系は回転しないものとする手法を採用しても良い。すなわち、補正用オブジェクト601は、平行移動しているもの、として近似するのである。   However, it is often difficult to obtain the intersection 603 where the trajectory that moves and rotates intersects the correction object 601. Therefore, a method is adopted in which rotation is ignored and only the movement of the center of gravity (or the center or a predetermined representative point) of the correction object 601 and the movement of the end point 303 are considered, and the moving coordinate system is not rotated. May be. That is, the correction object 601 is approximated as being moved in parallel.

図7は、手法(2)において、そのような手法を採用した場合の考え方を示す説明図である。   FIG. 7 is an explanatory diagram showing a concept when such a method is adopted in the method (2).

本手法では、補正用オブジェクト601は平行移動していると近似するのであるから、グローバル座標系においてその移動を表すベクトルをwとする。   In this method, since the correction object 601 is approximated as moving in parallel, a vector representing the movement in the global coordinate system is set to w.

本図では、補正用オブジェクト601として円柱を考え、当該円柱の中心軸方向に各オブジェクトを平行投影した様子を図示している。したがって、本図では、補正用オブジェクト601の移動前(本図実線)と移動後(本図破線)は、いずれも円で表示されることとなる。   This figure shows a state in which a cylinder is considered as the correction object 601 and each object is projected in parallel in the central axis direction of the cylinder. Therefore, in this figure, the correction object 601 is displayed as a circle before (indicated by a solid line in this figure) and after the movement (indicated by a broken line in this figure).

一方、端点303は、グローバル座標系において、位置rからr'へ移動している。この位置r'は、移動後の補正用オブジェクト601の内側にある。   On the other hand, the end point 303 has moved from the position r to r ′ in the global coordinate system. This position r ′ is inside the correction object 601 after movement.

ここで、端点303が補正用オブジェクト601と平行に移動したと過程すると、その移動先はグローバル座標系において、r+wである。この位置r+wは、移動後の補正用オブジェクト601の外側にある。   Here, if it is assumed that the end point 303 has moved in parallel with the correction object 601, the movement destination is r + w in the global coordinate system. This position r + w is outside the correction object 601 after movement.

そこで、グローバル座標系において、位置r+wと位置r'とを結ぶ線分621を考える。この線分621は、補正用オブジェクト601の外側と内側を結ぶのであるから、必ず補正用オブジェクト601と交わる交点603を持つはずである。そこで、交点603を、補正後の位置とするのである。   Therefore, a line segment 621 connecting the position r + w and the position r ′ in the global coordinate system is considered. Since the line segment 621 connects the outside and the inside of the correction object 601, the line segment 621 must always have an intersection 603 that intersects the correction object 601. Therefore, the intersection point 603 is set as a corrected position.

また、位置r+wから始まり位置r'を通過する半直線622を考え、この半直線622が交点603からさらに所定の微小距離αだけ進んだ点604を補正後の位置としても良い。   Further, a half line 622 starting from the position r + w and passing through the position r ′ is considered, and a point 604 where the half line 622 further advances from the intersection 603 by a predetermined minute distance α may be set as a corrected position.

線分621と補正用オブジェクト601との交点603やさらに進んだ点604を求める手法については、公知の3次元グラフィックスにおける各種立体幾何の技術を適用することができる。   As a method for obtaining the intersection 603 between the line segment 621 and the correction object 601 and the further advanced point 604, various three-dimensional geometric techniques in known three-dimensional graphics can be applied.

なお、補正用オブジェクト601が姿勢も変えている場合には、当該線分621が補正用オブジェクト601との交点603を持たない場合もありうる。そのときは、当該線分621を伸ばした直線と補正用オブジェクト601との交点603のうち、r'に最も近い点やそのα近傍を補正後の位置とすれば良い。   Note that when the correction object 601 also changes its orientation, the line segment 621 may not have the intersection 603 with the correction object 601. At that time, a point closest to r ′ or an α vicinity thereof may be set as a corrected position among the intersections 603 of the straight line obtained by extending the line segment 621 and the correction object 601.

このように、CPU 102は、各種演算コプロセッサがある場合は、当該コプロセッサと共働し、RAM 103とも共働して、補正部205として機能する。   As described above, when there are various arithmetic coprocessors, the CPU 102 cooperates with the coprocessor and also with the RAM 103 to function as the correction unit 205.

なお、補正用オブジェクト601の表面のうち、交点603を探す際に、すべての表面を検討するのではなく、補正用面のみを検討する、という手法もありうる。   In addition, when searching for the intersection 603 among the surfaces of the correction object 601, there may be a method in which only the correction surface is considered instead of considering all surfaces.

上述の説明では、補正用オブジェクト601が有限長の円柱の場合であっても、天井と床の円は考慮せず、当該側面を含む無限長の円柱側面と線分や半直線等との交点を考慮していたが、これは、補正用面として、当該無限長の円柱側面を採用していることにほかならない。   In the above description, even if the correction object 601 is a finite-length cylinder, the intersection of the infinite-length cylinder side surface including the side surface with a line segment, a half line, or the like is not taken into consideration. However, this is nothing but the fact that the infinitely long cylindrical side surface is used as the correction surface.

人間の足の部品を円柱で表す場合、天井と床の部分は人間の足の内部に相当するから、補正後の位置としてはふさわしくない。そこで、有限長の側面をそのまま無限に伸ばした無限長の円柱の側面を補正用面としていたのである。   When the parts of a human foot are represented by a cylinder, the ceiling and floor portions correspond to the inside of the human foot, and thus are not suitable as corrected positions. Therefore, the side surface of an infinitely long cylinder obtained by extending the side surface of a finite length infinitely is used as a correction surface.

補正用オブジェクト601が多面体である場合、面の数が多すぎる場合には、当該補正用オブジェクト601を近似するもっと面の数の少ない多面体を考え、当該面の数の少ない近似多面体の表面を補正用面とするのである。   When the correction object 601 is a polyhedron, if the number of faces is too large, a polyhedron with a smaller number of faces that approximates the correction object 601 is considered, and the surface of the approximate polyhedron with a smaller number of faces is corrected. It is a use surface.

近似多面体としては、たとえば、補正用オブジェクト601に外接する多面体を採用しても良いし、近似多面体の表面と補正用オブジェクト601の表面とが適宜交差するようなものを採用しても良い。   As the approximate polyhedron, for example, a polyhedron circumscribing the correction object 601 may be employed, or a surface in which the surface of the approximate polyhedron and the surface of the correction object 601 appropriately intersect may be employed.

このほか、補正用オブジェクト601の面のいずれかを適宜削除し、残った面をそのまま平面状に広げることによってできあがる新たな多面体を近似多面体としても良い。   In addition, a new polyhedron obtained by deleting any one of the surfaces of the correction object 601 as appropriate and expanding the remaining surface as it is may be used as an approximate polyhedron.

さて、このような処理によって、各端点303の位置情報等の更新(ステップS507)ならびに補正(ステップS508〜S512)が終了したら、前回の更新・補正と、今回の更新・補正との間に、垂直同期割り込みが発生したか否かを判断する(ステップS513)。   Now, after updating (step S507) and correction (steps S508 to S512) of the position information and the like of each end point 303 by such processing, between the previous update / correction and the current update / correction, It is determined whether a vertical synchronization interrupt has occurred (step S513).

発生した場合(ステップS513;Yes)、出力部206は、記憶部202に記憶される当該複数の線分状オブジェクト302の端点303の位置情報と、当該複数の障害物オブジェクト402の形状、位置および姿勢情報と、から、これらのオブジェクトの様子を示す画像を生成して、フレームメモリに出力する(ステップS514)。このように処理を行うことによって、垂直同期割り込みと同じ周期で、3次元グラフィックス画像が生成され、フレームメモリに蓄積される。   If it occurs (step S513; Yes), the output unit 206 stores the position information of the end points 303 of the plurality of line segment objects 302 stored in the storage unit 202, the shape, the position of the plurality of obstacle objects 402, and From the posture information, an image showing the state of these objects is generated and output to the frame memory (step S514). By performing the processing in this way, a three-dimensional graphics image is generated and stored in the frame memory at the same cycle as the vertical synchronization interrupt.

フレームメモリに記憶された画像情報は、垂直同期割り込みの周期でビデオ信号に変換され画像処理部107に接続されるモニタへ出力される。これによって、本シミュレーション装置201により生成された仮想3次元空間の様子が、画面にアニメーション表示されることになる。   The image information stored in the frame memory is converted into a video signal at the period of the vertical synchronization interrupt and output to a monitor connected to the image processing unit 107. As a result, the state of the virtual three-dimensional space generated by the simulation apparatus 201 is displayed as an animation on the screen.

ステップS514の処理終了後、もしくは、垂直同期割り込みが発生していない場合(ステップS513;No)、今回の繰返しの開始時点であるステップS502からの経過時間を取得し、当該経過時間が当該所定の微小時間dtとなるまで待機して(ステップS515)、ステップS502に戻る。当該待機時間の間には、たとえば、ユーザからの指示入力をチェックしたりする等、他の必要な処理を適宜実行することができる。   After the process of step S514 is completed or when a vertical synchronization interrupt has not occurred (step S513; No), the elapsed time from step S502, which is the start point of the current iteration, is acquired, and the elapsed time is the predetermined time. Wait until the minute time dt is reached (step S515), and return to step S502. During the waiting time, for example, other necessary processing such as checking an instruction input from the user can be appropriately executed.

これによって、微小時間dtが、更新部204による更新の時間間隔(すなわち、補正部205による補正の時間間隔)に等しくなるため、現実の時間が経過するのに合わせて、記憶部202に記憶されるオブジェクトの形状、位置、速度、姿勢情報が変化することとなる。したがって、垂直同期割り込みごとに画面表示を行えば、仮想3次元空間内の各オブジェクトが運動する様を、現実世界のものと同様に提示することができる。   As a result, the minute time dt becomes equal to the time interval for updating by the updating unit 204 (that is, the time interval for correcting by the correcting unit 205), and is stored in the storage unit 202 as the actual time elapses. The shape, position, speed, and posture information of the object to be changed will change. Therefore, if the screen display is performed for each vertical synchronization interrupt, it is possible to present the movement of each object in the virtual three-dimensional space in the same way as in the real world.

このように、本実施形態では、仮想3次元空間において、布状のオブジェクトが、ある形状を有するオブジェクトと衝突する様子をシミュレートすることができるようになる。   As described above, in the present embodiment, it is possible to simulate a state in which a cloth-like object collides with an object having a certain shape in a virtual three-dimensional space.

さて、上記の説明では、端点303の位置の補正の処理の繰り返し(ステップS508〜S512)は、常に、すべての端点303について処理を行っていた。しかしながら、端点303の位置補正の計算は、一般に重い処理となることが多い。そこで、以下では、位置補正の処理をうまく省略する技術について説明する。   In the above description, the process of correcting the position of the end point 303 (steps S508 to S512) is always performed for all end points 303. However, calculation of the position correction of the end point 303 is generally a heavy process. In the following, a technique for successfully omitting the position correction process will be described.

すなわち、補正部205は、更新部204による更新が出力部206により画像が生成される直前の更新である場合、端点の全部を補正の対象とし、そうでない場合は、端点の一部を補正の対象とするのである。   That is, when the update by the update unit 204 is an update immediately before an image is generated by the output unit 206, the correction unit 205 sets all of the end points as correction targets; otherwise, the correction unit 205 corrects some of the end points. It is targeted.

端点の一部を選択する手法としては、以下のようなものが考えられる。まず、微小時間dtを垂直同期割り込みの周期の1/(m+1)倍(mは2以上の整数)に等しいものとする。   The following can be considered as a method for selecting a part of the end points. First, it is assumed that the minute time dt is equal to 1 / (m + 1) times the vertical synchronization interrupt cycle (m is an integer of 2 or more).

そして、端点303をm個のグループに分類する。この際、線分状オブジェクト302を介して互いに隣り合う端点303は、できるだけ異なるグループに属するように分類することが望ましい。また、端点303は、複数のグループに重複して含まれることとしても良い。   Then, the end points 303 are classified into m groups. At this time, it is desirable to classify the end points 303 adjacent to each other via the line-shaped object 302 so as to belong to different groups as much as possible. The end point 303 may be included in a plurality of groups.

また、i (1≦i≦m)番目のグループに含まれる端点303は、これによってモデル化される布状の物体にできるだけ均一に分散することが望ましい。上記のようにdtを決めると、1回の垂直同期周期の間に、更新はm+1回行われることになる。   Further, it is desirable that the end points 303 included in the i (1 ≦ i ≦ m) -th group are dispersed as uniformly as possible in the cloth-like object modeled by the end points 303. When dt is determined as described above, the update is performed m + 1 times during one vertical synchronization period.

図8は、このような処理を行う場合の制御の流れを示すフローチャートであり、本制御の流れは、図5に示すものと共通するものが多いため、共通する部分については、同じステップ番号を採用することとし、以下、変更された部分を中心に図示して、共通する部分の大半は図示を省略している。   FIG. 8 is a flowchart showing the flow of control when such processing is performed. Since this control flow is often the same as that shown in FIG. 5, the same step numbers are used for the common parts. In the following description, the changed parts are mainly shown, and most of the common parts are not shown.

まず、ステップS501における初期化では、RAM 103に用意された整数カウンタ変数sに適当な整数定数Cを設定しておく(ステップS501)。   First, in the initialization in step S501, an appropriate integer constant C is set in the integer counter variable s prepared in the RAM 103 (step S501).

そして、線分状オブジェクト302の端点303の位置等の情報、および、障害物オブジェクト402の位置等の情報の更新(ステップS502〜ステップS507)が終了した後、前回の更新と、今回の更新との間に、垂直同期割り込みが発生したか否かを判定する(ステップS801)。   Then, after updating the information such as the position of the end point 303 of the line-shaped object 302 and the information such as the position of the obstacle object 402 (steps S502 to S507), the previous update, the current update, During this period, it is determined whether a vertical synchronization interrupt has occurred (step S801).

発生していた場合(ステップS801;Yes)、すべての端点303を処理対象として、ステップS508〜S512と同様の補正処理を行う(ステップS802)。さらに、出力部206に3次元グラフィックス画像情報を出力させ(ステップS514)、待機して(ステップS515)、ステップS502に戻る。   If it has occurred (step S801; Yes), the same correction processing as in steps S508 to S512 is performed on all end points 303 as processing targets (step S802). Further, the output unit 206 outputs the 3D graphics image information (step S514), waits (step S515), and returns to step S502.

一方、発生していなかった場合(ステップS801;No)、(s mod m) + 1番目のグループに属する端点303のみを処理対象として、ステップS508〜S512と同様の補正処理を行う(ステップS803)。ここで、s mod mは、sをmで割ったときの余りを意味する。   On the other hand, if it has not occurred (step S801; No), the same correction processing as that in steps S508 to S512 is performed on only the end point 303 belonging to (s mod m) + 1st group (step S803). . Here, s mod m means the remainder when s is divided by m.

そして、カウンタ変数sの値を1増やし(ステップS804)、ステップS515に進む。   Then, the value of the counter variable s is increased by 1 (step S804), and the process proceeds to step S515.

これによって、1回の垂直同期周期の間に、各グループに対する補正が1回行われ(合計m回行われ)、垂直同期割り込みが生じた直後にすべての端点に対する補正が1回行われることになる。   As a result, correction for each group is performed once (total m times) during one vertical synchronization period, and correction for all end points is performed once immediately after the vertical synchronization interrupt occurs. Become.

なお、dtを必ずしも垂直同期周期の1/(m+1)倍としなくとも良い。この場合は、カウンタ変数sの値に応じて、各グループに対する補正処理が均等に行われることになる。   Note that dt does not necessarily have to be 1 / (m + 1) times the vertical synchronization period. In this case, correction processing for each group is performed equally according to the value of the counter variable s.

本態様では、補正処理を適切に間引くことによって、他の処理にCPU時間をまわすことができるようになる一方で、画像出力直前では全端点について補正を行うので、端点が障害物にめり込む事態は生じない。したがって、計算量と正確さのトレードオフを適切に考慮したシミュレーションを行うことができるようになる。   In this aspect, by appropriately thinning out the correction process, the CPU time can be devoted to other processes, while the correction is performed for all end points immediately before image output, so that the end points are trapped in obstacles. Does not occur. Therefore, it is possible to perform a simulation that appropriately takes into account the trade-off between calculation amount and accuracy.

上記実施形態の一例においては、補正用オブジェクトの代表点(重心、中心等)の移動量のみを考慮し、補正用オブジェクトの回転量については考慮せずに、補正用オブジェクトに対する端点の移動の軌跡を求め、当該軌跡と補正用オブジェクトの表面の交点を求めて、端点の位置を当該交点に移動していた。   In an example of the above embodiment, only the movement amount of the representative point (centroid, center, etc.) of the correction object is considered, and the end point movement locus with respect to the correction object is not considered without considering the rotation amount of the correction object. Then, the intersection of the locus and the surface of the correction object is obtained, and the position of the end point is moved to the intersection.

本実施形態は、上記実施形態と同様の構成を採用するが、交点を求める際に、補正用オブジェクトの回転量も考慮する点が異なる。   This embodiment employs the same configuration as that of the above embodiment, but differs in that the amount of rotation of the correction object is also taken into account when obtaining the intersection.

図9は、上記実施形態と本実施形態における、交点の求め方を説明する説明図である。なお、本図では、理解を容易にするため、各移動量や回転量は、誇張して記載してある。   FIG. 9 is an explanatory diagram for explaining how to obtain the intersection point in the above embodiment and this embodiment. In this figure, each movement amount and rotation amount are exaggerated for easy understanding.

図9(a)には、端点303と補正用オブジェクト601の移動の様子を示す。図9(a)に示すように、端点303の移動前の位置901は、補正用オブジェクト601の移動前の位置911の外側にある。そして、端点303は移動後の位置902は、補正用オブジェクト601の移動後の位置912の内部に包含されることとなっている。そして、補正用オブジェクト601の移動前の位置911と移動後の位置912では、補正用オブジェクトは回転している。理解を容易にするため、移動前の位置は実線で、移動後の位置は1点破線で、それぞれ示している。   FIG. 9A shows the movement of the end point 303 and the correction object 601. As shown in FIG. 9A, the position 901 before the end point 303 is moved is outside the position 911 before the correction object 601 is moved. Further, the position 902 after the movement of the end point 303 is included in the position 912 after the movement of the correction object 601. The correction object rotates at a position 911 before and after the movement of the correction object 601. In order to facilitate understanding, the position before movement is indicated by a solid line, and the position after movement is indicated by a one-dot broken line.

図9(b)は、上記実施形態における交点の求め方を示すものである。すなわち、補正用オブジェクト601の移動後の位置912にかえて、補正用オブジェクト601は移動に際して回転しないものと近似して、その中心を平行移動した位置913(図中細い点線で示す。)に移動させる。   FIG. 9B shows how to obtain the intersection point in the above embodiment. That is, instead of the position 912 after the movement of the correction object 601, the correction object 601 approximates that it does not rotate during movement, and moves to the position 913 (indicated by a thin dotted line in the drawing) whose center has been translated. Let

そして、位置911から位置913への移動ベクトルと同じ量だけ、端点303の移動前の位置901を移動させ、位置902と位置903を結ぶ線分と、位置913に移動した補正用オブジェクト601との交点921を、端点303の補正後の位置とする(この位置は、補正用オブジェクト601を基準としている)。   Then, the position 901 before the end point 303 is moved by the same amount as the movement vector from the position 911 to the position 913, and the line segment connecting the position 902 and the position 903 and the correction object 601 moved to the position 913 are The intersection 921 is set as a corrected position of the end point 303 (this position is based on the correction object 601).

図9(c)は、本実施形態における交点の求め方を示すものである。すなわち、移動前の位置911における補正用オブジェクト601に対して、端点303の移動前の位置901の相対的な位置を考える(図中矢印と細い一点破線)。   FIG. 9C shows how to obtain the intersection point in the present embodiment. That is, the relative position of the position 901 before the end point 303 is moved with respect to the correction object 601 at the position 911 before the movement is considered (an arrow and a thin one-dot broken line in the figure).

そして、このベクトル(図中、補正用オブジェクト601の中心から伸びる矢印)を、補正用オブジェクト601の移動量と回転量と同じだけ移動させる。これによって、微小時間が経過する前の端点303の補正用オブジェクト601に対する相対的な位置952が、(補正用オブジェクト601の微小時間経過後の移動先の位置912を基準として)求められる(図中矢印と細い一点破線の移動後)。   Then, this vector (in the drawing, an arrow extending from the center of the correction object 601) is moved by the same amount as the movement amount and the rotation amount of the correction object 601. As a result, the relative position 952 of the end point 303 with respect to the correction object 601 before the minute time elapses is obtained (based on the position 912 of the movement destination of the correction object 601 after the minute time has elapsed). After moving the arrow and thin dashed line).

そこで、位置902と位置952とを結ぶ線分と、位置912に移動した補正用オブジェクト601との交点953を、端点303の補正後の位置とする(この位置は、補正用オブジェクト601を基準としている)。   Therefore, an intersection 953 between the line segment connecting the position 902 and the position 952 and the correction object 601 moved to the position 912 is set as a corrected position of the end point 303 (this position is based on the correction object 601 as a reference). )

なお、回転移動と平行移動の順序を変えたり、方向を逆にするなどした本手法と均等な手法を採用することもできる。このようにして、補正用オブジェクト601の表面に得られる交点として同じ位置のものを得る手法は、いずれも本発明の範囲に含まれる。   It is also possible to adopt a method equivalent to the present method in which the order of rotational movement and parallel movement is changed or the direction is reversed. In this way, any method for obtaining the same position as the intersection obtained on the surface of the correction object 601 is included in the scope of the present invention.

本手法は、計算機の能力の制限から微小時間を長くとらざるを得ない場合や、上記実施形態のように本手法によれば、端点303の補正の間引きを行う場合に特に好適で、端点303が障害物オブジェクト402をすり抜けてしまうような状況を、できるだけ防止することができるようになる。   This method is particularly suitable when the minute time has to be long due to the limitation of the computer capacity, or when the correction of the end point 303 is performed according to the present method as in the above embodiment. It is possible to prevent as much as possible the situation in which the user passes through the obstacle object 402.

以上説明したように、布状体と当該布状体が交差しない障害物との仮想3次元空間における移動をシミュレートして、たとえばスカートが人の足にまとわりつくような状況を近似的に再現するのに好適な、シミュレーション装置、シミュレート方法、ならびに、これらをコンピュータにて実現するプログラムを提供することができ、たとえばゲームの分野において、上記のような状況の3次元グラフィックスを高速に表示する等に適用することができる。   As described above, the movement in the virtual three-dimensional space between the cloth body and the obstacle that does not intersect the cloth body is simulated, and for example, the situation where the skirt clings to the human foot is approximately reproduced. Simulation apparatus, simulation method, and program that realizes these on a computer can be provided. For example, in the field of games, three-dimensional graphics in the above situation can be displayed at high speed. Etc. can be applied.

本発明の実施形態の1つに係るシミュレーション装置が実現される典型的な情報処理装置の概要構成を示す説明図である。It is explanatory drawing which shows schematic structure of the typical information processing apparatus with which the simulation apparatus which concerns on one of embodiment of this invention is implement | achieved. 本発明の実施形態の1つに係るシミュレーション装置の概要構成を示す模式図である。It is a mimetic diagram showing the outline composition of the simulation device concerning one of the embodiments of the present invention. 線分状オブジェクトとその端点の様子を示す説明図である。It is explanatory drawing which shows the mode of a line-shaped object and its end point. 仮想3次元空間内における障害物オブジェクトと線分状オブジェクトの関係を示す説明図である。It is explanatory drawing which shows the relationship between the obstruction object and line segment object in virtual three-dimensional space. 本実施形態におけるシミュレーション処理の制御の流れを示す模式図である。It is a schematic diagram which shows the flow of control of the simulation process in this embodiment. 補正用オブジェクトと、端点の補正前の位置と、補正後の位置との関係を示す説明図である。It is explanatory drawing which shows the relationship between the object for a correction | amendment, the position before correction | amendment of an end point, and the position after correction | amendment. 補正用オブジェクトと、端点の補正前の位置と、補正後の位置との関係を示す説明図である。It is explanatory drawing which shows the relationship between the object for a correction | amendment, the position before correction | amendment of an end point, and the position after correction | amendment. 本実施形態におけるシミュレーション処理の制御の流れを示す模式図である。It is a schematic diagram which shows the flow of control of the simulation process in this embodiment. 本発明の実施形態における補正において交点を求める手法を説明する説明図である。It is explanatory drawing explaining the method of calculating | requiring an intersection in the correction | amendment in embodiment of this invention.

符号の説明Explanation of symbols

100 情報処理装置
101 CPU
102 ROM
103 RAM
104 インターフェイス
105 コントローラ
106 外部メモリ
107 画像処理部
108 DVD−ROMドライブ
109 NIC
110 音声処理部
111 マイク
201 シミュレーション装置
202 記憶部
203 計算部
204 更新部
205 補正部
206 出力部
301 布状の物体のモデル
302 線分状オブジェクト
303 端点
401 仮想3次元空間
402 障害物オブジェクト
412 腿
413 膝の関節
414 脛
415 足首の関節
416 足先
601 補正用オブジェクト
602 補正前の位置
603 交点(補正後の位置の候補)
604 交点から進んだ位置(補正後の位置の候補)
611 球の中心
612 多面体の面
613 垂線
614 円柱の中心軸
615 半直線
621 線分
622 半直線
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 Audio | voice processing part 111 Microphone 201 Simulation apparatus 202 Storage part 203 Calculation part 204 Update part 205 Correction part 206 Output part 301 Cloth-like object model 302 Line segment object 303 End point 401 Virtual three-dimensional space 402 Obstacle object 412 Thigh 413 Knee joint 414 Tibi 415 Ankle joint 416 Foot tip 601 Correction object 602 Position before correction 603 Intersection (candidate position after correction)
604 Position advanced from intersection (candidate position after correction)
611 Center of sphere 612 Surface of polyhedron 613 Perpendicular line 614 Center axis of cylinder 615 Half line 621 Line segment 622 Half line

Claims (12)

伸縮する複数の線分状オブジェクトと、当該複数の線分状オブジェクトのいずれとも交差すべきでない複数の障害物オブジェクトと、が仮想3次元空間内で移動する様子をシミュレートするシミュレーション装置であって、
当該複数の線分状オブジェクトの端点の位置情報と、当該複数の障害物オブジェクトの形状、位置および姿勢情報と、を記憶し、当該複数の端点のそれぞれに、当該複数の障害物オブジェクトのいずれかを補正用オブジェクトとして対応付けて記憶する記憶部、
前記記憶部に記憶された当該複数の端点のそれぞれの位置情報から、当該端点同士を結ぶ線分状オブジェクトの張力を計算し、当該計算された張力によって当該端点が所定の微小時間の後に移動すべき位置を計算し、前記記憶部に記憶された当該複数の障害物オブジェクトのそれぞれの形状、位置および姿勢情報から、当該障害物オブジェクトが当該所定の微小時間の後にとるべき形状、位置および姿勢を所定の規則に基づいて計算する計算部、
当該複数の端点のそれぞれが当該微小時間の後に移動すべきと前記計算された位置を、当該線分状オブジェクトの端点の位置情報として前記記憶部に記憶させ、当該複数の障害物オブジェクトのそれぞれが当該微小時間の後にとるべき形状、位置および姿勢を当該障害物オブジェクトの形状、位置および姿勢情報として前記記憶部に記憶させて、前記記憶部に記憶される情報を当該微小時間の後の情報に更新する更新部、
前記更新部による更新が行われる毎に、当該複数の端点の一部または全部を補正の対象とし、当該補正の対象となる端点が当該複数の障害物オブジェクトのいずれかに包含されるか否かを判断し、包含される場合、当該包含される端点の位置を、当該端点に対応付けられて前記記憶部に記憶される補正用オブジェクトの形状、位置および姿勢情報により、補正した位置を、当該端点の位置情報として前記記憶部に記憶させ、前記記憶部に記憶される情報を補正する補正部、
前記記憶部に記憶される当該複数の線分状オブジェクトの端点の位置情報と、当該複数の障害物オブジェクトの形状、位置および姿勢情報と、から、これらのオブジェクトの様子を示す画像を所定の周期で生成して出力する出力部
を備え、
当該所定の周期は当該所定の微小時間の2倍以上の長さであり、
前記補正部は、前記更新部による更新が前記出力部により画像が生成される直前の更新である場合、当該複数の端点の全部を補正の対象として補正を行い、前記更新部による更新が前記出力部により画像が生成される直前の更新でない場合、当該複数の端点の一部を補正の対象として補正を行う
ことを特徴とするシミュレーション装置。
A simulation device for simulating a state in which a plurality of line-shaped objects that expand and contract and a plurality of obstacle objects that should not intersect any of the plurality of line-shaped objects move in a virtual three-dimensional space. ,
The position information of the end points of the plurality of line segment objects and the shape, position, and posture information of the plurality of obstacle objects are stored, and each of the plurality of obstacle objects is stored in each of the plurality of end points. Is stored in association with the correction object,
Based on the position information of each of the plurality of end points stored in the storage unit, the tension of the line-shaped object connecting the end points is calculated, and the end point moves after a predetermined minute time by the calculated tension. The power position is calculated, and the shape, position, and posture that the obstacle object should take after the predetermined minute time are determined from the shape, position, and posture information of the plurality of obstacle objects stored in the storage unit. A calculation unit that calculates based on predetermined rules,
The calculated position that each of the plurality of end points should move after the minute time is stored in the storage unit as position information of the end points of the line segment object, and each of the plurality of obstacle objects The shape, position and orientation to be taken after the minute time are stored in the storage unit as the shape, position and posture information of the obstacle object, and the information stored in the storage unit is stored as information after the minute time. Update part to update,
Whether or not each of the plurality of end points is subject to correction each time the updating unit performs an update, and the end points to be corrected are included in any of the plurality of obstacle objects. If the position is included, the position of the included end point is corrected by the shape, position, and orientation information of the correction object stored in the storage unit in association with the end point. A correction unit that stores the position information of the end points in the storage unit and corrects the information stored in the storage unit;
From the position information of the end points of the plurality of line segment objects stored in the storage unit and the shape, position, and posture information of the plurality of obstacle objects, an image indicating the state of these objects is displayed in a predetermined cycle. With an output unit that generates and outputs
The predetermined period is at least twice as long as the predetermined minute time,
When the update by the update unit is an update immediately before an image is generated by the output unit, the correction unit corrects all of the plurality of end points, and the update by the update unit performs the output. When the update is not performed immediately before the image is generated by the unit, the correction is performed using a part of the plurality of end points as a correction target.
請求項1に記載のシミュレーション装置であって、整数m (2≦m)、整数i (1≦i≦m)について、
当該所定の周期は、当該所定の微小時間の(m+1)倍の長さであり、
当該複数の端点は、前記記憶部に、1番目からm番目までのm個のグループに分類されて記憶され、
前記更新部による更新が前記出力部により画像が生成される直前の更新(以下、「0番目の更新」という。)から数えてi番目の更新である場合、当該複数の端点のうち前記記憶部にi番目のグループに分類されて記憶される端点を補正の対象として補正を行う
ことを特徴とする物。
The simulation apparatus according to claim 1, wherein an integer m (2 ≦ m) and an integer i (1 ≦ i ≦ m) are
The predetermined period is a length of (m + 1) times the predetermined minute time,
The plurality of end points are classified and stored in m groups from the first to the m-th in the storage unit,
When the update by the update unit is the i-th update from the update immediately before the output unit generates an image (hereinafter referred to as “0th update”), the storage unit among the plurality of end points The correction is performed with the end points classified and stored in the i-th group as correction targets.
請求項1に記載のシミュレーション装置であって、整数m (2≦m)、整数s、定数の整数Cについて、
当該所定の周期は、当該所定の微小時間の(m+1)倍以上の長さであり、
当該複数の端点は、前記記憶部に、1番目からm番目までのm個のグループに分類されて記憶され、
前記更新部による更新が前記出力部により画像が生成される直前の更新でない更新のうち、s回目の更新である場合、当該複数の端点のうち前記記憶部に((s+C) mod m) + 1番目のグループに分類されて記憶される端点を補正の対象として補正を行う
ことを特徴とする物。
The simulation apparatus according to claim 1, wherein an integer m (2 ≦ m), an integer s, and a constant integer C,
The predetermined period is a length of (m + 1) times or more of the predetermined minute time,
The plurality of end points are classified and stored in m groups from the first to the m-th in the storage unit,
If the update by the update unit is not the update immediately before the image is generated by the output unit and is the s-th update, the storage unit among the plurality of end points ((s + C) mod m) + An object characterized in that correction is performed with the end points classified and stored in the first group as correction targets.
請求項2または3に記載のシミュレーション装置であって、
前記記憶部は、当該複数の端点のそれぞれについて、当該端点が、当該端点と線分状オブジェクトを介して隣接する他の端点とは、異なるグループに分類されるように記憶する
ことを特徴とする物。
The simulation apparatus according to claim 2 or 3, wherein
The storage unit stores, for each of the plurality of end points, the end points so as to be classified into different groups from the end points and other end points adjacent to each other via the line-shaped object. object.
請求項1から3のいずれか1項に記載のシミュレーション装置であって、
前記補正部は、当該補正の対象となる端点のそれぞれについて、当該端点の位置が、当該端点に対応付けられて前記記憶部に記憶される補正用オブジェクトの形状、位置および姿勢情報により、当該補正用オブジェクトに包含される場合、当該端点の更新前の位置を当該補正用オブジェクトの当該更新による移動と同じ方向に同じ距離だけ移動した位置と、当該端点の更新後の位置と、を結ぶ線分が、当該補正用オブジェクトの表面と交差する位置に、当該端点の位置を補正する
ことを特徴とする物。
The simulation apparatus according to any one of claims 1 to 3,
For each of the end points to be corrected, the correction unit corrects the position of the end point according to the shape, position, and orientation information of the correction object stored in the storage unit in association with the end point. A segment connecting the position before the end point is updated by the same distance in the same direction as the movement of the correction object and the position after the end point is updated. However, the object is characterized in that the position of the end point is corrected at a position that intersects the surface of the correction object.
請求項1から3のいずれか1項に記載のシミュレーション装置であって、
前記補正部は、当該補正の対象となる端点のそれぞれについて、当該端点の位置が、当該複数の障害物オブジェクトについて前記記憶部に記憶される形状、位置および姿勢情報により、当該複数の障害物オブジェクトのいずれかに包含される場合、当該端点の更新前の位置を当該補正用オブジェクトの当該更新による移動と同じ方向に同じ距離だけ移動した位置と、当該端点の更新後の位置と、を結ぶ線分が、当該補正用オブジェクトの表面と交差する位置に、当該端点の位置を補正する
ことを特徴とする物。
The simulation apparatus according to any one of claims 1 to 3,
The correction unit, for each of the end points to be corrected, the position of the end point is based on the shape, position, and orientation information stored in the storage unit for the plurality of obstacle objects. Included in any of the above, a line connecting a position where the position before the end point is updated by the same distance in the same direction as the movement of the correction object by the update and a position after the end point is updated An object in which the position of the end point is corrected at a position where the minute intersects the surface of the correction object.
請求項1から3のいずれか1項に記載のシミュレーション装置であって、
前記記憶部に記憶される補正用オブジェクトの形状が円柱である場合、
前記補正部は、当該補正用オブジェクトに対応付けられる端点の位置を補正する場合、当該円柱の中心軸のいずれかの点から開始され、当該中心軸に直交し、当該補正前の端点の位置を通過する半直線が、当該円柱の表面と交差する位置を、当該端点の補正後の位置とする
ことを特徴とする物。
The simulation apparatus according to any one of claims 1 to 3,
When the shape of the correction object stored in the storage unit is a cylinder,
When correcting the position of the end point associated with the correction object, the correction unit starts from any point on the central axis of the cylinder, is orthogonal to the central axis, and determines the position of the end point before the correction. An object characterized in that a position where a passing straight line intersects the surface of the cylinder is a corrected position of the end point.
請求項1から3のいずれか1項に記載のシミュレーション装置であって、
前記記憶部に記憶される補正用オブジェクトの形状が円柱である場合、
前記補正部は、当該補正用オブジェクトに対応付けられる端点の位置を補正する場合、当該円柱の中心軸のいずれかの点から開始され、当該中心軸に直交し、当該補正前の端点の位置を通過する半直線が、当該円柱の表面と交差する位置からさらに所定の微小距離だけ進んだ位置を、当該端点の補正後の位置とする
ことを特徴とする物。
The simulation apparatus according to any one of claims 1 to 3,
When the shape of the correction object stored in the storage unit is a cylinder,
When correcting the position of the end point associated with the correction object, the correction unit starts from any point on the central axis of the cylinder, is orthogonal to the central axis, and determines the position of the end point before the correction. An object characterized in that a position where a passing straight line further advances by a predetermined minute distance from a position intersecting the surface of the cylinder is a corrected position of the end point.
請求項1から3のいずれか1項に記載のシミュレーション装置であって、
前記記憶部に記憶される補正用オブジェクトの形状が多面体であり、当該多面体の面のうち、いずれか1つ以上が補正用面として設定される場合、
前記補正部は、当該補正用オブジェクトに対応付けられる端点の位置を補正する場合、当該多面体の補正用面として設定された面のうち、当該端点に最も近いものに下ろした垂線が当該側面と交差する位置を、当該端点の補正後の位置とする
ことを特徴とする物。
The simulation apparatus according to any one of claims 1 to 3,
When the shape of the object for correction stored in the storage unit is a polyhedron, and any one or more of the faces of the polyhedron is set as a correction surface,
When correcting the position of the end point associated with the correction object, the correction unit intersects the side surface with a perpendicular line that is closest to the end point among the surfaces set as the correction surface of the polyhedron. The position to be used is the position after correction of the end point.
請求項1から3のいずれか1項に記載のシミュレーション装置であって、
前記記憶部に記憶される補正用オブジェクトの形状が多面体であり、当該多面体の面のうち、いずれか1つ以上が補正用面として設定される場合、
前記補正部は、当該補正用オブジェクトに対応付けられる端点の位置を補正する場合、当該多面体の補正用面として設定された面のうち、当該端点に最も近いものに下ろした垂線が当該補正用面と交差する位置からさらに所定の微小距離だけ進んだ位置を、当該端点の補正後の位置とする
ことを特徴とする物。
The simulation apparatus according to any one of claims 1 to 3,
When the shape of the object for correction stored in the storage unit is a polyhedron, and any one or more of the faces of the polyhedron is set as a correction surface,
In the case where the correction unit corrects the position of the end point associated with the correction object, a vertical line that is the closest to the end point among the surfaces set as the correction surface of the polyhedron is the correction surface. A position that is further advanced by a predetermined minute distance from a position that intersects with the end point is a corrected position of the end point.
伸縮する複数の線分状オブジェクトと、当該複数の線分状オブジェクトのいずれとも交差すべきでない複数の障害物オブジェクトと、が仮想3次元空間内で移動する様子を模擬実験し、記憶部、計算部、更新部、補正部、出力部を備えるシミュレーション装置にて実行されるシミュレート方法であって、
前記記憶部には、当該複数の線分状オブジェクトの端点の位置情報と、当該複数の障害物オブジェクトの形状、位置および姿勢情報と、が記憶され、当該複数の端点のそれぞれが当該複数の障害物オブジェクトのいずれかに補正用オブジェクトとして対応付けて記憶され、
前記計算部が、前記記憶部に記憶された当該複数の端点のそれぞれの位置情報から、当該端点同士を結ぶ線分状オブジェクトの張力を計算し、当該計算された張力によって当該端点が所定の微小時間の後に移動すべき位置を計算し、前記記憶部に記憶された当該複数の障害物オブジェクトのそれぞれの形状、位置および姿勢情報から、当該障害物オブジェクトが当該所定の微小時間の後にとるべき形状、位置および姿勢を所定の規則に基づいて計算する計算工程、
前記更新部が、当該複数の端点のそれぞれが当該微小時間の後に移動すべきと前記計算された位置を、当該線分状オブジェクトの端点の位置情報として前記記憶部に記憶させ、当該複数の障害物オブジェクトのそれぞれが当該微小時間の後にとるべき形状、位置および姿勢を当該障害物オブジェクトの形状、位置および姿勢情報として前記記憶部に記憶させて、前記記憶部に記憶される情報を当該微小時間の後の情報に更新する更新工程、
前記補正部が、前記更新部による更新が行われる毎に、当該複数の端点の一部または全部を補正の対象とし、当該補正の対象となる端点が当該複数の障害物オブジェクトのいずれかに包含されるか否かを判断し、包含される場合、当該包含される端点の位置を、当該端点に対応付けられて前記記憶部に記憶される補正用オブジェクトの形状、位置および姿勢情報により、補正した位置を、当該端点の位置情報として前記記憶部に記憶させ、前記記憶部に記憶される情報を補正する補正工程、
前記出力部が、前記記憶部に記憶される当該複数の線分状オブジェクトの端点の位置情報と、当該複数の障害物オブジェクトの形状、位置および姿勢情報と、から、これらのオブジェクトの様子を示す画像を所定の周期で生成して出力する出力工程
を備え、
当該所定の周期は当該所定の微小時間の2倍以上の長さであり、
前記補正工程では、前記更新工程による更新が前記出力工程により画像が生成される直前の更新である場合、当該複数の端点の全部を補正の対象として補正を行い、前記更新部による更新が前記出力部により画像が生成される直前の更新でない場合、当該複数の端点の一部を補正の対象として補正を行う
ことを特徴とする方法。
Simulating and experimenting how a plurality of line-shaped objects that expand and contract and a plurality of obstacle objects that should not intersect any of the plurality of line-shaped objects move in a virtual three-dimensional space, a storage unit, and a calculation A simulation method that is executed by a simulation apparatus including a unit, an update unit, a correction unit, and an output unit,
The storage unit stores position information of the end points of the plurality of line-segment objects and shape, position, and posture information of the plurality of obstacle objects, and each of the plurality of end points is the plurality of obstacles. Stored in association with one of the object objects as a correction object,
The calculation unit calculates the tension of the line-shaped object connecting the end points from the position information of the plurality of end points stored in the storage unit, and the end point is determined to be a predetermined minute amount by the calculated tension. The position that should be moved after time is calculated, and the shape that the obstacle object should take after the predetermined minute time from the shape, position, and orientation information of the plurality of obstacle objects stored in the storage unit A calculation process for calculating the position and orientation based on a predetermined rule;
The update unit causes the storage unit to store the calculated position that each of the plurality of end points should move after the minute time as position information of the end points of the line-shaped object, and the plurality of faults The shape, position, and posture that each object object should take after the minute time are stored in the storage unit as shape, position, and posture information of the obstacle object, and the information stored in the storage unit is stored in the minute time. Update process to update to later information,
Each time the correction unit is updated by the updating unit, a part or all of the plurality of end points are set as correction targets, and the end points to be corrected are included in any of the plurality of obstacle objects. If it is included, the position of the included end point is corrected based on the shape, position, and orientation information of the correction object stored in the storage unit in association with the end point. A correction step of storing the stored position in the storage unit as position information of the end point, and correcting the information stored in the storage unit,
The output unit shows the state of the end points of the plurality of line-shaped objects stored in the storage unit and the shape, position, and orientation information of the plurality of obstacle objects. An output process for generating and outputting images at a predetermined cycle;
The predetermined period is at least twice as long as the predetermined minute time,
In the correction step, when the update in the update step is an update immediately before an image is generated in the output step, correction is performed using all of the plurality of end points as correction targets, and the update by the update unit is performed in the output When the update is not performed immediately before the image is generated by the unit, the correction is performed by correcting a part of the plurality of end points.
コンピュータに、伸縮する複数の線分状オブジェクトと、当該複数の線分状オブジェクトのいずれとも交差すべきでない複数の障害物オブジェクトと、が仮想3次元空間内で移動する様子を模擬実験させるプログラムであって、当該プログラムは、当該コンピュータを、
当該複数の線分状オブジェクトの端点の位置情報と、当該複数の障害物オブジェクトの形状、位置および姿勢情報と、を記憶し、当該複数の端点のそれぞれに、当該複数の障害物オブジェクトのいずれかを補正用オブジェクトとして対応付けて記憶する記憶部、
前記記憶部に記憶された当該複数の端点のそれぞれの位置情報から、当該端点同士を結ぶ線分状オブジェクトの張力を計算し、当該計算された張力によって当該端点が所定の微小時間の後に移動すべき位置を計算し、前記記憶部に記憶された当該複数の障害物オブジェクトのそれぞれの形状、位置および姿勢情報から、当該障害物オブジェクトが当該所定の微小時間の後にとるべき形状、位置および姿勢を所定の規則に基づいて計算する計算部、
当該複数の端点のそれぞれが当該微小時間の後に移動すべきと前記計算された位置を、当該線分状オブジェクトの端点の位置情報として前記記憶部に記憶させ、当該複数の障害物オブジェクトのそれぞれが当該微小時間の後にとるべき形状、位置および姿勢を当該障害物オブジェクトの形状、位置および姿勢情報として前記記憶部に記憶させて、前記記憶部に記憶される情報を当該微小時間の後の情報に更新する更新部、
前記更新部による更新が行われる毎に、当該複数の端点の一部または全部を補正の対象とし、当該補正の対象となる端点が当該複数の障害物オブジェクトのいずれかに包含されるか否かを判断し、包含される場合、当該包含される端点の位置を、当該端点に対応付けられて前記記憶部に記憶される補正用オブジェクトの形状、位置および姿勢情報により、補正した位置を、当該端点の位置情報として前記記憶部に記憶させ、前記記憶部に記憶される情報を補正する補正部、
前記記憶部に記憶される当該複数の線分状オブジェクトの端点の位置情報と、当該複数の障害物オブジェクトの形状、位置および姿勢情報と、から、これらのオブジェクトの様子を示す画像を所定の周期で生成して出力する出力部
として機能させ、
当該所定の周期は当該所定の微小時間の2倍以上の長さであり、
前記補正部は、前記更新部による更新が前記出力部により画像が生成される直前の更新である場合、当該複数の端点の全部を補正の対象として補正を行い、前記更新部による更新が前記出力部により画像が生成される直前の更新でない場合、当該複数の端点の一部を補正の対象として補正を行う
ように機能させることを特徴とするプログラム。
A program that causes a computer to simulate a situation in which a plurality of line-segment objects that expand and contract and a plurality of obstacle objects that should not intersect any of the plurality of line-segment objects move in a virtual three-dimensional space. And the program runs the computer,
The position information of the end points of the plurality of line segment objects and the shape, position, and posture information of the plurality of obstacle objects are stored, and each of the plurality of obstacle objects is stored in each of the plurality of end points. Is stored in association with the correction object,
From the position information of each of the plurality of end points stored in the storage unit, the tension of the line-shaped object connecting the end points is calculated, and the end point moves after a predetermined minute time by the calculated tension. The power position is calculated, and the shape, position, and posture that the obstacle object should take after the predetermined minute time are determined from the shape, position, and posture information of the plurality of obstacle objects stored in the storage unit. A calculation unit that calculates based on predetermined rules,
The calculated position that each of the plurality of end points should move after the minute time is stored in the storage unit as position information of the end points of the line segment object, and each of the plurality of obstacle objects The shape, position and orientation to be taken after the minute time are stored in the storage unit as the shape, position and posture information of the obstacle object, and the information stored in the storage unit is stored as information after the minute time. Update part to update,
Whether or not each of the plurality of end points is subject to correction each time the updating unit performs an update, and the end points to be corrected are included in any of the plurality of obstacle objects. If the position is included, the position of the included end point is corrected by the shape, position, and orientation information of the correction object stored in the storage unit in association with the end point. A correction unit that stores the position information of the end points in the storage unit and corrects the information stored in the storage unit;
From the position information of the end points of the plurality of line segment objects stored in the storage unit and the shape, position, and posture information of the plurality of obstacle objects, an image indicating the state of these objects is displayed in a predetermined cycle. Function as an output unit that generates and outputs in
The predetermined period is at least twice as long as the predetermined minute time,
When the update by the update unit is an update immediately before an image is generated by the output unit, the correction unit corrects all of the plurality of end points, and the update by the update unit performs the output. When the update is not performed immediately before the image is generated by the unit, the program functions to correct a part of the plurality of end points as correction targets.
JP2004339348A 2004-11-24 2004-11-24 Simulation apparatus, simulation method, and program Expired - Fee Related JP4068093B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004339348A JP4068093B2 (en) 2004-11-24 2004-11-24 Simulation apparatus, simulation method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004339348A JP4068093B2 (en) 2004-11-24 2004-11-24 Simulation apparatus, simulation method, and program

Publications (2)

Publication Number Publication Date
JP2006146806A JP2006146806A (en) 2006-06-08
JP4068093B2 true JP4068093B2 (en) 2008-03-26

Family

ID=36626386

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004339348A Expired - Fee Related JP4068093B2 (en) 2004-11-24 2004-11-24 Simulation apparatus, simulation method, and program

Country Status (1)

Country Link
JP (1) JP4068093B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7049515B1 (en) * 2021-11-11 2022-04-06 株式会社Cygames Information processing equipment, programs and drawing methods

Also Published As

Publication number Publication date
JP2006146806A (en) 2006-06-08

Similar Documents

Publication Publication Date Title
US9990754B1 (en) System for rendering using position based finite element simulation
CN107067451B (en) Method and device for realizing dynamic skeleton in animation
JP4972734B2 (en) Musculoskeletal shape skinning
JP4425890B2 (en) Simulation apparatus, simulation method, and program
JP4037889B2 (en) Image generating apparatus, image generating method, and program
JP3926307B2 (en) Three-dimensional image drawing apparatus and method, program, and recording medium
KR20070041788A (en) Image processor, image processing method, information recording medium, and program
JP3542795B1 (en) Simulation experiment apparatus, simulation experiment method, and program
Burgoon et al. Discrete shells origami
EP1208884B1 (en) Animated image generating method and apparatus, readable storage medium storing animated image processing program and video game system
JP4113179B2 (en) Simulation apparatus, simulation method, and program
JP4068093B2 (en) Simulation apparatus, simulation method, and program
EP1288866B1 (en) Image generation method
JP4815521B2 (en) Image processing apparatus, image processing method, and program
JP4210293B2 (en) Simulation apparatus, simulation method, and program
JP4579964B2 (en) Image generating apparatus, image generating method, and program
JP2000268193A (en) Image creating device, image creating method, readable recording medium in which image creation program is recorded and video game device
JP4457099B2 (en) Image processing apparatus, image processing method, and program
JP5155262B2 (en) Image generating apparatus, image generating method, and program
JP3872032B2 (en) Image generation program, image generation apparatus, image generation method, and video game apparatus
JP4229316B2 (en) Image generation system, program, and information storage medium
JP2001276414A (en) Game device and information memory medium
JP4287479B2 (en) Image generating apparatus, image generating method, and program
JP4726355B2 (en) Image processing apparatus and image processing program
JP5255610B2 (en) GAME DEVICE, GAME DEVICE CONTROL METHOD, AND PROGRAM

Legal Events

Date Code Title Description
A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20060427

RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20060525

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: 20080108

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20080109

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

Free format text: PAYMENT UNTIL: 20110118

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees