JP2009070340A - Skeleton operation control system, program, and information storage medium - Google Patents

Skeleton operation control system, program, and information storage medium Download PDF

Info

Publication number
JP2009070340A
JP2009070340A JP2007241030A JP2007241030A JP2009070340A JP 2009070340 A JP2009070340 A JP 2009070340A JP 2007241030 A JP2007241030 A JP 2007241030A JP 2007241030 A JP2007241030 A JP 2007241030A JP 2009070340 A JP2009070340 A JP 2009070340A
Authority
JP
Japan
Prior art keywords
point
movable range
joint
skeleton
axis
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2007241030A
Other languages
Japanese (ja)
Inventor
Kentaro Yamaguchi
兼太郎 山口
Masanori Yamada
昌紀 山田
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.)
Bandai Namco Entertainment Inc
Original Assignee
Namco Bandai Games Inc
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 Namco Bandai Games Inc filed Critical Namco Bandai Games Inc
Priority to JP2007241030A priority Critical patent/JP2009070340A/en
Publication of JP2009070340A publication Critical patent/JP2009070340A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Generation (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a skeleton operation control system capable of securing a sufficient movable range of joints with a high degree of freedom to attain smooth operation expression of a character, and to provide a program and an information storage medium. <P>SOLUTION: The skeleton operation control system controls the operation of a skeleton model with a master bone and a slave bone connected by a joint. A movable range setting section 112 sets a given point on a spherical surface with the joint as a center point, as a focus, sets a plane orthogonal to an axis connecting the focus to the center point corresponding to the joint, as a projective plane, and sets the movable range of the joint on the projective plane. A coordinate conversion section 112B projects a point indicating the direction of the slave bone on the spherical surface, on the projective plane based on the focus. A skeleton operation computing section 112C computes the direction of the slave bone with respect to the master bone under the limitation of the movable range set by the movable range setting section 112A based on the position of the point projected on the projective plane. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、骨格動作制御システム、プログラムおよび情報記憶媒体に関する。   The present invention relates to a skeletal motion control system, a program, and an information storage medium.

従来より、仮想3次元空間(オブジェクト空間)におけるキャラクタ(例えば、人、動物)、ロープ、布などの動作を、骨格モデル(スケルトンモデル)を用いて演算する手法が知られている。骨格モデルは、複数の骨を関節で連結することにより構成されており、一般的に骨同士に親子関係が設定され、親骨の動作に追従するように子骨の動作を決定する演算を行っている。   2. Description of the Related Art Conventionally, there has been known a method for calculating a motion of a character (for example, a person, an animal), a rope, a cloth, and the like in a virtual three-dimensional space (object space) using a skeleton model (skeleton model). The skeletal model is composed by connecting multiple bones with joints. Generally, a parent-child relationship is set between the bones, and the operation of determining the movement of the skeleton is performed so as to follow the movement of the parent bone. Yes.

そして、このような骨格モデルでは、関節毎に自由度が異なっていたり、関節毎に可動範囲が異なっていたりする。例えば、人体モデルにおける肘や膝に相当する関節では自由度が低く、可動範囲が狭くなりやすい傾向にあり、肩などに相当する関節では自由度が高く、可動範囲が広くなりやすい傾向にある。   In such a skeleton model, the degree of freedom differs for each joint, and the movable range differs for each joint. For example, joints corresponding to elbows and knees in a human body model tend to have a low degree of freedom and the movable range tends to be narrow, and joints corresponding to shoulders and the like have a high degree of freedom and tend to be widened.

また親骨の動作に対応する子骨の動作を演算する際には、関節における親骨に対する子骨の曲げ状態や親骨に対する子骨の捻り状態といった回転情報を演算する処理が行われており、従来の手法では、親骨に対する子骨の向きを親骨の座標系を基準とした3軸(x,y,z)の各軸周りの回転角度で表現するようにしていた。
特開2000−306116号公報
Further, when calculating the movement of the skeleton corresponding to the movement of the parent bone, a process for calculating rotation information such as the bending state of the skeleton relative to the parent bone and the twisting state of the skeleton relative to the parent bone at the joint is performed. In the technique, the orientation of the skeleton with respect to the parent bone is expressed by rotation angles around three axes (x, y, z) with respect to the parent bone coordinate system.
JP 2000-306116 A

しかしながら、従来の手法を単純に適用して骨格モデルの動作を設計した場合、関節の可動範囲を広い範囲で設定しようとすると、動作設計者の意図とはかけ離れたいびつな範囲で関節の可動範囲が設定されてしまうという現状があり、滑らかなキャラクタの動作を表現することが難しいという課題があった。   However, when the motion of the skeletal model is designed by simply applying the conventional method, if the motion range of the joint is set in a wide range, the motion range of the joint is far from the intention of the motion designer. However, there is a problem that it is difficult to express a smooth character motion.

本発明は上記事情に鑑みてなされたものであり、その目的は、関節の可動範囲を十分に確保して滑らかなキャラクタの動作表現を可能とする骨格動作制御システム、プログラムおよび情報記憶媒体を提供することにある。   The present invention has been made in view of the above circumstances, and an object of the present invention is to provide a skeletal motion control system, a program, and an information storage medium that can ensure a smooth motion of a character by sufficiently securing a movable range of joints. There is to do.

(1)本発明は、親骨と子骨とが関節によって連結された骨格モデルの動作を制御するためのプログラムであって、関節を中心点とする球面上の所与の点を焦点とし、該中心点と該焦点とを結ぶ軸に直交する平面を射影面とし、前記関節の可動範囲を、前記射影面上において設定する可動範囲設定部と、前記球面上において前記子骨の向きを表す点を前記焦点に基づいて前記射影面上に射影する座標変換部と、前記射影面上に射影された点の位置に基づいて、前記可動範囲の制限下で、前記親骨に対する前記子骨の向きを演算する骨格動作演算部と、を含む骨格動作制御システムに関するものである。また本発明は、上記各部としてコンピュータを機能させるプログラム及びそのようなプログラムを記憶するコンピュータに読み取り可能な情報記憶媒体に関するものである。   (1) The present invention is a program for controlling the operation of a skeletal model in which a parent bone and a child bone are connected by a joint, and focuses on a given point on a sphere centered on the joint, A plane perpendicular to the axis connecting the center point and the focal point is a projection plane, a movable range setting unit for setting the movable range of the joint on the projected plane, and a point representing the orientation of the skeleton on the spherical surface And a coordinate conversion unit that projects onto the projection surface based on the focal point, and a position of the point projected on the projection surface, and the orientation of the child bone relative to the parent bone is limited under the movable range. The present invention relates to a skeletal motion control system including a skeletal motion calculation unit that calculates. The present invention also relates to a program that causes a computer to function as each of the above-described units and a computer-readable information storage medium that stores such a program.

本発明における「球面上において子骨の向きを表す点」は、例えば、子骨あるいは子骨の延長線と球面の交点とすることができる。   The “point indicating the orientation of the skeleton on the spherical surface” in the present invention can be, for example, the intersection of the skeleton or the extension line of the skeleton and the spherical surface.

本発明によれば、射影を用いて球面上の点を射影面上に座標変換して可動範囲を設定することによって、従来における関節の可動範囲を設定する手法に比べて、関節の可動範囲を広範囲かつ整然とした範囲で設定することができ、滑らかに骨格モデルを動作させる演算を実現することができるようになる。例えば、可動範囲の狭い関節については、従来から慣用されてきた方式と同等の制限によって骨格モデルを動作させることができ、可動範囲の広い関節については、従来から慣用されてきた方式よりも自然で滑らかな骨格モデルの動作を表現できる。   According to the present invention, the range of motion of the joint can be reduced compared to the conventional method of setting the range of motion of the joint by converting the point on the spherical surface onto the projection surface using projection and setting the range of motion. It can be set in a wide range and orderly range, and an operation for smoothly operating the skeleton model can be realized. For example, for a joint with a narrow range of motion, the skeletal model can be operated with the same restrictions as a conventionally used method, and for a joint with a wide range of motion, it is more natural than the conventionally used method. It can express the behavior of a smooth skeleton model.

(2)本発明の骨格動作制御システム、プログラムおよび情報記憶媒体では、前記可動範囲設定部が、前記射影面上で矩形を成すように前記可動範囲を設定するようにしてもよい。   (2) In the skeletal motion control system, the program, and the information storage medium of the present invention, the movable range setting unit may set the movable range so as to form a rectangle on the projection surface.

このようにすれば、関節の可動範囲が把握しやすく、かつ従来から慣用されてきた方式と同等の感覚で骨格モデルの動作設計をすることができるため、骨格モデルの動作設計の環境を向上させることができる。   In this way, the motion range of the joint can be easily grasped, and the motion design of the skeleton model can be designed with the same feeling as the conventionally used method, so the environment of the skeletal model motion design is improved. be able to.

(3)本発明の骨格動作制御システム、プログラムおよび情報記憶媒体では、前記可動範囲設定部が、前記射影面上で楕円形を成すように前記可動範囲を設定するようにしてもよい。   (3) In the skeletal motion control system, the program, and the information storage medium of the present invention, the movable range setting unit may set the movable range so as to form an ellipse on the projection plane.

このようにすれば、関節の可動範囲が把握しやすく、かつ従来から慣用されてきた方式と同等の感覚で骨格モデルの動作設計をすることができるため、骨格モデルの動作設計の環境を向上させることができる。   In this way, the motion range of the joint can be easily grasped, and the motion design of the skeleton model can be designed with the same feeling as the conventionally used method, so the environment of the skeletal model motion design is improved. be able to.

(4)本発明の骨格動作制御システム、プログラムおよび情報記憶媒体では、前記可動範囲設定部が、前記射影面上で小判形を成すように前記可動範囲を設定するようにしてもよい。   (4) In the skeletal motion control system, the program, and the information storage medium of the present invention, the movable range setting unit may set the movable range so as to form an oval shape on the projection plane.

このようにすれば、関節の可動範囲が把握しやすく、かつ従来から慣用されてきた方式と同等の感覚で骨格モデルの動作設計をすることができるため、骨格モデルの動作設計の環境を向上させることができる。   In this way, the motion range of the joint can be easily grasped, and the motion design of the skeleton model can be designed with the same feeling as the conventionally used method, so the environment of the skeletal model motion design is improved. be able to.

(5)本発明の骨格動作制御システム、プログラムおよび情報記憶媒体では、前記親骨に沿った軸が、x軸として設定され、前記親骨に直交し、かつ互いに直交する2つの軸が、それぞれy軸およびz軸として設定されており、前記射影面上に、互いに直交する座標軸が、それぞれs軸およびt軸として設定されており、前記座標変換部が、前記焦点を基準として、s=−z/(x+1)およびt=y/(x+1){ただし、x+y+z=1}による射影を行うことによって、前記球面上の点(x,y,z)を、前記射影面上の点(s,t)へ変換するようにしてもよい。 (5) In the skeletal motion control system, the program, and the information storage medium of the present invention, the axis along the parent bone is set as the x axis, and the two axes orthogonal to the parent bone and orthogonal to each other are the y axis. The coordinate axes orthogonal to each other are set as the s-axis and the t-axis, respectively, on the projection plane, and the coordinate conversion unit s = −z / (X + 1) and t = y / (x + 1) {where x 2 + y 2 + z 2 = 1} is used to project a point (x, y, z) on the spherical surface to a point on the projected surface You may make it convert into (s, t).

このようにすれば、射影による変換が、四則演算のみで構成されるので、計算負荷が小さい。   In this way, since the transformation by projection is composed of only four arithmetic operations, the calculation load is small.

(6)本発明の骨格動作制御システム、プログラムおよび情報記憶媒体では、前記骨格モデルの関節に関して、前記射影面上で成す可動範囲の形状として矩形、楕円形、または小判形のいずれかが予め設定されているとともに、該関節におけるy軸回りの子骨の回転角およびz軸回りの子骨の回転角の許容範囲が予め設定されており、前記可動範囲設定部が、前記射影面上で成す前記可動範囲の形状と、前記関節におけるy軸回りの子骨の回転角およびz軸回りの子骨の回転角の許容範囲とに基づいて、前記関節の可動範囲を前記射影面上において設定するようにしてもよい。   (6) In the skeletal motion control system, the program, and the information storage medium of the present invention, the shape of the movable range formed on the projection plane for the joint of the skeleton model is preset as one of a rectangle, an ellipse, and an oval And an allowable range of the rotation angle of the skeleton around the y-axis and the rotation angle of the skeleton around the z-axis in the joint is set in advance, and the movable range setting unit is formed on the projection plane. The movable range of the joint is set on the projection plane based on the shape of the movable range and the allowable range of the rotation angle of the skeleton around the y axis and the rotation angle of the skeleton around the z axis in the joint. You may do it.

このようにすれば、従来方式を適用した骨格モデルの動作設計の資産を有効に活用して、簡便に関節の可動範囲を設定することができるようになる。   In this way, it is possible to easily set the movable range of the joint by effectively utilizing the motion design assets of the skeleton model to which the conventional method is applied.

(7)本発明の骨格動作制御システム、プログラムおよび情報記憶媒体では、前記骨格動作演算部が、前記親骨の動作に対応する前記子骨の動作を演算して得られた前記親骨に対する前記子骨の向きが前記可動範囲内に収まっているか否かを判定し、前記親骨に対する前記子骨の向きが前記可動範囲内に収まっていない場合には、前記射影面上における前記可動範囲の形状に応じた条件を満たすように、前記親骨に対する前記子骨の向きを補正するようにしてもよい。   (7) In the skeletal motion control system, the program, and the information storage medium of the present invention, the skeleton motion with respect to the master bone obtained by the skeleton motion calculation unit calculating the motion of the skeleton bone corresponding to the motion of the master bone. If the orientation of the child bone relative to the parent bone is not within the movable range, the orientation of the child bone is determined according to the shape of the movable range on the projection plane. The orientation of the child bone relative to the parent bone may be corrected so as to satisfy the following conditions.

このようにすれば、演算負荷を抑えつつ、自然な動きを表現できる骨の向きを求めることができる。   In this way, it is possible to obtain a bone orientation that can express a natural movement while suppressing a calculation load.

以下、本発明の実施の形態について説明する。なお、以下に説明する実施の形態は、特許請求の範囲に記載された本発明の内容を不当に限定するものではない。また以下において説明する実施の形態で説明される構成の全てが、本発明の必須構成要件であるとは限らない。   Embodiments of the present invention will be described below. The embodiments described below do not unduly limit the contents of the present invention described in the claims. In addition, all the configurations described in the embodiments described below are not necessarily essential configuration requirements of the present invention.

1.構成
図1に本実施形態のゲームシステム(骨格動作制御システムの一例)の機能ブロック図の例を示す。なお本実施形態のゲームシステムは図1の構成要素(各部)の一部を省略した構成としてもよい。
1. Configuration FIG. 1 shows an example of a functional block diagram of a game system (an example of a skeleton motion control system) according to the present embodiment. Note that the game system of this embodiment may have a configuration in which some of the components (each unit) in FIG. 1 are omitted.

操作部160は、プレーヤがキャラクタ(人、動物、ロボットなどの多関節モデル)の操作データを入力するためのものであり、その機能は、レバー、ボタン、ステアリング、マイク、タッチパネル型ディスプレイ、或いは筺体などにより実現できる。記憶部170は、処理部100や通信部196などのワーク領域となるもので、その機能はRAM、VRAMなどにより実現できる。   The operation unit 160 is for a player to input operation data of a character (multi-joint model such as a person, animal, or robot), and functions as a lever, a button, a steering, a microphone, a touch panel display, or a housing. It can be realized by. The storage unit 170 serves as a work area for the processing unit 100, the communication unit 196, and the like, and its function can be realized by a RAM, a VRAM, or the like.

情報記憶媒体180(コンピュータにより読み取り可能な媒体)は、プログラムやデータなどを格納するものであり、その機能は、光ディスク(CD、DVD)、光磁気ディスク(MO)、磁気ディスク、ハードディスク、磁気テープ、或いはメモリ(ROM)などにより実現できる。処理部100は、情報記憶媒体180に格納されるプログラム(データ)に基づいて本実施形態の種々の処理を行う。即ち情報記憶媒体180には、本実施形態の各部としてコンピュータを機能させるためのプログラム(各部の処理をコンピュータに実行させるためのプログラム)が記憶される。   The information storage medium 180 (computer-readable medium) stores programs, data, and the like, and functions as an optical disk (CD, DVD), magneto-optical disk (MO), magnetic disk, hard disk, and magnetic tape. Alternatively, it can be realized by a memory (ROM). The processing unit 100 performs various processes of the present embodiment based on a program (data) stored in the information storage medium 180. That is, the information storage medium 180 stores a program for causing a computer to function as each unit of the present embodiment (a program for causing a computer to execute processing of each unit).

表示部190は、本実施形態により生成された画像を出力するものであり、その機能は、CRT、LCD、タッチパネル型ディスプレイ、或いはHMD(ヘッドマウントディスプレイ)などにより実現できる。音出力部192は、本実施形態により生成された音を出力するものであり、その機能は、スピーカ、或いはヘッドフォンなどにより実現できる。   The display unit 190 outputs an image generated according to the present embodiment, and its function can be realized by a CRT, LCD, touch panel display, HMD (head mounted display), or the like. The sound output unit 192 outputs the sound generated by the present embodiment, and its function can be realized by a speaker, headphones, or the like.

携帯型情報記憶装置194は、プレーヤの個人データやゲームのセーブデータなどが記憶されるものであり、この携帯型情報記憶装置194としては、メモリカードや携帯型ゲーム装置などがある。通信部196は外部(例えばホスト装置や他の画像生成システム)との間で通信を行うための各種制御を行うものであり、その機能は、各種プロセッサ又は通信用ASICなどのハードウェアや、プログラムなどにより実現できる。   The portable information storage device 194 stores player personal data, game save data, and the like. Examples of the portable information storage device 194 include a memory card and a portable game device. The communication unit 196 performs various controls for communicating with the outside (for example, a host device or other image generation system), and functions thereof are hardware such as various processors or communication ASICs, programs, and the like. It can be realized by.

なお本実施形態の各部としてコンピュータを機能させるためのプログラム(データ)は、ホスト装置(サーバー)が有する情報記憶媒体からネットワーク及び通信部196を介して情報記憶媒体180や記憶部170に配信してもよい。このようなホスト装置(サーバー)の情報記憶媒体の使用も本発明の範囲内に含めることができる。   A program (data) for causing a computer to function as each unit of the present embodiment is distributed from the information storage medium of the host device (server) to the information storage medium 180 or the storage unit 170 via the network and the communication unit 196. Also good. Use of the information storage medium of such a host device (server) can also be included in the scope of the present invention.

処理部100は、操作部160からの操作データやプログラムなどに基づいて、ゲーム処理、画像生成処理、或いは音生成処理などの処理を行う。ここでゲーム処理としては、ゲーム開始条件が満たされた場合にゲームを開始する処理、ゲームを進行させる処理、キャラクタやマップなどのオブジェクトを配置する処理、オブジェクトを表示する処理、ゲーム結果を演算する処理、或いはゲーム終了条件が満たされた場合にゲームを終了する処理などがある。この処理部100は記憶部170をワーク領域として各種処理を行う。処理部100の機能は各種プロセッサ(CPU、GPU、DSP等)、ASIC(ゲートアレイ等)などのハードウェアや、プログラムにより実現できる。   The processing unit 100 performs processing such as game processing, image generation processing, or sound generation processing based on operation data and programs from the operation unit 160. Here, as the game process, a process for starting a game when a game start condition is satisfied, a process for advancing the game, a process for placing an object such as a character or a map, a process for displaying an object, and a game result are calculated. There is a process or a process of ending a game when a game end condition is satisfied. The processing unit 100 performs various processes using the storage unit 170 as a work area. The functions of the processing unit 100 can be realized by hardware such as various processors (CPU, GPU, DSP, etc.), ASIC (gate array, etc.), and programs.

処理部100は、オブジェクト空間設定部110、移動・動作処理部112、仮想カメラ制御部114、描画部120、音生成部130を含む。なおこれらの一部を省略する構成としてもよい。   The processing unit 100 includes an object space setting unit 110, a movement / motion processing unit 112, a virtual camera control unit 114, a drawing unit 120, and a sound generation unit 130. Note that some of these may be omitted.

オブジェクト空間設定部110は、メインメモリ172のオブジェクト情報記憶部172Aに記憶されているオブジェクト情報に基づいて、車、キャラクタ、建物、球場、樹木、柱、壁、コース(道路)、マップ(地形)などの表示物を表す各種オブジェクト(ポリゴン、自由曲面又はサブディビジョンサーフェスなどのプリミティブで構成されるオブジェクト)をオブジェクト空間に配置設定する処理を行う。具体的には、後述する移動・動作処理部112の処理結果に基づいて、ワールド座標系でのオブジェクトの位置や回転角度(向き、方向と同義)を決定し、決定された位置(X,Y,Z)に決定された回転角度(X軸回り、Y軸回り、およびZ軸回りでの回転角度)でオブジェクトを配置する。   The object space setting unit 110 is based on the object information stored in the object information storage unit 172A of the main memory 172, and includes a car, a character, a building, a stadium, a tree, a pillar, a wall, a course (road), and a map (terrain). Various kinds of objects (objects composed of primitives such as a polygon, a free-form surface, or a subdivision surface) representing a display object such as are arranged and set in the object space. Specifically, the position and rotation angle (synonymous with orientation and direction) of the object in the world coordinate system are determined based on the processing result of the movement / motion processing unit 112 described later, and the determined position (X, Y , Z), the objects are arranged at the rotation angles determined (the rotation angles around the X axis, the Y axis, and the Z axis).

移動・動作処理部112は、オブジェクト(キャラクタ等)の移動・動作演算(移動・動作シミュレーション)を行う。すなわち操作部160によりプレーヤが入力した操作データや、プログラム(移動・動作アルゴリズム)や、各種データ(モーションデータ)などに基づいて、オブジェクトをオブジェクト空間内で移動させたり、オブジェクトを動作(モーション、アニメーション)させたりする処理を行う。具体的には、オブジェクトの移動情報(位置、回転角度、速度、或いは加速度)や動作情報(オブジェクトを構成する各パーツの位置、或いは回転角度)を、1フレーム(1/60秒)毎に順次求めるシミュレーション処理を行う。なおフレームは、オブジェクトの移動・動作処理(シミュレーション処理)や画像生成処理を行う時間の単位である。   The movement / motion processing unit 112 performs movement / motion calculation (movement / motion simulation) of an object (such as a character). That is, based on operation data input by the player through the operation unit 160, a program (movement / motion algorithm), various data (motion data), or the like, the object is moved in the object space, or the object is moved (motion, animation). ) Process. Specifically, object movement information (position, rotation angle, speed, or acceleration) and motion information (position or rotation angle of each part that constitutes the object) are sequentially transmitted every frame (1/60 seconds). Perform the required simulation process. A frame is a unit of time for performing object movement / motion processing (simulation processing) and image generation processing.

特に本実施の形態では、図2に示すように、複数の骨が関節によって連結されており、関節で連結されている一の骨を親骨とし、親骨と同一の関節で連結されている他の骨を子骨として、親骨の動きに子骨が追従するように各骨の動きが決定される骨格モデルを用いてオブジェクトの動作を決定する処理を行っている。図2に示す骨格モデルの例では、関節Aにおいて骨Aが親骨に相当するとともに、骨Bが子骨に相当する。そして、移動・動作処理部112は、可動範囲設定部112Aと、座標変換部112Bと、骨格動作演算部112Cとを含む。   In particular, in the present embodiment, as shown in FIG. 2, a plurality of bones are connected by joints, one bone connected by the joints is a parent bone, and other bones are connected by the same joint as the parent bone. A process is performed in which the motion of the object is determined using a skeleton model in which the movement of each bone is determined so that the skeleton can follow the movement of the parent bone with the bone as the skeleton. In the example of the skeletal model shown in FIG. 2, in the joint A, the bone A corresponds to the parent bone, and the bone B corresponds to the child bone. The movement / motion processing unit 112 includes a movable range setting unit 112A, a coordinate conversion unit 112B, and a skeleton motion calculation unit 112C.

可動範囲設定部112Aは、関節を中心点とする球面上の所与の点を焦点とし、該中心点と該焦点とを結ぶ軸に直交する平面を射影面とし、関節の可動範囲を、射影面上において設定する。このとき可動範囲は、射影面上で矩形、楕円形、あるいは小判形を成すように設定することができる。   The movable range setting unit 112A has a given point on a spherical surface with the joint as the central point as a focal point, and a plane perpendicular to an axis connecting the central point and the focal point as a projection plane, and the movable range of the joint is projected. Set on the surface. At this time, the movable range can be set so as to form a rectangle, an ellipse, or an oval on the projection plane.

また本実施形態では、骨格モデルの関節に関して、射影面上で成す可動範囲の形状として矩形、楕円形、または小判形のいずれかが予め設定されているとともに、関節におけるy軸回りの子骨の回転角(y軸回転角)およびz軸回りの子骨の回転角(z軸回転角)の許容範囲が予め設定されている。具体的には、関節毎の可動範囲の形状を示す形状パターン情報と、関節毎のy軸回転角の許容範囲およびz軸回転角の許容範囲を示す許容範囲情報とがメインメモリ172のモーション制御情報記憶部172Bに記憶されている。そして可動範囲設定部112Aは、形状パターン情報により得られる射影面上で成す演算対象の関節の可動範囲の形状と、許容範囲情報により得られる演算対象の関節のy軸回転角およびz軸回転角の許容範囲とに基づいて、関節の可動範囲を射影面上において設定する。   In the present embodiment, regarding the joint of the skeleton model, one of a rectangular shape, an elliptical shape, and an oval shape is preset as the shape of the movable range formed on the projection plane, and the skeleton of the skeleton around the y-axis in the joint is set. Allowable ranges for the rotation angle (y-axis rotation angle) and the rotation angle of the skeleton around the z-axis (z-axis rotation angle) are set in advance. Specifically, the shape control information indicating the shape of the movable range for each joint and the allowable range information indicating the allowable range of the y-axis rotation angle and the allowable range of the z-axis rotation angle for each joint are the motion control of the main memory 172. It is stored in the information storage unit 172B. Then, the movable range setting unit 112A determines the shape of the movable range of the calculation target joint formed on the projection plane obtained from the shape pattern information, and the y-axis rotation angle and the z-axis rotation angle of the calculation target joint obtained from the allowable range information. The movable range of the joint is set on the projection plane based on the allowable range.

座標変換部112Bは、関節を中心点とする球面上において子骨の向きを表す点を焦点に基づいて射影面上に射影する。本実施形態では、親骨に沿った軸が、x軸として設定され、親骨に直交し、かつ互いに直交する2つの軸が、それぞれy軸およびz軸として設定されており、射影面上に、互いに直交する座標軸が、それぞれs軸およびt軸として設定されており、座標変換部112Bは、焦点を基準として、s=−z/(x+1)およびt=y/(x+1){ただし、x+y+z=1}による射影を行うことによって、球面上の点(x,y,z)を、射影面上の点(s,t)へ変換する。 The coordinate conversion unit 112B projects a point representing the orientation of the skeleton on the projection surface on the spherical surface with the joint as the center point based on the focal point. In the present embodiment, the axis along the parent bone is set as the x axis, and two axes orthogonal to the parent bone and orthogonal to each other are set as the y axis and the z axis, respectively, on the projection plane, The orthogonal coordinate axes are set as the s axis and the t axis, respectively, and the coordinate conversion unit 112B sets s = −z / (x + 1) and t = y / (x + 1) {however, x 2 + y with reference to the focal point. By performing the projection by 2 + z 2 = 1}, the point (x, y, z) on the spherical surface is converted to the point (s, t) on the projected surface.

骨格動作演算部112Cは、射影面上に射影された点の位置に基づいて、可動範囲設定部112Aにより設定された可動範囲の制限下で、親骨に対する子骨の向きを演算する。このとき骨格動作演算部112Cは、プレーヤの入力情報、オブジェクト同士の衝突(ヒット)による外力情報や、その他の動作影響情報(例えば、重力情報、風力情報等)などに基づいて、親骨の動作に対応する子骨の動作を演算して得られた親骨に対する子骨の向きが可動範囲内に収まっているか否かを判定する。そして、親骨に対する子骨の向きが可動範囲内に収まっていない場合には、射影面上における可動範囲の形状に応じた条件を満たすように親骨に対する子骨の向きを補正して、演算対象の関節の可動範囲に収まるように子骨の向きを決定する。移動・動作処理部112では、骨格動作演算部112Cの演算結果に基づいて、オブジェクトの表面を構成するポリゴン等(表面形状)を変形させることによってオブジェクトを動作させる演算を行う。   Based on the position of the point projected on the projection plane, the skeletal motion calculation unit 112C calculates the orientation of the skeleton relative to the parent bone under the limitation of the movable range set by the movable range setting unit 112A. At this time, the skeleton motion calculation unit 112C determines the motion of the parent bone based on input information of the player, external force information due to collision (hit) between objects, other motion influence information (for example, gravity information, wind power information, and the like). It is determined whether or not the orientation of the skeleton relative to the parent bone obtained by calculating the operation of the corresponding skeleton is within the movable range. When the orientation of the skeleton is not within the movable range, the orientation of the skeleton relative to the parent bone is corrected so as to satisfy the condition according to the shape of the movable range on the projection plane, Decide the orientation of the skeleton so that it is within the range of motion of the joint. In the movement / motion processing unit 112, based on the calculation result of the skeleton motion calculation unit 112C, a calculation is performed to move the object by deforming a polygon or the like (surface shape) constituting the surface of the object.

仮想カメラ制御部114は、オブジェクト空間内の所与(任意)の視点から見える画像を生成するための仮想カメラ(視点)の制御処理を行う。具体的には、仮想カメラの位置(X,Y,Z)又は回転角度(X軸回り、Y軸回り、およびZ軸回りでの回転角度)を制御する処理(視点位置、視線方向あるいは画角を制御する処理)を行う。   The virtual camera control unit 114 performs a virtual camera (viewpoint) control process for generating an image viewed from a given (arbitrary) viewpoint in the object space. Specifically, the process (viewpoint position, line-of-sight direction, or angle of view) for controlling the position (X, Y, Z) or rotation angle (rotation angles around the X axis, Y axis, and Z axis) of the virtual camera. Process to control).

例えば仮想カメラによりオブジェクト(例えば車、キャラクタ、ボール)を後方から撮影する場合には、オブジェクトの位置又は回転の変化に仮想カメラが追従するように、仮想カメラの位置又は回転角度(仮想カメラの向き)を制御する。この場合には、移動・動作処理部112で得られたオブジェクトの位置、回転角度又は速度などの情報(所定の制御情報の一例)に基づいて、仮想カメラを制御できる。或いは、仮想カメラを、予め決められた回転角度で回転させたり、予め決められた移動経路で移動させたりする制御を行ってもよい。この場合には、仮想カメラの位置(移動経路)又は回転角度を特定するための仮想カメラデータ(所定の制御情報の一例)に基づいて仮想カメラを制御する。なお、仮想カメラ(視点)が複数存在する場合には、それぞれの仮想カメラについて上記の制御処理が行われる。   For example, when an object (for example, a car, a character, or a ball) is photographed from behind using a virtual camera, the position or rotation angle of the virtual camera (the direction of the virtual camera) ) To control. In this case, the virtual camera can be controlled based on information (an example of predetermined control information) such as the position, rotation angle, or speed of the object obtained by the movement / motion processing unit 112. Alternatively, control may be performed such that the virtual camera is rotated at a predetermined rotation angle or moved along a predetermined movement path. In this case, the virtual camera is controlled based on virtual camera data (an example of predetermined control information) for specifying the position (movement path) or rotation angle of the virtual camera. When there are a plurality of virtual cameras (viewpoints), the above control process is performed for each virtual camera.

描画部120は、処理部100で行われる種々の処理(ゲーム処理)の結果に基づいて描画処理を行い、これにより画像を生成し、表示部190に出力する。いわゆる3次元ゲーム画像を生成する場合には、まずオブジェクト(モデル)の各頂点の頂点データ(頂点の位置座標、テクスチャ座標、色データ、法線ベクトル或いはα値等)を含むオブジェクト情報(モデル情報)がメインメモリ172のオブジェクト情報記憶部172Aから入力され、入力されたオブジェクト情報に含まれる頂点情報に基づいて、頂点処理(頂点シェーダによるシェーディング)が行われる。なお頂点処理を行うに際して、必要に応じてポリゴンを再分割するための頂点生成処理(テッセレーション、曲面分割、ポリゴン分割)を行うようにしてもよい。頂点処理では、頂点処理プログラム(頂点シェーダプログラム、第1のシェーダプログラム)に従って、頂点の移動処理や、座標変換(ワールド座標変換、カメラ座標変換)、クリッピング処理、あるいは透視変換等のジオメトリ処理が行われ、その処理結果に基づいて、オブジェクトを構成する頂点群について与えられた頂点情報を変更(更新、調整)する。そして、頂点処理後の頂点情報に基づいてラスタライズ(走査変換)が行われ、ポリゴン(プリミティブ)の面とピクセルとが対応づけられる。そしてラスタライズに続いて、画像を構成するピクセル(表示画面を構成するフラグメント)を描画するピクセル処理(ピクセルシェーダによるシェーディング、フラグメント処理)が行われる。ピクセル処理では、ピクセル処理プログラム(ピクセルシェーダプログラム、第2のシェーダプログラム)に従って、テクスチャの読出し(テクスチャマッピング)、色情報の設定/変更、半透明合成、アンチエイリアス等の各種処理を行って、画像を構成するピクセルの最終的な描画色を決定し、透視変換されたオブジェクトの描画色をレンダリングターゲットであるビデオメモリ174のフレームバッファ174C(ピクセル単位で画像情報を記憶できるバッファ。)に出力(描画)する。すなわち、ピクセル処理では、画像情報(色、法線、輝度、α値等)をピクセル単位で設定あるいは変更するパーピクセル処理を行う。これにより、オブジェクト空間内において仮想カメラ(所与の視点)から見える画像が生成される。なお、仮想カメラ(視点)が複数存在する場合には、それぞれの仮想カメラから見える画像を分割画像として1画面に表示できるように画像を生成することができる。   The drawing unit 120 performs drawing processing based on the results of various processing (game processing) performed by the processing unit 100, thereby generating an image and outputting the image to the display unit 190. When generating a so-called three-dimensional game image, first, object information (model information) including vertex data (vertex position coordinates, texture coordinates, color data, normal vector, α value, etc.) of each vertex of the object (model) ) Is input from the object information storage unit 172A of the main memory 172, and vertex processing (shading by a vertex shader) is performed based on the vertex information included in the input object information. When performing the vertex processing, vertex generation processing (tessellation, curved surface division, polygon division) for re-dividing the polygon may be performed as necessary. In the vertex processing, according to the vertex processing program (vertex shader program, first shader program), vertex movement processing, coordinate conversion (world coordinate conversion, camera coordinate conversion), clipping processing, perspective processing, and other geometric processing are performed. On the basis of the processing result, the vertex information given to the vertex group constituting the object is changed (updated or adjusted). Then, rasterization (scan conversion) is performed based on the vertex information after the vertex processing, and the surface of the polygon (primitive) is associated with the pixel. Subsequent to rasterization, pixel processing (shading or fragment processing by a pixel shader) for drawing pixels (fragments forming a display screen) constituting an image is performed. In pixel processing, according to the pixel processing program (pixel shader program, second shader program), various processes such as texture reading (texture mapping), setting / changing color information, translucent composition, anti-aliasing, etc. are performed. The final drawing color of the constituent pixels is determined, and the drawing color of the perspective-transformed object is output (drawn) to the frame buffer 174C (buffer capable of storing image information in units of pixels) of the video memory 174 as a rendering target. To do. That is, in pixel processing, per-pixel processing for setting or changing image information (color, normal, luminance, α value, etc.) in units of pixels is performed. Thereby, an image that can be seen from the virtual camera (given viewpoint) in the object space is generated. Note that when there are a plurality of virtual cameras (viewpoints), an image can be generated so that an image seen from each virtual camera can be displayed as a divided image on one screen.

なお頂点処理やピクセル処理は、シェーディング言語によって記述されたシェーダプログラムによって、ポリゴン(プリミティブ)の描画処理をプログラム可能にするハードウェア、いわゆるプログラマブルシェーダ(頂点シェーダやピクセルシェーダ)により実現される。プログラマブルシェーダでは、頂点単位の処理やピクセル単位の処理がプログラム可能になることで描画処理内容の自由度が高く、従来のハードウェアによる固定的な描画処理に比べて表現力を大幅に向上させることができる。   Note that the vertex processing and pixel processing are realized by hardware that enables polygon (primitive) drawing processing to be programmed by a shader program written in a shading language, so-called programmable shaders (vertex shaders and pixel shaders). Programmable shaders can be programmed with vertex-level processing and pixel-level processing, so that the degree of freedom of drawing processing is high, and expressive power is greatly improved compared to conventional hardware-based fixed drawing processing. Can do.

そして描画部120は、オブジェクトを描画する際に、ジオメトリ処理、テクスチャマッピング、隠面消去処理、αブレンディング等を行う。   The drawing unit 120 performs geometry processing, texture mapping, hidden surface removal processing, α blending, and the like when drawing an object.

ジオメトリ処理では、オブジェクトに対して、座標変換、クリッピング処理、透視投影変換、或いは光源計算等の処理が行われる。そして、ジオメトリ処理後(透視投影変換後)のオブジェクト情報(オブジェクトの頂点の位置座標、テクスチャ座標、色データ(輝度データ)、法線ベクトル、或いはα値等)は、メインメモリ172のオブジェクト情報記憶部172Aに保存される。   In the geometry processing, processing such as coordinate conversion, clipping processing, perspective projection conversion, or light source calculation is performed on the object. Then, object information (positional coordinates of object vertices, texture coordinates, color data (luminance data), normal vector, α value, etc.) after geometry processing (after perspective projection conversion) is stored in the object information in the main memory 172. Stored in the part 172A.

テクスチャマッピングは、ビデオメモリ174のテクスチャ記憶部174Aに記憶されるテクスチャ(テクセル値)をオブジェクトにマッピングするための処理である。具体的には、オブジェクトの頂点に設定(付与)されるテクスチャ座標等を用いてテクスチャ記憶部174Aからテクスチャ(色(RGB)、α値などの表面プロパティ)を読み出す。そして、2次元の画像であるテクスチャをオブジェクトにマッピングする。この場合に、ピクセルとテクセルとを対応づける処理や、テクセルの補間としてバイリニア補間、トライリニア補間などを行う。   Texture mapping is a process for mapping a texture (texel value) stored in the texture storage unit 174A of the video memory 174 to an object. Specifically, the texture (surface properties such as color (RGB) and α value) is read from the texture storage unit 174A using the texture coordinates set (given) at the vertex of the object. Then, a texture that is a two-dimensional image is mapped to an object. In this case, processing for associating pixels with texels, bilinear interpolation, trilinear interpolation, etc. are performed as texel interpolation.

隠面消去処理としては、描画ピクセルのZ値(奥行き情報)が格納されるZバッファ174B(奥行きバッファ)を用いたZバッファ法(奥行き比較法、Zテスト)による隠面消去処理を行うことができる。すなわちオブジェクトのプリミティブに対応する描画ピクセルを描画する際に、Zバッファ174Bに格納されるZ値を参照する。そして参照されたZバッファのZ値と、プリミティブの描画ピクセルでのZ値とを比較し、描画ピクセルでのZ値が、仮想カメラから見て手前側となるZ値(例えば小さなZ値)である場合には、その描画ピクセルの描画処理を行うとともにZバッファ174BのZ値を新たなZ値に更新する。   As the hidden surface removal processing, hidden surface removal processing by a Z buffer method (depth comparison method, Z test) using a Z buffer 174B (depth buffer) in which a Z value (depth information) of a drawing pixel is stored may be performed. it can. That is, when drawing a pixel corresponding to the primitive of the object, the Z value stored in the Z buffer 174B is referred to. Then, the Z value of the referenced Z buffer is compared with the Z value at the drawing pixel of the primitive, and the Z value at the drawing pixel is a Z value (for example, a small Z value) on the near side when viewed from the virtual camera. If there is, the drawing process of the drawing pixel is performed and the Z value of the Z buffer 174B is updated to a new Z value.

αブレンディングとしては、α値(A値)に基づく半透明合成処理(通常αブレンディング、加算αブレンディング又は減算αブレンディング等)を行う。例えば通常αブレンディングの場合には下式(α1)〜(α3)の処理を行う。
=(1−α)×R+α×R (α1)
=(1−α)×G+α×G (α2)
=(1−α)×B+α×B (α3)
As the α blending, a translucent synthesis process (usually α blending, addition α blending, subtraction α blending, or the like) based on the α value (A value) is performed. For example, in the case of normal α blending, the following processing (α1) to (α3) is performed.
R Q = (1−α) × R 1 + α × R 2 (α1)
G Q = (1−α) × G 1 + α × G 2 (α2)
B Q = (1−α) × B 1 + α × B 2 (α3)

また、加算αブレンディングの場合には下式(α4)〜(α6)の処理を行う。なお単純加算の場合はα=1として下式(α4)〜(α6)の処理を行う。
=R+α×R (α4)
=G+α×G (α5)
=B+α×B (α6)
In addition, in the case of addition α blending, the following formulas (α4) to (α6) are performed. In the case of simple addition, α = 1 and the following formulas (α4) to (α6) are performed.
R Q = R 1 + α × R 2 (α4)
G Q = G 1 + α × G 2 (α5)
B Q = B 1 + α × B 2 (α6)

また、減算αブレンディングの場合には下式(α7)〜(α9)の処理を行う。なお単純減算の場合はα=1として下式(α7)〜(α9)の処理を行う。
=R−α×R (α7)
=G−α×G (α8)
=B−α×B (α9)
In the case of subtractive α blending, the following formulas (α7) to (α9) are performed. In the case of simple subtraction, the following formulas (α7) to (α9) are performed with α = 1.
R Q = R 1 −α × R 2 (α7)
G Q = G 1 −α × G 2 (α8)
B Q = B 1 −α × B 2 (α9)

ここで、R、G、Bは、ビデオメモリ174のフレームバッファ174Cに既に描画されている画像(原画像)のRGB成分であり、R、G、Bは、フレームバッファ174Cに描画すべき画像のRGB成分である。また、R、G、Bは、αブレンディングにより得られる画像のRGB成分である。なお、α値は、各ピクセル(テクセル、ドット)に関連づけて記憶できる情報であり、例えば色情報以外のプラスアルファの情報である。α値は、マスク情報、半透明度(透明度、不透明度と等価)、バンプ情報などとして使用できる。 Here, R 1 , G 1 and B 1 are RGB components of an image (original image) already drawn in the frame buffer 174C of the video memory 174, and R 2 , G 2 and B 2 are the frame buffer 174C. Are RGB components of the image to be drawn. R Q , G Q , and B Q are RGB components of an image obtained by α blending. The α value is information that can be stored in association with each pixel (texel, dot), for example, plus alpha information other than color information. The α value can be used as mask information, translucency (equivalent to transparency and opacity), bump information, and the like.

音生成部130は、処理部100で行われる種々の処理の結果に基づいて音処理(サウンド処理)を行い、BGM、効果音、又は音声などのゲーム音を生成し、音出力部192(スピーカ)に出力する。   The sound generation unit 130 performs sound processing (sound processing) based on the results of various processes performed by the processing unit 100, generates game sounds such as BGM, sound effects, and sounds, and outputs a sound output unit 192 (speaker). ).

なお、本実施形態の画像生成システムは、1人のプレーヤのみがプレイできるシングルプレーヤモード専用のシステムにしてもよいし、複数のプレーヤがプレイできるマルチプレーヤモードも備えるシステムにしてもよい。また複数のプレーヤがプレイする場合に、これらの複数のプレーヤに提供するゲーム画像やゲーム音を、1つの端末を用いて生成してもよいし、ネットワーク(伝送ライン、通信回線)などで接続された複数の端末(ゲーム機、携帯電話)を用いて分散処理により生成してもよい。   Note that the image generation system of the present embodiment may be a system dedicated to the single player mode in which only one player can play, or may be a system having a multiplayer mode in which a plurality of players can play. Further, when a plurality of players play, game images and game sounds to be provided to the plurality of players may be generated using one terminal, or connected via a network (transmission line, communication line) or the like. Alternatively, it may be generated by distributed processing using a plurality of terminals (game machine, mobile phone).

2.本実施形態の手法
以下では、従来の手法と対比しながら、本実施形態の手法を説明する。
2. In the following, the method of the present embodiment will be described in comparison with the conventional method.

2−1.従来の手法(3軸回転角方式)
2−1−1.座標系
所与の関節の両側の骨のうち一方を親骨、他方を子骨と呼ぶことにする。関節の回転(曲げ、捻り)の状態は、親骨を基準とした子骨の向きで表すことができる。骨の向きを表すために、各骨に対して図3のように座標系を定める。
2-1. Conventional method (3-axis rotation angle method)
2-1-1. Coordinate system One of the bones on either side of a given joint is called the parent bone and the other is the child bone. The state of rotation (bending, twisting) of the joint can be expressed by the orientation of the skeleton with respect to the parent bone. In order to express the direction of the bone, a coordinate system is defined for each bone as shown in FIG.

2−1−2.3軸回転角度による表現
従来の手法では、親骨に対する子骨の向きをxyz座標系の3軸の回転角度(それぞれr、r、rとする)で表し、各軸の回転角度の取り得る範囲によって可動範囲を設定する。子骨を回転させる順序は種々考えられるが、以下の例では、親骨の座標系を基準としてx軸回転、z軸回転、y軸回転の順序とする。
2-1-2. Expression by 3-axis rotation angle In the conventional method, the orientation of the child bone relative to the parent bone is expressed by the rotation angles of the 3 axes of the xyz coordinate system (respectively indicated as r x , r y , r z ) The movable range is set according to the range that the rotation angle of the shaft can take. Various orders of rotating the skeleton are conceivable. In the following example, the order of the x-axis rotation, the z-axis rotation, and the y-axis rotation is set with reference to the coordinate system of the parent bone.

ここで、関節を中心点とする半径1の球面Sを作り、子骨のx軸と球面Sとの交点をPとすると、関節の曲げ状態は、点Pの位置で表すことができる。3軸に関する回転角度と点Pの位置との関係を図示すると、図4のように地球儀の緯度、経度と同様の形態となる。なお、図4では、回転角度を10°間隔で表しており、rが経度、rが緯度に相当し、rはその位置での捻りに相当することになる。 Here, if a spherical surface S having a radius 1 with the joint as a center point is created and the intersection point between the x-axis of the skeleton and the spherical surface S is P, the bending state of the joint can be expressed by the position of the point P. When the relationship between the rotation angle about the three axes and the position of the point P is illustrated, it becomes a form similar to the latitude and longitude of the globe as shown in FIG. In FIG. 4, the rotation angle is expressed in 10 ° intervals, r y is longitude, r z corresponds to the latitude, r x will correspond to torsion at that location.

2−1−3.可動範囲の設定
従来の手法において、関節の曲げ角度に関する可動範囲を設定することは、球面S上に可動範囲に相当する領域(以下、単に可動領域という)を設定することに相当する。例えば、y軸回転が−40°〜20°、z軸回転が−10°〜30°の場合、球面S上に設定される可動領域は図5のようになる。球面Sの中心と可動領域の境界とを結んで、可動領域らしく表示すると図6のようになる。
2-1-3. Setting the movable range In the conventional method, setting the movable range related to the bending angle of the joint is equivalent to setting an area corresponding to the movable range (hereinafter simply referred to as a movable area) on the spherical surface S. For example, when the y-axis rotation is −40 ° to 20 ° and the z-axis rotation is −10 ° to 30 °, the movable region set on the spherical surface S is as shown in FIG. When the center of the spherical surface S and the boundary of the movable area are connected and displayed like a movable area, it is as shown in FIG.

この例のように関節の曲げ角度に関する可動範囲が比較的狭い場合は問題ないが、z軸回転の可動範囲が±90°を超える設定をしようとすると、問題が生じる。一般的に、経度の値は−180°〜180°の範囲で取り得るのに対して、緯度の値は−90°〜90°の範囲を超えられないからである。敢えて工夫をすれば可動領域の設定自体は可能であり、例えば、rが−40°〜20°、rが−10°〜110°の場合、図7〜図9に示すような可動領域が設定される。しかし、図7〜図9に示す各設定例において、いずれも可動領域の形状がいびつになったり、可動領域の設定作業が繁雑になったりするという実使用上の問題が残り採用しがたい。 As in this example, there is no problem when the movable range related to the bending angle of the joint is relatively narrow. However, if the movable range of the z-axis rotation is set to exceed ± 90 °, a problem occurs. In general, the longitude value can be in the range of −180 ° to 180 °, while the latitude value cannot exceed the range of −90 ° to 90 °. A dare set itself movable area if a contrivance is possible, for example, r y is -40 ° to 20 °, if r z is -10 ° to 110 °, the movable area as shown in FIGS. 7 to 9 Is set. However, in each of the setting examples shown in FIGS. 7 to 9, it is difficult to adopt a problem in actual use in which the shape of the movable area becomes distorted or the setting work of the movable area becomes complicated.

2−2.射影方式による本実施形態の手法
2−2−1.球面Sから平面λへの射影
本実施形態の手法では、図10に示すように、座標(−1,0,0)の点を点Pとし、x=0の平面を平面λ(射影面)としたとき、球面S上の任意の点Pについて、点Pを焦点(光源)として平面λに射影することによって、点Qを得る。本実施形態では、前述の射影をfとし、球面S上の点Pから平面λ上の点Qへの変換をQ=f(P)と表す。また本実施形態では、平面λ上の点Qから球面S上の点Pへの射影をf−1とし、平面λ上の点Qから球面S上の点Pへの変換をP=f−1(Q)と表す。また本実施形態では、点Pを球面Sの極と呼ぶこととする。
2-2. Method of the present embodiment by the projection method 2-2-1. Projection from Spherical Surface S to Plane λ As shown in FIG. 10, in the method of the present embodiment, a point of coordinates (−1, 0 , 0 ) is a point P 0, and a plane of x = 0 is a plane λ (projection plane). ), An arbitrary point P on the spherical surface S is projected onto the plane λ using the point P 0 as a focal point (light source) to obtain a point Q. In the present embodiment, the above-described projection is f, and the transformation from the point P on the spherical surface S to the point Q on the plane λ is represented as Q = f (P). In the present embodiment, the projection from the point Q on the plane λ to the point P on the spherical surface S is set to f −1, and the conversion from the point Q on the plane λ to the point P on the spherical surface S is P = f −1. (Q). In the present embodiment, the point P 0 is referred to as the pole of the spherical surface S.

上記のような前提では、射影fにより、球面S上の点(ただし点Pを除く)と平面λ上の点は、1対1の対応関係(1対1写像)となり、f(P)は平面λ上の無限遠点となる。そして本実施形態の手法では、平面λ上において点Qの可動領域を設定することによって、球面S上の点Pの取り得る位置を制限して、関節の曲げ角度を制限する可動範囲を設定する。 Under the above assumption, the projection f causes a point on the spherical surface S (except for the point P 0 ) and a point on the plane λ to have a one-to-one correspondence (one-to-one mapping), and f (P 0 ) Is a point at infinity on the plane λ. In the method of the present embodiment, by setting the movable region of the point Q on the plane λ, the position that the point P on the spherical surface S can take is limited, and the movable range that limits the bending angle of the joint is set. .

まず、平面λ上に互いに直交するs軸とt軸とからなるst座標系をとり、点Qの位置をst座標系で表す。このとき球面S上の座標(1,0,0)となる点Pを変換したf(P)をst座標系の原点とすると、f(P)は球面Sを定義するxyz座標系の原点に一致する。 First, an st coordinate system composed of an s-axis and a t-axis orthogonal to each other on the plane λ is taken, and the position of the point Q is represented by the st coordinate system. At this time, if f (P 1 ) obtained by converting the point P 1 that is the coordinates (1, 0, 0) on the spherical surface S is the origin of the st coordinate system, f (P 1 ) is an xyz coordinate system that defines the spherical surface S. Matches the origin of.

なお、本実施形態では、s軸の正方向(+s)は、z軸の負方向(−z)とし、t軸の正方向(+t)は、y軸の正方向(+y)とする。このような設定により、zx平面内で点Pにy軸回転を掛けたときの点Qの移動方向がs方向になり、xy平面内で点Pにz軸回転を掛けたときの点Qの移動方向がt方向になる。   In the present embodiment, the positive direction (+ s) of the s axis is the negative direction (−z) of the z axis, and the positive direction (+ t) of the t axis is the positive direction (+ y) of the y axis. With such a setting, the movement direction of the point Q when the y-axis rotation is applied to the point P in the zx plane is the s direction, and the point Q when the z-axis rotation is applied to the point P in the xy plane. The moving direction is the t direction.

そして射影fによる点P(x,y,z)から点Q(s,t)への変換は式(1)のようになる。ただし、x+y+z=1である。
Then, the transformation from the point P (x, y, z) to the point Q (s, t) by the projection f is as shown in Expression (1). However, x 2 + y 2 + z 2 = 1.

また射影f−1による点Qから点Pへの変換は式(2)のようになる。このとき、射影f−1による変換によって得られる結果はx+y+z=1を満たすので、座標値の正規化のための処理は不要となる。
Further, the conversion from the point Q to the point P by the projection f −1 is as shown in Expression (2). At this time, since the result obtained by the conversion by the projection f −1 satisfies x 2 + y 2 + z 2 = 1, the process for normalizing the coordinate values is not necessary.

2−2−2.関節の曲げ角度との対応関係
まず、図10に示したように角φおよび角θをとると、点Qの座標(s,t)と、角φおよび角θとの対応関係は、式(3)によって表すことができる。なお、角φおよび角θの範囲は、それぞれ−90°<φ<90°、−90°<θ<90°である。
2-2-2. Correspondence with the bending angle of the joint First, when the angle φ and the angle θ are taken as shown in FIG. 10, the correspondence between the coordinates (s, t) of the point Q and the angle φ and the angle θ 3). The ranges of the angle φ and the angle θ are −90 ° <φ <90 ° and −90 ° <θ <90 °, respectively.

ここで、角φおよび角θを−85°から85°まで5°間隔で変えて平面λ上にグリッド(格子線)を作り、これをf−1で球面Sに射影すると、図11に示すような直交グリッドが得られる。 Here, when the angle φ and the angle θ are changed from −85 ° to 85 ° at intervals of 5 ° to form a grid (lattice line) on the plane λ, and this is projected onto the spherical surface S with f −1 , FIG. 11 shows. Such an orthogonal grid is obtained.

次に、従来の3軸回転角方式と本実施形態の射影方式との対応関係について説明する。z軸回転角r=0の場合におけるy軸回転角rと角φとの対応関係は図12に示すようになり、式(4)で表すことができる。
Next, the correspondence between the conventional three-axis rotation angle method and the projection method of this embodiment will be described. The correspondence relationship between the y-axis rotation angle r y and the angle φ in the case of the z -axis rotation angle r z = 0 is as shown in FIG. 12, and can be expressed by Expression (4).

同様に、y軸回転角r=0の場合におけるz軸回転角rと角θとの対応関係は、θ=r/2となる。そこで、可動範囲を設定する際に式(5)のようにs、tとr、rとを対応させれば、図4および図11に示すように、y軸回転角rおよびz軸回転角rの絶対値が小さい領域では、従来の3軸回転角方式による可動領域と本実施形態の射影方式による可動領域は概ね同形状になる。
Similarly, the correspondence relationship between the z-axis rotation angle r z and the angle θ when the y -axis rotation angle r y = 0 is θ = r z / 2. Therefore, when setting the movable range, if s, t and r y , r z are made to correspond as shown in the equation (5), the y-axis rotation angles r y and z as shown in FIG. 4 and FIG. In a region where the absolute value of the axial rotation angle r z is small, the movable region by the conventional triaxial rotational angle method and the movable region by the projection method of the present embodiment are substantially the same shape.

次に、図13に示すように、球面S上の点Pの位置を角度座標αで表す場合を考える。角度座標αが球面S上の緯度に対応する場合、即ち角度座標αが従来の3軸回転角方式におけるz軸回転角rに対応する場合には、点Pの座標はαとなる。また角度座標αが球面S上の経度に対応する場合、即ち角度座標αが従来の3軸回転角方式におけるy軸回転角rに対応する場合には、点Pの座標はαとなる。これに対して、本実施形態の射影方式では、点Pの座標はαとなる。このように、射影方式による関節角度表現は、従来の3軸回転角方式による緯度表現と経度表現との中間の値をとる。そのため本実施形態の射影方式では、従来の3軸回転角方式による関節角度表現から大きく乖離することがなく方式の移行がスムーズに行えるという利点がある。 Next, consider a case where the position of the point P on the spherical surface S is represented by an angular coordinate α as shown in FIG. When the angle coordinate α corresponds to the latitude on the spherical surface S, that is, when the angle coordinate α corresponds to the z-axis rotation angle r z in the conventional three-axis rotation angle method, the coordinate of the point P is α 1 . Also when the angle coordinates alpha corresponds to the longitude of the spherical surface S, that is, if the angle coordinates alpha corresponds to the y-axis rotation angle r y in the conventional triaxial rotation angle method, the coordinates of the point P is alpha 3 . In contrast, in the projection method of the present embodiment, the coordinates of the point P is alpha 2. In this way, the joint angle expression by the projection method takes an intermediate value between the latitude expression and the longitude expression by the conventional three-axis rotation angle method. For this reason, the projection method of this embodiment has an advantage that the method can be smoothly changed without greatly deviating from the conventional joint angle expression by the three-axis rotation angle method.

2−2−3.従来の3軸回転角方式と本実施形態の射影方式との比較
本実施形態の射影方式でsの範囲をtan−20°〜tan10°とし、tの範囲をtan−5°〜tan15°として、可動領域を矩形制限した場合を図14に示す(図6と比較されたい)。矩形制限の詳細については、「2−3−1.矩形制限による領域設定手法」で後述する。
2-2-3. Comparison between the conventional triaxial rotation angle method and the projection method of the present embodiment In the projection method of the present embodiment, the range of s is tan-20 ° to tan10 °, the range of t is tan-5 ° to tan15 °, FIG. 14 shows a case where the movable region is restricted to a rectangle (compare FIG. 6). Details of the rectangle restriction will be described later in “2-3-1. Region setting method by rectangle restriction”.

次に、z軸回転角rが±90°を超える場合に相当する例を挙げる。本実施形態の射影方式でsの範囲をtan−20°〜tan10°とし、tの範囲をtan−5°〜tan55°とし、可動領域を矩形制限した場合を図15に示す(図7および図8と比較されたい)。 Next, an example corresponding to a case where the z-axis rotation angle r z exceeds ± 90 ° will be described. FIG. 15 shows a case where the range of s is set to tan-20 ° to tan10 °, the range of t is set to tan-5 ° to tan55 °, and the movable region is restricted to a rectangle by the projection method of the present embodiment (FIGS. 7 and FIG. Compare with 8).

また上記と同様の範囲で、可動領域を楕円制限した場合は図16に示すようになり、可動領域を小判形制限した場合は図17に示すようになる(図9と比較されたい)。楕円制限、および小判形制限の詳細については、それぞれ「2−3−2.楕円制限による領域設定手法」、および「2−3−3.小判形制限による領域設定手法」で後述する。   Further, when the movable area is limited to an ellipse within the same range as described above, the result is as shown in FIG. 16, and when the movable area is limited to an oval shape, the result is as shown in FIG. 17 (compare with FIG. 9). Details of the ellipse restriction and the oval restriction will be described later in “2-3-3. Area setting method by oval restriction” and “2-3-3. Area setting technique by oval restriction”, respectively.

以上のように、本実施形態の射影方式を使えば、図15〜図17に示すように、従来の3軸回転角方式では扱えなかった±90°を超える広い可動領域を設定しても、関節を滑らかに動かす表現が可能となる。また、図6および図14に示すように、y軸回転角rや、z軸回転角rが0°〜±50°程度の比較的狭い可動領域を設定する場合には、従来の3軸回転角方式とほぼ同形状の可動領域が得られるので、従来方式からの方式移行が容易であり、式(5)を使って両者の対応関係を容易に設定することができる。 As described above, if the projection method of this embodiment is used, as shown in FIGS. 15 to 17, even if a wide movable region exceeding ± 90 ° that cannot be handled by the conventional three-axis rotation angle method is set, It is possible to express the joints smoothly. Further, as shown in FIGS. 6 and 14, when a relatively narrow movable region in which the y-axis rotation angle r y and the z-axis rotation angle r z are about 0 ° to ± 50 ° is set, the conventional 3 Since a movable region having substantially the same shape as that of the shaft rotation angle method is obtained, it is easy to shift from the conventional method, and the correspondence between both can be easily set using Equation (5).

2−3.可動領域の形状に応じた設定手法
本実施形態の射影方式による可動領域の設定手法は、平面λ上のs、tの範囲を制限することにより、関節の曲げ角度に関する可動領域を設定する。以下、特に断りのない限りs、tの取り得る範囲は式(6)のように設定されているものとして説明する。
2-3. Setting method according to the shape of the movable region The movable region setting method according to the projection method of this embodiment sets the movable region related to the bending angle of the joint by limiting the range of s and t on the plane λ. Hereinafter, unless otherwise specified, the possible range of s and t is assumed to be set as in Expression (6).

2−3−1.矩形制限による領域設定手法
矩形制限とは、平面λ上で図18に示すように矩形の可動領域を設定する手法である。すなわち、s、tがともに式(6)を満たす領域が可動領域となる。実際の関節の可動領域は、図14や、図15に示すように設定される。
2-3-1. Region Setting Method by Rectangle Restriction Rectangle restriction is a method of setting a rectangular movable region on the plane λ as shown in FIG. That is, a region where both s and t satisfy Expression (6) is a movable region. The actual movable region of the joint is set as shown in FIGS. 14 and 15.

2−3−2.楕円制限による領域設定手法
楕円制限とは、平面λ上で図19に示すように楕円形(ellipse)の可動領域を設定する手法である。すなわち、式(6)で設定されたs、tの領域に内接する楕円(楕円の軸はs軸、t軸に平行)の内部が可動領域となる。実際の関節の可動領域は図16や、図20に示すようになる。
2-3-2. Region Setting Method by Ellipse Restriction Ellipse restriction is a method of setting an ellipse movable region on the plane λ as shown in FIG. That is, the inside of the ellipse (the axis of the ellipse is parallel to the s-axis and the t-axis) that is inscribed in the s and t regions set by Expression (6) is the movable region. The actual movable region of the joint is as shown in FIG. 16 or FIG.

ここで楕円制限を数式で表すと式(7)のようになる。
ただし、s、s、t、tは式(8)のとおりである。
Here, the elliptical restriction is expressed by an equation (7).
However, s a , s b , t a , and t b are as in Expression (8).

なお、楕円制限は、領域の内外判定が容易であるが、可動領域を超えた場合の補正に関して矩形制限を採用した場合とは異なる工夫が必要となり、後述にて詳細に説明する。   The ellipse restriction makes it easy to determine the inside / outside of the area, but requires a device different from the case where the rectangular restriction is adopted for correction when the area exceeds the movable area, and will be described in detail later.

2−3−3.小判形制限による領域設定手法
小判形制限とは、平面λ上で図21に示すように小判形(oval)の可動領域を設定する手法である。可動領域の境界は半円と直線とで構成される。図21はs>tの場合で、t=t、t=tの直線部を持つ横長の形状となっている(s、tは式(8)のとおり)。s<tの場合は、図21に示す可動領域を90°回転させた縦長の形状になり、s=tの場合は、直線部の長さが0になるため、可動領域の形状は円となる。
2-3-3. Region Setting Method by Oval Restriction Oval shape limitation is a method for setting an oval movable region on a plane λ as shown in FIG. The boundary of the movable region is composed of a semicircle and a straight line. Figure 21 is a case of s a> t a, t = t 0, t = linear portion of the t 1 has a laterally long shape with a (s a, t a is as illustrated in formula (8)). For s a <t a, becomes a vertically long shape that the movable area is rotated 90 ° as shown in FIG. 21, in the case of s a = t a, the length of the straight section is zero, the movable area The shape is a circle.

なお実際の関節の可動領域は、図17や、図22に示すような形状になり、その境界は4つの小円から構成される(詳しくは後述の「2−4−2.射影fの特徴」参照)。なお小円とは、球面上の円を分類した呼称で、球面と、その球の中心を通らない平面とが交差してできる円のことであり、地球に例えれば赤道以外の緯線は小円に相当する。   The actual joint movable region has a shape as shown in FIGS. 17 and 22, and its boundary is composed of four small circles (for details, see “2-4-2. Characteristics of Projection f” described later). "reference). The small circle is a name that classifies the circles on the sphere, and is a circle formed by the intersection of the sphere and a plane that does not pass through the center of the sphere. For example, parallel lines other than the equator are small circles. It corresponds to.

2−3−4.超楕円制限による領域設定手法
本実施形態の手法によれば、上述の楕円制限を一般化し、超楕円制限とすることも可能である。楕円制限が2乗和で表されるのに対し、超楕円制限はm乗n乗和で表され、式(9)のようになる。
式(9)において、例えば、m=n=4(4乗和)の場合、可動領域は図23に示すようになる(図20や、図22と比較されたい)。なお、上述した楕円制限は式(9)においてm=n=2の場合に相当し、上述した矩形制限は式(9)においてm=n=∞の場合に相当する。
2-3-4. Region setting method based on super-elliptical restriction According to the method of the present embodiment, the above-mentioned elliptic restriction can be generalized to be super-elliptical restriction. Whereas the ellipse limit is expressed as a sum of squares, the super ellipse limit is expressed as a sum of m-th power and n-th power as shown in Equation (9).
In Expression (9), for example, when m = n = 4 (sum of the fourth power), the movable region is as shown in FIG. 23 (compare with FIG. 20 and FIG. 22). The above-mentioned elliptical restriction corresponds to the case where m = n = 2 in Expression (9), and the above-described rectangular restriction corresponds to the case where m = n = ∞ in Expression (9).

2−3−5.円弧と直線の組合せによる領域設定手法
上述した超楕円制限や更に複雑な形状の代わりに、円弧と直線を組み合わせて平面λに可動領域を設定することも可能である。可動領域外の値が得られた場合に値を補正する際に、超楕円制限では、最適解を代数的に求めることができないが、円弧と直線の組合せによる領域形状ならば最適解を代数的に求めることが可能である。
2-3-5. Region setting method by combination of arc and straight line Instead of the super ellipse restriction and the more complicated shape described above, it is also possible to set a movable region on the plane λ by combining an arc and a straight line. When correcting a value when a value outside the movable range is obtained, the optimal solution cannot be obtained algebraically with the super-elliptical restriction, but if the region shape is a combination of an arc and a straight line, the optimal solution is algebraic. It is possible to ask for.

2−4.可動領域を超えた場合の補正手法
関節の曲げ状態が、設定された可動領域を超えた場合には、これを可動領域内に戻すための補正が必要となるため、その補正手法について説明する。
2-4. Correction Method When Exceeding Movable Region When the bending state of the joint exceeds the set movable region, correction is required to return it to the movable region, and the correction method will be described.

2−4−1.球面垂線と最適解
球面S上に可動領域Aが設定され、領域A外の点Pが与えられたとき、点Pの位置を領域A内(境界を含む)に補正した点を点Pとする。領域A内の点のうち、点Pからの距離(球面S上での距離)が最小となる点を点Pとするのが最良であると考えられ、この条件を満たす点Pを最適解と呼ぶことにする。
2-4-1. Spherical perpendicular and optimal solution When a movable area A is set on the spherical surface S and a point P outside the area A is given, a point obtained by correcting the position of the point P within the area A (including the boundary) is defined as a point P m To do. Among the points in the area A, is considered to be the best to the point where the distance from the point P (a distance on the sphere S) is minimized and the point P m, the optimum satisfy this condition point P m I will call it the solution.

ここで、説明の便宜上「球面垂線」という用語を次のように定義する。球面S上において点Pと曲線Lが与えられたとき、点Pを通り曲線Lに直交する大円を、点Pから曲線Lに下ろした球面垂線と呼び、曲線Lと球面垂線との交点を球面垂線の足とする。なお大円とは、球面上の円を分類した呼称で、球面と、その球の中心を通る平面とが交差してできる円のことをいい、地球に例えれば赤道や経線が大円に相当する。   Here, for convenience of explanation, the term “spherical perpendicular” is defined as follows. When a point P and a curve L are given on the sphere S, a great circle passing through the point P and perpendicular to the curve L is called a spherical perpendicular drawn from the point P to the curve L, and the intersection of the curve L and the spherical perpendicular is the intersection It is a leg of a spherical perpendicular. The great circle is a name that classifies the circles on the sphere, and refers to a circle formed by the intersection of the sphere and the plane that passes through the center of the sphere. In the case of the Earth, the equator and meridians are equivalent to the great circle. To do.

図24に示すように、点Pの最適解は、点Pから可動領域の境界に下ろした球面垂線の足となる。ただし、矩形制限のように領域形状が頂点を持つ場合には、この頂点が点Pの最適解になることがある。 As shown in FIG. 24, the optimal solution of the point P m is a foot sphere perpendicular dropped to the boundary of the movable area from the point P. However, when the area shape as rectangular limit has a vertex, sometimes this vertex is optimal solution of the point P m.

2−4−2.射影fの特徴
球面Sから平面λへの射影fには、次の(A1)および(A2)ような特徴がある。
2-4-2. Features of Projection f The projection f from the spherical surface S to the plane λ has the following features (A1) and (A2).

(A1)2本の線が交わる角度は、射影fによって変わらない(fは等角写像)。   (A1) The angle at which the two lines intersect does not change with the projection f (f is an equiangular mapping).

(A2)球面S上の円は、平面λ上の円または直線に射影され、その逆も成り立つ。互いに射影関係にある、球面S上の円と、平面λの円または直線との間の詳細な対応関係は下表のようになる。表1中の条件C1とは、図25に示すように円の半径をr、原点(0,0)から円の中心までの距離をdとするとき、式(10)が成立することである。
(A2) The circle on the spherical surface S is projected onto a circle or a straight line on the plane λ, and vice versa. The detailed correspondence between the circle on the spherical surface S and the circle or straight line of the plane λ, which are in a projecting relationship with each other, is as shown in the table below. The condition C1 in Table 1 is that the equation (10) is satisfied when the radius of the circle is r and the distance from the origin (0, 0) to the center of the circle is d as shown in FIG. .

したがって、球面S上で点Pから可動領域の境界に下ろした球面垂線は、平面λ上では次の(B1)および(B2)のいずれかになる。
(B1)可動領域境界に直交する円(条件C1を満たす。)
(B2)可動領域境界に直交する直線(原点(0,0)を通る。)
この性質を利用すれば、可動領域の形状によっては、Pの最適解を求めることが可能となる。
Therefore, the spherical perpendicular drawn from the point P to the boundary of the movable region on the spherical surface S is either of the following (B1) and (B2) on the plane λ.
(B1) A circle perpendicular to the movable region boundary (condition C1 is satisfied)
(B2) A straight line orthogonal to the boundary of the movable region (passes the origin (0, 0))
By utilizing this property, depending on the shape of the movable area, it is possible to find an optimal solution of P m.

2−4−3.矩形制限に対する最適解
矩形制限では、平面λ上に図18に示すような長方形の可動領域が設定される。まず、球面S上で、可動領域の1辺(例としてs=sに相当する辺)に点Pから球面垂線PPを下ろすことを考える。f(P)の座標を(s,t)とする(f(P)は点Pを平面λ上に射影した点である)。
2-4-3. Optimal solution for rectangular restriction In the rectangular restriction, a rectangular movable region as shown in FIG. 18 is set on the plane λ. First, consider that the spherical perpendicular PP f is lowered from the point P to one side of the movable region (for example, the side corresponding to s = s 0 ) on the spherical surface S. The coordinates of f (P) are set to (s p , t p ) (f (P) is a point obtained by projecting the point P onto the plane λ).

ここでt≠0の場合には、球面垂線PPを求めることは、平面λ上で次の3条件(D1)〜(D3)を満たす円を求めることに相当する。
(D1)点f(P)を通る。
(D2)直線s=sに直交する。
(D3)式(10)を満たす。
Here, when t p ≠ 0, obtaining the spherical perpendicular PP f is equivalent to obtaining a circle that satisfies the following three conditions (D1) to (D3) on the plane λ.
(D1) It passes through the point f (P).
(D2) perpendicular to the straight line s = s 0.
(D3) Expression (10) is satisfied.

そして図26に示すように、求める円の中心座標を(s,t)、半径をrとすると、これらは式(11)で得られる。
Then, as shown in FIG. 26, the center coordinates of the circle to determine (s c, t c), when the radius is r c, which are obtained by Equation (11).

図26において、点f(P)は、式(11)により得られた円と直線s=sとの交点であって、点f(P)の座標を(s,t)とする(必然的にs=sである)。このとき、t≦t≦tであれば、矩形に設定された可動領域の境界となる辺に対して球面垂線を下ろせたことになる。ただし、図27に示すように球面垂線は必ずしも可動領域の境界となる辺への最短距離とはならない。図27に示す例では、点Pから辺Bに下ろした球面垂線Pは、点Pから辺Bへの最短距離である。しかし、点Pから辺Bへの最短距離は、球面垂線Pではなく大円Pである。 In FIG. 26, a point f (P f ) is an intersection of the circle obtained by the equation (11) and the straight line s = s 0, and the coordinates of the point f (P f ) are (s f , t f ). (Necessarily s f = s 0 ). At this time, if t 0 ≦ t f ≦ t 1 , it means that the spherical perpendicular is lowered with respect to the side that becomes the boundary of the movable region set to the rectangle. However, as shown in FIG. 27, the spherical perpendicular is not necessarily the shortest distance to the side that becomes the boundary of the movable region. In the example shown in FIG. 27, the side B 1 B 2 to the spherical perpendicular P a P f drawn from the point P a, which is the shortest distance from the point P a to the side B 1 B 2. However, the shortest distance from the point Pb to the side B 1 B 2 is not the spherical perpendicular P b P f but the great circle P b B 2 .

ここで、辺B(小円B)の球面上の中心を点Pとする。球面上の点Pから辺Bに下ろした球面垂線が辺Bへの最短距離となるのは、点Pが領域Pの内部に位置する場合のみである。また、点Pが領域Pの内部にあれば、必ず点Pから辺Bに球面垂線を下ろすことができる。本実施形態では、領域Pを辺Bの最近点領域と呼ぶことにする。平面λ上での、可動領域の4辺に対する最近点領域の例を図28に示す。 Here, a center on the spherical surface of the side B 1 B 2 (small circle B 1 B 2 ) is set as a point P z . The spherical perpendicular drawn from the point P on the sphere in the side B 1 B 2 is the shortest distance to the side B 1 B 2 is only the case if the point P is located within the area P z B 1 B 2 . Furthermore, point P if the interior of the region P z B 1 B 2, it is possible to lower the spherical perpendicular always from the point P to the side B 1 B 2. In the present embodiment, the region P z B 1 B 2 is referred to as the closest point region of the side B 1 B 2 . FIG. 28 shows an example of the nearest point area with respect to the four sides of the movable area on the plane λ.

ここで図26において、点f(P)のt座標はt=t±rとなるが、複号±のうち有効となるのはtの正負と同じものだけである。そうでなければf(P)は最近点領域外となるからである。この有効なtがt≦t≦tであれば、Pを最適解としてよいことになる。 In Figure 26, where the t coordinate of the point f (P f) becomes a t f = t c ± r c, become effective within the decoding ± is only the same as the sign of t p. Otherwise, f (P) is outside the nearest point area. If this effective t f is t 0 ≦ t f ≦ t 1 , P f may be an optimal solution.

またt=0の場合は、球面垂線PPの平面λへの射影(の延長)は、f(P)と原点(0,0)を結ぶ直線になる。したがって、t≦0≦tであれば、球面垂線を下ろせたことになる。さらにs−(s +1)1/2≦s≦sの場合に限り、点Pが最近点領域に含まれ、この球面垂線の足(s=s,t=0)が最適解となる。この判定式は式(12)のように書き換えることができる。
When t p = 0, the projection (extension) of the spherical perpendicular PP f onto the plane λ is a straight line connecting f (P) and the origin (0, 0). Therefore, if t 0 ≦ 0 ≦ t 1 , the spherical perpendicular is lowered. Furthermore, only when s 0 − (s 0 2 +1) 1/2 ≦ s p ≦ s 0 , the point P is included in the nearest point region, and the foot of this spherical perpendicular (s f = s 0 , t f = 0) ) Is the optimal solution. This judgment formula can be rewritten as shown in formula (12).

またs=sの辺を対象とする場合には、上記判定式(式(12))の替わりに式(13)を用いる。
Further, when the side of s = s 1 is targeted, Expression (13) is used instead of the above-described determination expression (Expression (12)).

点f(P)が矩形に設定された可動領域の4辺のそれぞれに対応する最近点領域のいずれにも含まれない場合は、点Pから可動領域の境界に対して球面垂線を下ろせないことを意味する。この場合、最適解Pは可動領域の4頂点のいずれかになるため、球面S上で点Pと可動領域の4頂点との距離を求め、求めた距離が最小となる頂点が最適解Pである。 If the point f (P) is not included in any of the nearest point areas corresponding to each of the four sides of the movable area set to a rectangle, the spherical perpendicular cannot be lowered from the point P to the boundary of the movable area. Means. In this case, since the optimum solution P m is one of the four vertices of the movable region, the distance between the point P and the four vertices of the movable region on the spherical surface S is obtained, and the vertex having the smallest obtained distance is the optimum solution P. m .

2−4−4.矩形制限に対する簡易解
矩形制限における補正手法には、以下に述べるような簡易解が考えられる。これは、平面λ上で、点f(P)からの距離が最小となるような可動領域内の点を解とする手法である。点f(P)のs座標をsとし、補正後のs座標をsとすると、式(14)のようになる。t座標についても同様である。
2-4-4. Simplified solution for rectangle limitation The following simple solution can be considered as a correction method for rectangle limitation. This is a method in which a point in the movable region that minimizes the distance from the point f (P) on the plane λ is used as a solution. The s coordinates of the point f (P) and s p, the s coordinates after the correction when the s m, so that the equation (14). The same applies to the t coordinate.

ただし、この簡易解が最適解に対する近似解として使えるのは、可動領域が狭い(s、s、t、tの絶対値が小さい)場合または補正量が小さい場合に限られる。この条件に該当しない場合には、図29に示す例のように不具合を生じる。図29に示す例では、点Pに対する最適解が点Pmaであるのに対して、簡易解は点Pma´となる。また、点Pに対する最適解がPmbであるのに対して、簡易解は球面Sの反対側から回って点Pmb´となってしまう。 However, this simple solution can be used as an approximate solution for the optimal solution only when the movable region is narrow (the absolute values of s 0 , s 1 , t 0 , and t 1 are small) or when the correction amount is small. If this condition is not met, a problem occurs as in the example shown in FIG. In the example shown in FIG. 29, while the optimal solution for the point P a is a point P ma, simple solutions a point P ma '. Also, for optimal solution to the point P b that is P mb, simple solutions becomes a point P mb 'around from the opposite side of the sphere S.

2−4−5.楕円制限
楕円制限の場合、最適解を求めることは、平面λ上で楕円形の可動領域の境界に直交する円を求めることに相当する。しかし、その解を求める式は高次方程式となり、代数的に解くことができない。
2-4-5. Elliptic restriction In the case of elliptical restriction, finding the optimal solution corresponds to finding a circle orthogonal to the boundary of the elliptical movable region on the plane λ. However, the equation for finding the solution is a high-order equation and cannot be solved algebraically.

最適解の近似解として、平面λ上で楕円形の可動領域の境界に下ろした垂線の足を解とする方法が考えられる。この場合、解くべき式は4次方程式となり代数的に解を得ることが可能となる。数式処理ソフトウェア等を用いれば、実際に解の式が得られるが、非常に繁雑な式となり実用的でない。なお、類似の問題として、楕円体への垂線を求める方法が「John C. Hart, Distance to an Ellipsoid. Graphics Gems IV,pp113-119,Academic Press Inc.,1994」に記されている。   As an approximate solution of the optimal solution, there can be considered a method in which the solution is a perpendicular foot drawn on the boundary of the elliptical movable region on the plane λ. In this case, the equation to be solved is a quartic equation and a solution can be obtained algebraically. If mathematical expression processing software or the like is used, an equation for the solution can be actually obtained, but it becomes a very complicated equation and is not practical. As a similar problem, a method for obtaining a perpendicular to an ellipsoid is described in “John C. Hart, Distance to an Ellipsoid. Graphics Gems IV, pp113-119, Academic Press Inc., 1994”.

そこで本実施形態では、解としては全く不正確であるが、図30に示すように、f(P)を楕円の中心に向かって補正し簡易解f(P)を得る手法を採用している。 Therefore, in this embodiment, although the solution is completely inaccurate, as shown in FIG. 30, a method is adopted in which f (P) is corrected toward the center of the ellipse to obtain a simple solution f (P m ). Yes.

点f(P)の座標(s,t)は次式(15)のように容易に求められる。ただし、s、s、t、tは式(8)のとおりである。
The coordinates (s m , t m ) of the point f (P m ) can be easily obtained as in the following equation (15). However, s a , s b , t a , and t b are as in Expression (8).

式(15)により得られる本実施形態の楕円制限における簡易解は一般的には全く不正確であるが、s=−s=t=−tの場合には、可動領域が、x軸を中心とする円になるので最適解に一致する。そのため、可動領域がこの条件に合う場合、あるいはこの条件に近い場合には、簡易解を用いても問題はない。 In general, the simple solution in the elliptical restriction of the present embodiment obtained by the equation (15) is completely inaccurate. However, when s 0 = −s 1 = t 0 = −t 1 , the movable region is Since it is a circle centered on the x-axis, it matches the optimal solution. Therefore, if the movable region meets this condition or is close to this condition, there is no problem even if the simple solution is used.

逆に、簡易解が明確に不具合を生じるのは、次のような場合である。3次元空間での関節の可動領域を模式的に図31に示すように表し、関節は図の下方向に外力(重力等)を受けているものとする。この場合関節はAの位置(最も低い位置)に落ち着くべきであるが、簡易解を用いて補正を行うとAの位置になる。例えば、一旦Aの位置にあったとしても、外力によりA´に移動、簡易解Aに補正、外力によりA´に移動、簡易解Aに補正、という段階を経て、最終的にAの位置に落ち着く。 On the other hand, it is in the following cases that the simple solution causes a problem clearly. The movable region of the joint in the three-dimensional space is schematically represented as shown in FIG. 31, and the joint is assumed to receive an external force (such as gravity) in the downward direction of the figure. In this case the joint should settle at the position of A 0 (the lowest position), the position of A n When correction is performed using a simple solution. For example, once Even the position of A 0, A 0 by an external force 'movement, the correction simply solution A 1, A 1 by an external force' movement, the correction in a simple solution A 2, through the stages of the final settle down to the position of a n in.

2−4−6.小判形制限
小判形制限では、平面λ上に図21に示すような小判形の可動領域が設定される。可動領域境界の直線部を「辺」、半円部を「弧」と呼ぶこととする。また、これらを球面Sに射影したものも同様の呼び方とする。弧の中心座標を(s,t)、半径をrとする。このときs≦t(可動領域の形状が平面λ上で縦長)の場合には、式(16)のようになる。なお、式(16)において、tに関する2つの値は、順に下側の弧および上側の弧に対するものである。
2-4-6. Oval restriction In oval restriction, an oval movable region as shown in FIG. 21 is set on the plane λ. The straight line portion of the movable region boundary is called “side”, and the semicircular portion is called “arc”. Further, the projection of these onto the spherical surface S will be called in the same way. The center coordinates of the arc (s e, t e), the radius is r e. At this time, when s a ≦ t a (the shape of the movable region is vertically long on the plane λ), Expression (16) is obtained. In the equation (16), the two values for t e is sequentially directed against the lower side of the arc and an upper arc.

次に、s≧t(可動領域の形状が平面λ上で横長)の場合には、式(17)のようになる。なお、式(17)において、sに関する2つの値は、順に左側の弧および右側の弧に対するものである。
Next, when s a ≧ t a (the shape of the movable region is horizontally long on the plane λ), the equation (17) is obtained. In equation (17), the two values relating to s e are for the left arc and the right arc in order.

続いて、s≦tの場合における補正方法を説明する。まず、球面S上で、可動領域の境界の辺に点Pから球面垂線PPを下ろすことを考える。これは、矩形制限における可動領域の境界の1辺に球面垂線を下ろす場合と全く同じである。したがって、球面垂線が下ろせるかどうか、下ろした球面垂線が可動領域への最短距離になるかどうかは、矩形制限の場合と同様の手法で判定できる。可動領域の2辺の上に最適解が存在しない場合は、可動領域の弧に下ろした球面垂線の足Pが最適解となる。2本の弧に対して点Pを求め、球面S上での点Pとの距離が最小となるものを最適解とする。 The following describes a correction method in the case of s a t a. First, on the spherical surface S, let us consider dropping the spherical perpendicular PP f from the point P to the side of the boundary of the movable region. This is exactly the same as the case where a spherical perpendicular is drawn on one side of the boundary of the movable region in the rectangular restriction. Therefore, whether or not the spherical perpendicular can be lowered and whether or not the lowered spherical perpendicular is the shortest distance to the movable region can be determined by the same method as in the case of the rectangular restriction. If optimal solutions on the two sides of the movable area is not present, the foot P f of the spherical perpendicular drawn to the arc of the movable area is optimal solution. The point Pf is obtained for two arcs, and the one having the smallest distance from the point P on the spherical surface S is determined as the optimum solution.

以下では、小判形制限の可動領域(s≦tの場合)の2本の弧のうち下側の弧を例にとって、球面垂線の足を求める方法を述べる。前述のように、球面S上の大円は平面λ上では円または直線になる。 In the following, an example the lower arc of the two arcs of the movable region of the oval limits (case of s a ≦ t a), describes a method for determining the foot spherical perpendicular. As described above, the great circle on the spherical surface S becomes a circle or a straight line on the plane λ.

まず、球面垂線PPが平面λ上で円になる場合を考える。この球面垂線を求めることは、平面λ上で次の3条件(E1)〜(E3)を満たす円を求めることに相当する。
(E1)点f(P)を通る。
(E2)可動領域の弧に直交する。
(E3)式(10)を満たす。
First, consider a case where the spherical perpendicular PP f is a circle on the plane λ. Obtaining this spherical perpendicular corresponds to obtaining a circle that satisfies the following three conditions (E1) to (E3) on the plane λ.
(E1) Pass through the point f (P).
(E2) It is orthogonal to the arc of the movable region.
(E3) Expression (10) is satisfied.

ここで、求める円の中心座標を(s,t)、半径をrとすると、点f(P)の座標(s,t)は以下の手順で求めることができる。 Here, if the center coordinates of the circle to be obtained are (s c , t c ) and the radius is r c , the coordinates (s f , t f ) of the point f (P f ) can be obtained by the following procedure.

まず、式(18)によりs、tを求める。なお、式(18)でk=0となるのは、点f(P)、弧の中心点(s,t)、原点(0,0)の3点が一直線上に存在する場合で、これは球面垂線PPが平面λ上で直線になる場合である。したがって、ここではk≠0としてよい。
First, s c and t c are obtained from equation (18). In Equation (18), k 2 = 0 when the point f (P), the arc center point (s e , t e ), and the origin (0, 0) exist on a straight line. This is the case where the spherical perpendicular PP f becomes a straight line on the plane λ. Therefore, here k 2 ≠ 0.

続いて、式(19)によりrを求める。
Then, determine the r c by the equation (19).

続いて、式(20)によりkを求める。
ここで式(20)で求めたkが式(21)を満たす場合のみ、式(22)によって得られるs、tが有効となる。k>0の場合は、弧ではなくその延長(可動領域の内部)に球面垂線を下ろすことを意味するので、解として無効なものだからである。
Then, determine the k 4 by the equation (20).
Here, s f and t f obtained by the equation (22) are valid only when k 4 obtained by the equation (20) satisfies the equation (21). This is because when k 4 > 0, it means that the spherical normal is lowered not in the arc but in its extension (inside the movable region), so that it is invalid as a solution.

ただし、式(20)、式(22)は複号同順である。また、条件k≦0は、式(20)の複号の両方に対して同時に成り立つ場合があるので注意が必要である。これは、可動領域の一方の弧に対して点Pから2本の球面垂線が下ろせることを意味する。なぜなら平面λ上では可動領域の弧は半円(中心角180°)であるが、球面S上では中心角が180°を超えることがあるので、2本の球面垂線が存在し得るからである。 However, Formula (20) and Formula (22) are in the same order of compound numbers. In addition, the condition k 4 ≦ 0 must be noted because it may hold simultaneously for both of the complex signs in equation (20). This means that two spherical perpendiculars can be drawn from the point P with respect to one arc of the movable region. This is because the arc of the movable region is a semicircle (center angle 180 °) on the plane λ, but the center angle may exceed 180 ° on the spherical surface S, so two spherical perpendiculars may exist. .

以上の説明は、可動領域の下側の弧に球面垂線を下ろす場合である。上側の弧の場合には、式(21)がk≧0となる。 The above description is a case where a spherical normal is drawn on the lower arc of the movable region. In the case of the upper arc, equation (21) becomes k 4 ≧ 0.

次に、球面垂線PPが平面λ上で直線になる場合を考える。これは、式(18)でk=0となる場合である。この球面垂線を求めることは、平面λ上で次の3条件(F1)〜(F3)を満たす直線を求めることに相当する。
(F1)点f(P)を通る。
(F2)可動領域の弧に直交する(これは点(s,t)を通ることと同値である)。
(F3)原点(0,0)を通る。
Next, consider a case where the spherical perpendicular PP f is a straight line on the plane λ. This is a case where k 2 = 0 in Equation (18). Obtaining the spherical perpendicular corresponds to obtaining a straight line that satisfies the following three conditions (F1) to (F3) on the plane λ.
(F1) Passes through the point f (P).
(F2) orthogonal to the arc of the movable region (this is equivalent to passing through the point (s e , t e )).
(F3) Pass through the origin (0, 0).

このとき最適解Pの座標(s,t)は式(23)により得られる。ただし、複号±のうち有効となるのは、上側の弧の場合はtの正負と同じもの、下側の弧の場合はtの正負と反対のものだけである。そうでなければ、弧ではなくその延長(可動領域の内部)に球面垂線を下ろすことを意味するので、解として無効である。
At this time, the coordinates (s f , t f ) of the optimum solution P f are obtained by the equation (23). However, to become effective within the decoding ±, if the upper arc the same as the sign of the t h, in the case of lower arc are only those of opposite sign of t h. Otherwise, it means that a spherical normal is drawn not on the arc but on its extension (inside the movable area), so it is invalid as a solution.

2−4−7.超楕円制限
超楕円制限の場合は、楕円制限の場合と同様に、最適解を求めるには高次方程式を解くことが必要となり、現実的でない。楕円制限における簡易解と同様に、平面λ上で超楕円形の可動領域の中心に向かって補正をすれば、簡易解を得ることができる。ただし、楕円制限の場合とは異なり、s=−s=t=−tの場合でも、簡易解は最適解に一致しないので注意を要する。
2-4-7. Super-elliptic restriction In the case of super-elliptical restriction, as in the case of elliptic restriction, it is necessary to solve a higher-order equation to obtain an optimal solution, which is not practical. Similar to the simple solution in the ellipse restriction, a simple solution can be obtained if correction is made toward the center of the super-elliptical movable region on the plane λ. However, different from the case of elliptic restriction, it should be noted that the simple solution does not match the optimal solution even in the case of s 0 = −s 1 = t 0 = −t 1 .

2−4−8.円弧と直線の組合せによる制限
超楕円制限の替わりに、図32に示すように円弧と直線の組合せで可動領域を設定すれば、小判形制限の場合とほぼ同様の補正手法により最適解を求めることができる。
2-4-8. Limitation by a combination of arc and straight line Instead of the super elliptical limit, if a movable area is set by a combination of an arc and a straight line as shown in Fig. 32, an optimum solution can be obtained by the correction method almost the same as the case of oval limitation. Can do.

2−5.捻り角の扱い
2−5−1.捻り角の定義
既に述べたように、関節の曲げ状態は、球面S上の点Pの位置で表すことができる。これに対して捻りは、軸OP回りの回転として表される(Oは球面Sの中心)。捻り角を扱うには、曲げ状態が与えられたとき、その曲げ状態における捻り角0°の向きを予め定義する必要がある。
2-5. Handling of torsion angle 2-5-1. Definition of Twist Angle As already described, the bending state of the joint can be expressed by the position of the point P on the spherical surface S. On the other hand, twist is expressed as rotation around the axis OP (O is the center of the spherical surface S). In order to handle the twist angle, when a bent state is given, it is necessary to predefine the direction of the twist angle of 0 ° in the bent state.

まず、親骨と子骨の座標軸の向きが一致(3軸とも一致)している状態を基準状態とし、この状態の捻り角を0°と定義する。これは、図10に示す球面S上において曲げ状態を示す点が点P(座標(1,0,0)の点)に存在する場合おける捻り角0°の状態である。 First, a state in which the directions of the coordinate axes of the parent bone and the child bone are coincident (all coincident with the three axes) is defined as a reference state, and the twist angle in this state is defined as 0 °. This is a state where the twist angle is 0 ° when a point indicating a bending state exists on the spherical surface S shown in FIG. 10 at a point P 1 (point of coordinates (1, 0, 0)).

また本実施形態では、以下のように「単純回転」を定義する。   In this embodiment, “simple rotation” is defined as follows.

具体的には、始点を共有する任意の単位ベクトルv、vに対して、次の条件(G1)、(G2)を満たす回転を、vからvへの単純回転と定める。なおv=vの場合は無回転とし(回転マトリクスで表すと単位行列)、v=−vの場合は定義不能とする。
(G1)v、vのなす平面に垂直な軸の回りの回転。
(G2)回転によりvはvに一致する。
Specifically, a rotation that satisfies the following conditions (G1) and (G2) with respect to arbitrary unit vectors v 1 and v 2 sharing the start point is defined as a simple rotation from v 1 to v 2 . In addition, when v 1 = v 2 , no rotation is performed (unit matrix when expressed as a rotation matrix), and when v 1 = −v 2 , the definition is impossible.
(G1) Rotation around an axis perpendicular to the plane formed by v 1 and v 2 .
(G2) v 1 matches v 2 by rotation.

基準状態に対してOPからOPへの単純回転を施した状態を、曲げ状態Pにおける捻り角0°状態と定義する。捻り角0°状態の子骨のy軸、z軸の向きは、図11のグリッドと同じ向きになる。なおP=Pの場合は、捻り角0°の向きは定義不能である。 A state in which the simple rotation from OP 1 to OP with respect to the reference state is defined as a state where the twist angle in the bending state P is 0 °. The orientation of the y-axis and the z-axis of the skeleton in the state where the twist angle is 0 ° is the same as the grid in FIG. When P = P 0 , the direction with a twist angle of 0 ° cannot be defined.

以上のように関節の捻り角を定義すると、式(24)に示す関節の回転マトリクスMは、式(25)〜式(27)に示すように曲げマトリクスMと捻りマトリクスMとに分解できる。ただし、マトリクスのタイプ(掛ける順序、要素の並び等)は、列ベクトルを掛けるタイプとする。
When defining the twist angle of the joint as described above, the rotation matrix M of the joint shown in equation (24), equation (25) bent as shown in to Formula (27) decomposed into a matrix M b and torsion matrix M t it can. However, the matrix type (the order of multiplication, the arrangement of elements, etc.) is the type of multiplication by column vectors.

ただし、式(26)および式(27)におけるdは式(28)に示すとおりである。なお、式(28)はd=1/(m00+1)としても等価であるが、m00≒−1(P≒Pに相当)の場合の桁落ちを避けるためには式(28)を用いるほうが良い。
However, d 0 in formula (26) and formula (27) is as shown in formula (28). Note that equation (28) is equivalent even when d 0 = 1 / (m 00 +1), but in order to avoid a loss of digits when m 00 ≈−1 (corresponding to P≈P 0 ), equation (28) ) Is better.

2−5−2.捻り角の0°固定
関節の曲げを可動範囲内に補正しつつ、関節の捻り角は常に0°とする場合について説明する。与えられた関節の回転状態を表すマトリクスを式(24)のMとし、これを可動範囲内に補正することによって得られるマトリクスをMとする。
2-5-2. A description will be given of a case where the twist angle of the joint is always 0 ° while correcting the bending of the joint within the movable range. The matrix representing rotation states of a given joint is M of the formula (24), the matrix obtained by correcting it to the movable range and M 1.

このとき、与えられた曲げ状態を表す球面S上の点を点Pとすると、点Pの座標(x,y,z)は式(29)で得られる。
At this time, assuming that a point on the spherical surface S representing the given bending state is a point P, the coordinates (x, y, z) of the point P are obtained by Expression (29).

この点Pを前述の方法により可動領域内に補正する。この補正結果に対応する球面S上の点を点Pとし、その座標を(x,y,z)とすると、Mは式(30)、式(31)により得られる。
This point P is corrected within the movable region by the method described above. If a point on the spherical surface S corresponding to the correction result is a point P m and its coordinates are (x m , y m , z m ), M 1 is obtained by the equations (30) and (31).

また点f(P)のst座標(s,t)を使ってMを表すと式(32)、式(33)のようになる。
Further, when M 1 is expressed using the st coordinate (s m , t m ) of the point f (P m ), the equations (32) and (33) are obtained.

式(32)、式(33)を使えば、平面λ上で曲げ状態を補正した後、点Pに対応する座標(x,y,z)を求める計算を介することなく直接Mを求められるので、計算量を減らすことができる。 By using the equations (32) and (33), after correcting the bending state on the plane λ, it is possible to directly perform M without going through the calculation for obtaining the coordinates (x m , y m , z m ) corresponding to the point P m. Since 1 is obtained, the amount of calculation can be reduced.

2−5−3.捻り角の可動範囲の設定手法
関節の曲げ・捻りともに、設定された可動範囲内に補正する場合について説明する。与えられた回転状態を表すマトリクスを式(24)のMとし、これを可動範囲内に補正することによって得られるマトリクスをMとする。
2-5-3. Setting method of movable range of torsion angle A case where both bending and twisting of a joint are corrected within the set movable range will be described. The matrix that represents a given rotational state is M of the formula (24), the matrix obtained by correcting it to the movable range and M 2.

ここで、Mは、式(25)、式(26)、式(27)、式(28)のように曲げと捻りに分解できる。曲げについては、式(29)、式(30)、式(31)を使って補正される。   Here, M can be decomposed into bending and twisting as shown in Expression (25), Expression (26), Expression (27), and Expression (28). About bending, it correct | amends using Formula (29), Formula (30), and Formula (31).

補正前の捻り角をψとすると、ψは式(34)から求めることができる。
この捻り角ψが可動範囲外の場合は、これを補正しψとする。ψによる捻りマトリクスMt2は式(35)のようになり、Mは式(36)により得られる。
Assuming that the twist angle before correction is ψ, ψ can be obtained from equation (34).
If this twist angle ψ is outside the movable range, this is corrected to ψ m . The twist matrix M t2 by ψ m is as shown in Equation (35), and M 2 is obtained by Equation (36).

2−6.四元数による表現
2−6−1.曲げ・捻りの分解
関節の回転を表すのに四元数を用いる場合について考える。前述のマトリクスを使う場合と同様に、四元数も曲げと捻りに分解することができる。関節の回転を表す四元数qは、次のように曲げ四元数qと捻り四元数qとに分解される。
2-6. Representation by quaternion 2-6-1. Bending and twisting decomposition Consider the case where quaternions are used to represent joint rotation. As with the previous matrix, quaternions can be broken down into bends and twists. Quaternion representing a rotation of the joint q is decomposed into a quaternion bent as follows q b and twist quaternion q t.

qの要素を(q,q,q,q)とすると、曲げ四元数qの要素(qbx,qby,qbz,qbw)は次のようになる。
If the elements of q are (q x , q y , q z , q w ), the elements (q bx , q by , q bz , q bw ) of the bending quaternion q b are as follows.

また捻り四元数qの要素(qtx,qty,qtz,qtw)は次のようになる。
The elements of the twisted quaternion q t (q tx , q ty , q tz , q tw ) are as follows.

2−6−2.曲げと捻りの補正手法
与えられた曲げ状態を表す球面S上の点を点Pとすると、点Pの座標(x,y,z)は式(40)で得られる。
この点Pを前述の方法により可動領域内に補正する。この補正結果に対応する球面S上の点を点Pとし、その座標を(x,y,z)とすると、補正後の曲げ四元数q=(q1x,q1y,q1z,q1w)は式(41)により得られる。
2-6-2. Bending and twisting correction method When a point on the spherical surface S representing a given bending state is a point P, the coordinates (x, y, z) of the point P are obtained by the equation (40).
This point P is corrected within the movable region by the method described above. If the point on the spherical surface S corresponding to the correction result is a point P m and the coordinates are (x m , y m , z m ), the corrected bending quaternion q 1 = (q 1x , q 1y , q 1z , q 1w ) is obtained by the equation (41).

なお点Pの座標(x,y,z)を使わず、点f(P)の座標(s,t)を使って表すと式(42)、式(43)のようになる。
If the coordinates (s, t) of the point f (P) are used without using the coordinates (x, y, z) of the point P, the expressions (42) and (43) are obtained.

また補正前の捻り角をψとすると、ψは式(44)から求めることができる。
このψが可動範囲外の場合は、これを補正しψとする。ψによる捻り四元数q=(q2x,q2y,q2z,q2w)は式(45)のようになる。
If the twist angle before correction is ψ, ψ can be obtained from the equation (44).
If this ψ is outside the movable range, this is corrected to be ψ m . The twisted quaternion q 2 = (q 2x , q 2y , q 2z , q 2w ) due to ψ m is as shown in Expression (45).

こうして、曲げ・捻りとも補正された四元数qは式(46)により得られる。
Thus, the quaternion q 3 corrected for both bending and twisting is obtained by the equation (46).

2−6−3.四元数を使った曲げ角度制限
上述した式(38)の四元数は関節の曲げを表すので、その要素qby、qbzに関して可動範囲を設定することによって、曲げ角度を制限する手法が考えられる。しかし、以下に述べるように、この手法には射影を使う手法に比べて劣る点がある。
2-6-3. Bending angle limitation using quaternion Since the quaternion in the above equation (38) represents bending of a joint, a method for limiting the bending angle by setting a movable range with respect to its elements q by and q bz is described. Conceivable. However, as described below, this method is inferior to the method using projection.

by=sin(η/2)、qbz=sin(ζ/2)とし、η、ζの値を−180°から180°まで10°間隔で変えて球面S上にグリッド(格子線)を作ると、図33に示すようになる。ただしqby、qbzの範囲は、qby +qbz ≦1である。 q by = sin (η / 2), q bz = sin (ζ / 2), and values of η and ζ are changed from −180 ° to 180 ° at intervals of 10 °, and a grid (lattice line) is formed on the spherical surface S. When made, it becomes as shown in FIG. However, the range of q by and q bz is q by 2 + q bz 2 ≦ 1.

ここで、図33に示す四元数を採用した場合と図11に示す射影方式を採用した場合とを比較すると、曲げ角が小さい領域では、両者は似た形状となっている。しかし、射影方式では、グリッドが直交しているのに対して、qby、qbzによる角度制限ではグリッドが直交しない。特に極側の半球では、図34に示すように、四元数(qby,qbz)による角度制限ではグリッドの交角が直角から大きく離れた状態になり、可動領域の設定には適さない。ただし、x軸に関して軸対象な円形の可動領域を設定する場合には、qby、qbzを2乗和制限とすることで、可動領域を正確に設定することができる。 Here, when the case where the quaternion shown in FIG. 33 is adopted and the case where the projection method shown in FIG. 11 is adopted are compared, in a region where the bending angle is small, both have similar shapes. However, in the projection method, the grids are orthogonal, whereas the grids are not orthogonal when the angle is limited by q by and q bz . In particular, in the polar hemisphere, as shown in FIG. 34, when the angle is limited by the quaternion (q by , q bz ), the crossing angle of the grid is greatly away from the right angle, which is not suitable for setting the movable region. However, when setting the axisymmetric circular movable area with respect to the x-axis, q By, With the q bz 2 sum limit, it is possible to set the movable area accurately.

2−7.本実施形態の手法による効果
本実施形態の射影方式によれば、射影による変換およびその逆変換は、四則演算のみで構成されるので、計算負荷が小さい。
2-7. Effects of the Method of the Present Embodiment According to the projection method of the present embodiment, the transformation by projection and its inverse transformation are configured only by four arithmetic operations, so the calculation load is small.

また本実施形態の射影方式の補正処理(矩形制限、小判形制限)によれば、最適解を実用的な計算量で求めることができる。   Further, according to the projection type correction processing (rectangular limitation, oval limitation) of the present embodiment, an optimal solution can be obtained with a practical calculation amount.

また本実施形態の射影方式の補正処理(矩形制限、小判形制限)は、ごく一部の平方根計算を除けば、四則演算のみで構成されるので、計算負荷が小さく、ベクトル演算器(あるいはSIMD)を用いた計算の高速化が可能である。   In addition, the correction processing (rectangular limitation, oval limitation) of the projection system of this embodiment is composed of only four arithmetic operations except for a small part of the square root calculation, so the calculation load is small and the vector calculator (or SIMD) ) Can be accelerated.

3.本実施形態の処理
次に、本実施形態の手法を実現する処理例について図35のフローチャートを用いて説明する。
3. Processing of this embodiment Next, a processing example for realizing the method of this embodiment will be described with reference to the flowchart of FIG.

まず初期設定として、関節毎に予め与えられている可動範囲の形状と曲げ角度の許容範囲とに基づいて、骨格モデルを構成する各関節の可動範囲を、平面λ上に設定する(ステップS10)。   First, as an initial setting, the movable range of each joint constituting the skeleton model is set on the plane λ based on the shape of the movable range given in advance for each joint and the allowable range of the bending angle (step S10). .

そして、フレーム更新タイミング(例えば、前フレームから1/60秒が経過した時点)が到来すると(ステップS11でY)、プレーヤの入力情報を検出する(ステップS12)。   When the frame update timing (for example, when 1/60 second has elapsed from the previous frame) has arrived (Y in step S11), player input information is detected (step S12).

次に、プレーヤの操作対象のキャラクタに関する骨格モデルに含まれる複数の関節のなかから、計算対象の関節を選択し(ステップS13)、プレーヤの入力情報、オブジェクト同士のヒットによる外力情報や、その他の動作影響情報に基づいて、計算対象の関節の曲げ・捻りを演算する(ステップS14)。   Next, a joint to be calculated is selected from a plurality of joints included in the skeleton model related to the character to be operated by the player (step S13), input information of the player, external force information by hit between objects, and other Based on the motion influence information, the bending / twisting of the joint to be calculated is calculated (step S14).

次に、計算対象の関節において連結されている親骨と子骨とに関して、親骨に対する子骨の向きを示す、関節を中心点とする球面S上の点Pを、射影fによって平面λに射影して点f(P)を求め(ステップS15)、平面λ上の点f(P)が可動範囲内に収まっているか否かを判定する(ステップS16)。   Next, with respect to the parent bone and the phalanx connected at the joint to be calculated, a point P on the spherical surface S centering on the joint and indicating the orientation of the skeleton relative to the parent bone is projected onto the plane λ by the projection f. The point f (P) is obtained (step S15), and it is determined whether the point f (P) on the plane λ is within the movable range (step S16).

そして、点f(P)が可動範囲外に存在する場合には(ステップS16でN)、計算対象の関節の可動範囲の形状に応じた補正式によって最適解f(P)を求め(ステップS17)、点f(P)を射影f−1によって球面S上に逆変換して球面S上の点Pを求めることによって補正後の子骨の向きを演算する(ステップS18)。 If the point f (P) is outside the movable range (N in step S16), the optimum solution f (P m ) is obtained by a correction equation corresponding to the shape of the movable range of the joint to be calculated (step S16). S17), and calculates the orientation of the child bone after correction by inversely converted on a spherical surface S the point f (P m) by the projection f -1 finding the point P m on the sphere S (step S18).

そして、骨格モデルを構成する全ての関節に関する計算が完了すると(ステップS19でY)、骨格モデルの各骨の動き(向きの変化)に応じてプレーヤの操作対象のキャラクタを動作させる(ステップS20)。   When the calculation for all the joints constituting the skeleton model is completed (Y in step S19), the player's operation target character is operated according to the movement (change in orientation) of each bone of the skeleton model (step S20). .

4.ハードウェア構成例
本実施形態のゲームシステムを実現するハードウェアの構成の一例について図36を用いて説明する。なお図36では、主要な構成のみを図示しており、図36に示されていないハードウェア(メモリコントローラやスピーカなど)を必要に応じて設けることができる。
4). Hardware Configuration Example An example of a hardware configuration for realizing the game system of the present embodiment will be described with reference to FIG. Note that FIG. 36 shows only the main configuration, and hardware (such as a memory controller and a speaker) not shown in FIG. 36 can be provided as necessary.

メインプロセッサ10は、光ディスク72(CD、DVD、ブルーレイディスク等の情報記憶媒体)に格納されたプログラム、通信インターフェース80を介して転送されたプログラム、或いはハードディスク60に格納されたプログラムなどに基づき動作し、内部バスb4を介してアクセス可能なメインメモリ40を作業領域(ワーク領域)としてゲーム処理、画像処理、音処理などの種々の処理を実行する。   The main processor 10 operates based on a program stored on the optical disc 72 (information storage medium such as CD, DVD, Blu-ray disc), a program transferred via the communication interface 80, a program stored on the hard disk 60, or the like. The main memory 40 accessible via the internal bus b4 is used as a work area (work area) to execute various processes such as game processing, image processing, and sound processing.

メインプロセッサ10は、1基のプロセッサ12と複数のベクトルプロセッサ14で構成される。プロセッサ12は、OSの実行、ハードウェアリソースの管理、ゲーム処理、ベクトルプロセッサ14の動作管理などの種々の処理を実行する。またベクトルプロセッサ14は、ベクトル演算に特化したプロセッサであり、主にジオメトリ処理、画像データや音データのコーデック処理などの処理を実行する。   The main processor 10 includes a single processor 12 and a plurality of vector processors 14. The processor 12 executes various processes such as OS execution, hardware resource management, game processing, and operation management of the vector processor 14. The vector processor 14 is a processor specialized for vector operations, and mainly executes processing such as geometry processing and codec processing of image data and sound data.

描画プロセッサ20は、内部バスb1を介してビデオメモリ30にアクセス可能に形成されている。また描画プロセッサ20は、描画プロセッサ20とメインプロセッサ10を接続する内部バスb2と、メインプロセッサ10内部のバスb3と、メインプロセッサ10とメインメモリ40を接続する内部バスb4を介してメインメモリ40にもアクセス可能に形成されている。すなわち本実施形態のゲームシステムでは、描画プロセッサ20がビデオメモリ30を原則的なレンダリングターゲットとして利用しつつ、必要に応じてメインメモリ40とを例外的なレンダリングターゲットとして利用することもできるようになっている。   The drawing processor 20 is configured to be accessible to the video memory 30 via the internal bus b1. The drawing processor 20 is connected to the main memory 40 via an internal bus b2 connecting the drawing processor 20 and the main processor 10, a bus b3 inside the main processor 10, and an internal bus b4 connecting the main processor 10 and the main memory 40. Is also made accessible. That is, in the game system of the present embodiment, the drawing processor 20 can use the video memory 30 as a basic rendering target, and can use the main memory 40 as an exceptional rendering target as needed. ing.

描画プロセッサ20は、座標変換、透視変換、光源計算、曲面生成などのジオメトリ処理を行うものであり、高速並列演算が可能な積和算器や除算器を有し、マトリクス演算(ベクトル演算)を高速に実行する。例えば、座標変換、透視変換、光源計算などの処理を行う場合には、メインプロセッサ10で動作するプログラムが、その処理を描画プロセッサ20に指示する。   The drawing processor 20 performs geometric processing such as coordinate transformation, perspective transformation, light source calculation, and curved surface generation, has a product-sum calculator and a divider capable of high-speed parallel computation, and performs matrix computation (vector computation). Run fast. For example, when processing such as coordinate transformation, perspective transformation, and light source calculation is performed, a program operating on the main processor 10 instructs the drawing processor 20 to perform the processing.

また描画プロセッサ20は、ジオメトリ処理後のオブジェクト(ポリゴンや曲面などのプリミティブ面で構成されるオブジェクト)の画像のレンダリング処理を高速に実行するものである。マルチパスレンダリング処理の際には、描画プロセッサ20は、描画情報(頂点情報や他のパラメータ)等に基づいて、Zバッファ34を利用した陰面消去やテクスチャ記憶部36を利用したテクスチャマッピングを行いながら、画像をビデオメモリ30のフレームバッファ32にレンダリングする。このとき描画プロセッサ20は、マルチパスレンダリング処理として、グレアフィルタ処理、モーションブラー処理、被写界深度処理、フォグ処理等のフィルタ処理を行うことができる。そして、最後のレンダリングパスで画像がビデオメモリ30に設けられたフレームバッファ32にレンダリングされると、その画像をディスプレイ50に出力する。   The drawing processor 20 executes a rendering process of an image of an object after geometry processing (an object composed of a primitive surface such as a polygon or a curved surface) at high speed. During the multi-pass rendering process, the drawing processor 20 performs hidden surface removal using the Z buffer 34 and texture mapping using the texture storage unit 36 based on drawing information (vertex information and other parameters). The image is rendered in the frame buffer 32 of the video memory 30. At this time, the rendering processor 20 can perform filter processing such as glare filter processing, motion blur processing, depth-of-field processing, and fog processing as multi-pass rendering processing. When the image is rendered in the frame buffer 32 provided in the video memory 30 in the final rendering pass, the image is output to the display 50.

ハードディスク60にはシステムプログラム、セーブデータ、個人データなどが格納される。   The hard disk 60 stores system programs, save data, personal data, and the like.

光学ドライブ70は、プログラム、画像データ、或いは音データなどが格納される光ディスク72(情報記憶媒体)を駆動し、これらのプログラム、データへのアクセスを可能にする。   The optical drive 70 drives an optical disc 72 (information storage medium) in which programs, image data, sound data, and the like are stored, and enables access to these programs and data.

通信インターフェース80は、ネットワークを介して外部との間でデータ転送を行うためのインターフェースである。この場合に、通信インターフェース80に接続されるネットワークとしては、通信回線(アナログ電話回線、ISDN)、高速シリアルバスなどを考えることができる。そして、通信回線を利用することでインターネットを介したデータ転送が可能になる。また、高速シリアルバスを利用することで、他の画像生成システムとの間でのデータ転送が可能になる。   The communication interface 80 is an interface for transferring data to and from the outside via a network. In this case, as a network connected to the communication interface 80, a communication line (analog telephone line, ISDN), a high-speed serial bus, etc. can be considered. By using a communication line, data transfer via the Internet becomes possible. Further, by using the high-speed serial bus, data transfer with other image generation systems becomes possible.

上述したように本実施形態のゲームシステム(コンピュータ)は、メインプロセッサ10に座標変換、可動範囲設定、骨格動作演算を行わせるプログラムが光ディスク72(情報記憶媒体の一例)あるいはハードディスク60(情報記憶媒体の一例)に格納されている。   As described above, in the game system (computer) of this embodiment, the program for causing the main processor 10 to perform coordinate conversion, movable range setting, and skeletal motion calculation is the optical disc 72 (an example of an information storage medium) or the hard disk 60 (information storage medium). In the example).

なお、本実施形態の各部(各手段)は、その全てを、ハードウェアのみにより実現してもよいし、情報記憶媒体に格納されるプログラムや通信インターフェースを介して配信されるプログラムのみにより実現してもよい。或いは、ハードウェアとプログラムの両方により実現してもよい。   Note that all the units (units) of the present embodiment may be realized only by hardware, or only by a program stored in an information storage medium or a program distributed via a communication interface. May be. Alternatively, it may be realized by both hardware and a program.

そして、本実施形態の各部をハードウェアとプログラムの両方により実現する場合には、情報記憶媒体には、ハードウェア(コンピュータ)を本実施形態の各部として機能させるためのプログラムが格納されることになる。より具体的には、上記プログラムが、ハードウェアである各プロセッサ10、20等に処理を指示すると共に、必要であればデータを渡す。そして、各プロセッサ10、20等は、その指示と渡されたデータとに基づいて、本発明の各部を実現することになる。   And when each part of this embodiment is implement | achieved by both hardware and a program, the program for functioning hardware (computer) as each part of this embodiment is stored in an information storage medium. Become. More specifically, the program instructs each processor 10, 20, etc., which is hardware, and passes data if necessary. Each of the processors 10 and 20 implements each unit of the present invention based on the instruction and the passed data.

なお本発明は、上記実施形態で説明したものに限らず、種々の変形実施が可能である。例えば、明細書又は図面中の記載において広義や同義な用語として引用された用語は、明細書又は図面中の他の記載においても広義や同義な用語に置き換えることができる。また骨格モデルを動作させる手法は、本実施形態で説明したものに限定されず、これらと均等な手法も本発明の範囲に含まれる。   The present invention is not limited to that described in the above embodiment, and various modifications can be made. For example, terms cited as broad or synonymous terms in the description in the specification or drawings can be replaced with broad or synonymous terms in other descriptions in the specification or drawings. Further, the method for operating the skeleton model is not limited to that described in the present embodiment, and methods equivalent to these are also included in the scope of the present invention.

また本発明は種々のゲーム(格闘ゲーム、シューティングゲーム、ロボット対戦ゲーム、スポーツゲーム、競争ゲーム、ロールプレイングゲーム、音楽演奏ゲーム、ダンスゲーム等)に適用できる。また本発明は、業務用ゲームシステム、家庭用ゲームシステム、多数のプレーヤが参加する大型アトラクションシステム、シミュレータ、マルチメディア端末、ゲーム画像を生成するシステムボード、携帯電話等の種々のゲームシステムに適用できる。   The present invention can also be applied to various games (such as fighting games, shooting games, robot fighting games, sports games, competitive games, role playing games, music playing games, dance games, etc.). Further, the present invention can be applied to various game systems such as a business game system, a home game system, a large attraction system in which a large number of players participate, a simulator, a multimedia terminal, a system board for generating game images, and a mobile phone. .

本実施形態のゲームシステムの機能ブロック図。The functional block diagram of the game system of this embodiment. 骨格モデルの構成を模式的に示す図。The figure which shows the structure of a skeleton model typically. 親骨および子骨に設定される座標系を示す図。The figure which shows the coordinate system set to a master bone and a child bone. 3軸回転角方式によるr、rと球面S上の位置との関係を示す図。R y by triaxial rotation angle method, shows the relationship between the position on the r z and spherical S. 3軸回転角方式により設定された関節の可動領域を示す図。The figure which shows the movable area | region of the joint set by the 3 axis | shaft rotation angle system. 3軸回転角方式により設定された関節の可動領域を示す図。The figure which shows the movable area | region of the joint set by the 3 axis | shaft rotation angle system. 3軸回転角方式により設定された関節の可動領域を示す図。The figure which shows the movable area | region of the joint set by the 3 axis | shaft rotation angle system. 3軸回転角方式により設定された関節の可動領域を示す図。The figure which shows the movable area | region of the joint set by the 3 axis | shaft rotation angle system. 3軸回転角方式により設定された関節の可動領域を示す図。The figure which shows the movable area | region of the joint set by the 3 axis | shaft rotation angle system. 球面S上の点Pから平面λ上の点Qへの射影を説明するための図。The figure for demonstrating the projection from the point P on the spherical surface S to the point Q on the plane λ. 平面λ上のグリッドを球面Sに射影した結果を説明するための図。The figure for demonstrating the result of having projected the grid on plane (lambda) on the spherical surface. y軸回転角rと角度φとの関係を示す図。diagram showing the relationship between the y-axis rotation angle r y and the angle phi. 射影方式と緯度・経度表現との比較図。Comparison diagram of projection method and latitude / longitude expression. 射影方式により設定された関節の可動領域を示す図。The figure which shows the movable area | region of the joint set by the projection system. 射影方式により設定された関節の可動領域を示す図。The figure which shows the movable area | region of the joint set by the projection system. 射影方式により設定された関節の可動領域を示す図。The figure which shows the movable area | region of the joint set by the projection system. 射影方式により設定された関節の可動領域を示す図。The figure which shows the movable area | region of the joint set by the projection system. 平面λ上において矩形制限された可動領域を示す図。The figure which shows the movable area | region where the rectangle restrictions were carried out on plane lambda. 平面λ上において楕円形制限された可動領域を示す図。The figure which shows the movable area | region by which the elliptical shape was restricted on plane (lambda). 射影方式により設定された関節の可動領域を示す図。The figure which shows the movable area | region of the joint set by the projection system. 平面λ上において小判形制限された可動領域を示す図。The figure which shows the movable area | region by which the oval shape restriction | limiting was carried out on the plane (lambda). 射影方式により設定された関節の可動領域を示す図。The figure which shows the movable area | region of the joint set by the projection system. 射影方式により設定された関節の可動領域を示す図。The figure which shows the movable area | region of the joint set by the projection system. 点Pから可動領域の境界に下ろした球面垂線の足Pを示す図。It shows the foot P m spherical perpendicular drawn to the boundary of the movable area from the point P. 平面λ上の円が球面S上で大円となる条件を示す図。The figure which shows the conditions from which the circle | round | yen on plane (lambda) turns into a great circle on the spherical surface S. FIG. 球面垂線を平面λに射影して得られる円を示す図。The figure which shows the circle | round | yen obtained by projecting a spherical perpendicular to the plane (lambda). 矩形領域の辺に下ろした球面垂線を示す図。The figure which shows the spherical perpendicular drawn down to the edge of a rectangular area. 矩形領域の各辺に対する最近点領域を示す図。The figure which shows the nearest point area | region with respect to each edge | side of a rectangular area. 矩形制限における簡易解による補正手法で発生する不具合を示す図。The figure which shows the malfunction which generate | occur | produces with the correction method by the simple solution in a rectangle restriction | limiting. 楕円形制限に対する簡易解を示す図。The figure which shows the simple solution with respect to elliptical restrictions. 楕円形制限における簡易解による補正手法で発生する不具合を示す図。The figure which shows the malfunction which generate | occur | produces with the correction method by the simple solution in elliptical restrictions. 円弧と直線の組合せによる可動領域の設定例を示す図。The figure which shows the example of a setting of the movable area by the combination of a circular arc and a straight line. by、qbzの値を変えて球面S上に作ったグリッドを示す図。q By, shows a grid made on a sphere S with different values of q bz. 射影方式(左)と四元数方式(右)の極側の様子を比較する図。The figure which compares the state of the pole side of a projection system (left) and a quaternion system (right). 本実施形態の具体的な処理例を示すフローチャート。The flowchart which shows the specific process example of this embodiment. ハードウェア構成例。Hardware configuration example.

符号の説明Explanation of symbols

100 処理部、
110 オブジェクト空間設定部、112 移動・動作処理部、
112A 可動範囲設定部、112B 座標変換部、112C 骨格動作演算部、
114 仮想カメラ制御部、
120 描画部、130 音生成部、
160 操作部、170 記憶部、
172 メインメモリ、
172A オブジェクト情報記憶部、172B モーション制御情報記憶部、
174 ビデオメモリ、
174A テクスチャ記憶部、174B Zバッファ、174C フレームバッファ、
180 情報記憶媒体、190 表示部、192 音出力部、
194 携帯型情報記憶装置、196 通信部
100 processing unit,
110 Object space setting unit, 112 Movement / motion processing unit,
112A movable range setting unit, 112B coordinate conversion unit, 112C skeleton movement calculation unit,
114 virtual camera control unit,
120 drawing units, 130 sound generation units,
160 operation unit, 170 storage unit,
172 main memory,
172A Object information storage unit, 172B Motion control information storage unit,
174 video memory,
174A texture storage unit, 174B Z buffer, 174C frame buffer,
180 information storage medium, 190 display unit, 192 sound output unit,
194 Portable information storage device, 196 communication unit

Claims (9)

親骨と子骨とが関節によって連結された骨格モデルの動作を制御するためのプログラムであって、
関節を中心点とする球面上の所与の点を焦点とし、該中心点と該焦点とを結ぶ軸に直交する平面を射影面とし、前記関節の可動範囲を、前記射影面上において設定する可動範囲設定部と、
前記球面上において前記子骨の向きを表す点を前記焦点に基づいて前記射影面上に射影する座標変換部と、
前記射影面上に射影された点の位置に基づいて、前記可動範囲の制限下で、前記親骨に対する前記子骨の向きを演算する骨格動作演算部として、
コンピュータを機能させることを特徴とするプログラム。
A program for controlling the movement of a skeletal model in which a parent bone and a skeleton are connected by a joint,
A given point on a sphere centered on a joint is a focal point, a plane orthogonal to the axis connecting the central point and the focal point is a projection plane, and the movable range of the joint is set on the projection plane A movable range setting section;
A coordinate conversion unit that projects a point representing the orientation of the skeleton on the spherical surface onto the projection plane based on the focal point;
As a skeletal motion calculation unit that calculates the orientation of the child bone relative to the parent bone under the limitation of the movable range, based on the position of the point projected on the projection plane,
A program characterized by causing a computer to function.
請求項1において、
前記可動範囲設定部が、
前記射影面上で矩形を成すように前記可動範囲を設定することを特徴とするプログラム。
In claim 1,
The movable range setting unit is
A program characterized in that the movable range is set so as to form a rectangle on the projection plane.
請求項1において、
前記可動範囲設定部が、
前記射影面上で楕円形を成すように前記可動範囲を設定することを特徴とするプログラム。
In claim 1,
The movable range setting unit is
A program characterized in that the movable range is set so as to form an ellipse on the projection plane.
請求項1において、
前記可動範囲設定部が、
前記射影面上で小判形を成すように前記可動範囲を設定することを特徴とするプログラム。
In claim 1,
The movable range setting unit is
A program characterized in that the movable range is set so as to form an oval on the projection surface.
請求項1〜4のいずれかにおいて、
前記親骨に沿った軸が、x軸として設定され、前記親骨に直交し、かつ互いに直交する2つの軸が、それぞれy軸およびz軸として設定されており、
前記射影面上に、互いに直交する座標軸が、それぞれs軸およびt軸として設定されており、
前記座標変換部が、
前記焦点を基準として、
s=−z/(x+1)およびt=y/(x+1){ただし、x+y+z=1}
による射影を行うことによって、前記球面上の点(x,y,z)を、前記射影面上の点(s,t)へ変換することを特徴とするプログラム。
In any one of Claims 1-4,
An axis along the parent bone is set as an x axis, and two axes orthogonal to the parent bone and orthogonal to each other are set as a y axis and a z axis, respectively.
On the projection plane, coordinate axes orthogonal to each other are set as an s axis and a t axis, respectively.
The coordinate conversion unit is
Based on the focus,
s = −z / (x + 1) and t = y / (x + 1) {where x 2 + y 2 + z 2 = 1}
A program characterized by converting a point (x, y, z) on the spherical surface into a point (s, t) on the projected surface by performing a projection according to.
請求項5において、
前記骨格モデルの関節に関して、前記射影面上で成す可動範囲の形状として矩形、楕円形、または小判形のいずれかが予め設定されているとともに、該関節におけるy軸回りの子骨の回転角およびz軸回りの子骨の回転角の許容範囲が予め設定されており、
前記可動範囲設定部が、
前記射影面上で成す前記可動範囲の形状と、前記関節におけるy軸回りの子骨の回転角およびz軸回りの子骨の回転角の許容範囲とに基づいて、前記関節の可動範囲を前記射影面上において設定することを特徴とするプログラム。
In claim 5,
Regarding the joint of the skeletal model, either a rectangle, an ellipse, or an oval is preset as the shape of the movable range formed on the projection plane, and the rotation angle of the skeleton around the y axis at the joint and The allowable range of the rotation angle of the skeleton around the z axis is preset,
The movable range setting unit is
Based on the shape of the movable range formed on the projection plane and the allowable range of the rotation angle of the skeleton around the y-axis and the rotation angle of the skeleton around the z-axis in the joint, the movable range of the joint is A program characterized in that it is set on the projection surface.
請求項1〜6のいずれかにおいて、
前記骨格動作演算部が、
前記親骨の動作に対応する前記子骨の動作を演算して得られた前記親骨に対する前記子骨の向きが前記可動範囲内に収まっているか否かを判定し、前記親骨に対する前記子骨の向きが前記可動範囲内に収まっていない場合には、前記射影面上における前記可動範囲の形状に応じた条件を満たすように、前記親骨に対する前記子骨の向きを補正することを特徴とするプログラム。
In any one of Claims 1-6,
The skeletal motion calculation unit is
It is determined whether or not the orientation of the bone relative to the parent bone obtained by calculating the motion of the skeleton corresponding to the motion of the parent bone is within the movable range, and the orientation of the skeleton relative to the parent bone Is not within the movable range, the program corrects the orientation of the child bone relative to the parent bone so as to satisfy a condition according to the shape of the movable range on the projection plane.
コンピュータにより読み取り可能な情報記憶媒体であって、請求項1〜7のいずれかに記載のプログラムを記憶していることを特徴とする情報記憶媒体。   An information storage medium readable by a computer, wherein the program according to any one of claims 1 to 7 is stored. 親骨と子骨とが関節によって連結された骨格モデルの動作を制御する骨格動作制御システムであって、
関節を中心点とする球面上の所与の点を焦点とし、該中心点と該焦点とを結ぶ軸に直交する平面を射影面とし、前記関節の可動範囲を、前記射影面上において設定する可動範囲設定部と、
前記球面上において前記子骨の向きを表す点を前記焦点に基づいて前記射影面上に射影する座標変換部と、
前記射影面上に射影された点の位置に基づいて、前記可動範囲の制限下で、前記親骨に対する前記子骨の向きを演算する骨格動作演算部と、
を含むことを特徴とする骨格動作制御システム。
A skeletal motion control system for controlling the motion of a skeletal model in which a parent bone and a skeleton are connected by a joint,
A given point on a sphere centered on a joint is a focal point, a plane orthogonal to the axis connecting the central point and the focal point is a projection plane, and the movable range of the joint is set on the projection plane A movable range setting section;
A coordinate conversion unit that projects a point representing the orientation of the skeleton on the spherical surface onto the projection plane based on the focal point;
Based on the position of the point projected on the projection plane, under the limitation of the movable range, a skeletal motion calculation unit that calculates the orientation of the child bone relative to the parent bone;
A skeletal motion control system comprising:
JP2007241030A 2007-09-18 2007-09-18 Skeleton operation control system, program, and information storage medium Pending JP2009070340A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007241030A JP2009070340A (en) 2007-09-18 2007-09-18 Skeleton operation control system, program, and information storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007241030A JP2009070340A (en) 2007-09-18 2007-09-18 Skeleton operation control system, program, and information storage medium

Publications (1)

Publication Number Publication Date
JP2009070340A true JP2009070340A (en) 2009-04-02

Family

ID=40606484

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007241030A Pending JP2009070340A (en) 2007-09-18 2007-09-18 Skeleton operation control system, program, and information storage medium

Country Status (1)

Country Link
JP (1) JP2009070340A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012164162A (en) * 2011-02-07 2012-08-30 Celsys:Kk Skelton angle control method, apparatus, and program
JP2015226682A (en) * 2014-06-02 2015-12-17 株式会社三洋物産 Game machine
US9508177B2 (en) 2011-12-06 2016-11-29 CELSYS, Inc. Method of controlling skeleton model, and recording medium therewith
JP2021013844A (en) * 2020-11-16 2021-02-12 株式会社三洋物産 Game machine
CN116797769A (en) * 2023-08-23 2023-09-22 腾讯科技(深圳)有限公司 Data processing method, device, computer equipment and readable storage medium
JP7475618B1 (en) 2023-12-04 2024-04-30 株式会社セルシス Method and program for determining posture of skeletal model

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012164162A (en) * 2011-02-07 2012-08-30 Celsys:Kk Skelton angle control method, apparatus, and program
US9508177B2 (en) 2011-12-06 2016-11-29 CELSYS, Inc. Method of controlling skeleton model, and recording medium therewith
JP2015226682A (en) * 2014-06-02 2015-12-17 株式会社三洋物産 Game machine
JP2021013844A (en) * 2020-11-16 2021-02-12 株式会社三洋物産 Game machine
CN116797769A (en) * 2023-08-23 2023-09-22 腾讯科技(深圳)有限公司 Data processing method, device, computer equipment and readable storage medium
CN116797769B (en) * 2023-08-23 2023-11-21 腾讯科技(深圳)有限公司 Data processing method, device, computer equipment and readable storage medium
JP7475618B1 (en) 2023-12-04 2024-04-30 株式会社セルシス Method and program for determining posture of skeletal model

Similar Documents

Publication Publication Date Title
JP2010170279A (en) Skeleton motion control system, program, and information storage medium
CN105556565A (en) Fragment shaders perform vertex shader computations
JP2009070340A (en) Skeleton operation control system, program, and information storage medium
JP4734138B2 (en) Program, information storage medium, and image generation system
US9056247B2 (en) System and method for efficient character animation
JP3748451B1 (en) Program, information storage medium, and image generation system
JP2005032140A (en) Image generation system, program, and information storage medium
JP4824514B2 (en) Program, information storage medium, and image generation system
JP2007226572A (en) Program, information storage medium and image creation system
JP3413383B2 (en) GAME SYSTEM AND INFORMATION STORAGE MEDIUM
JP2006323512A (en) Image generation system, program, and information storage medium
JP4754384B2 (en) Program, information recording medium, and image generation system
JP5253118B2 (en) Image generation system, program, and information storage medium
JP4662260B2 (en) Program, information storage medium, and image generation system
JP2007272273A (en) Image generation system, program, and information storage medium
JP4229316B2 (en) Image generation system, program, and information storage medium
JP4786389B2 (en) Program, information storage medium, and image generation system
JP4574058B2 (en) Image generation system, program, and information storage medium
JP2010033288A (en) Image generation system, program and information storage medium
JP2010033299A (en) Image generation system, program and information storage medium
JP2004070669A (en) Image generation system, program and information storage medium
JP4782583B2 (en) Program, information storage medium, and image generation system
JP5063022B2 (en) Program, information storage medium, and image generation system
JP4394211B2 (en) Image generation system and information storage medium
JP4865471B2 (en) Program, information storage medium, and image generation system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20100625

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120130

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120208

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20120606