JPH11213175A - Production of program and program recording medium - Google Patents

Production of program and program recording medium

Info

Publication number
JPH11213175A
JPH11213175A JP10010080A JP1008098A JPH11213175A JP H11213175 A JPH11213175 A JP H11213175A JP 10010080 A JP10010080 A JP 10010080A JP 1008098 A JP1008098 A JP 1008098A JP H11213175 A JPH11213175 A JP H11213175A
Authority
JP
Japan
Prior art keywords
program
calculating
rotation matrix
data
dimensional rotation
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
JP10010080A
Other languages
Japanese (ja)
Inventor
Motonobu Tonomura
元伸 外村
Fumio Arakawa
文男 荒川
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP10010080A priority Critical patent/JPH11213175A/en
Publication of JPH11213175A publication Critical patent/JPH11213175A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To produce an object program including a part to calculate a three- dimensional rotary matrix by using data of a four-way number to represent each position of a three-dimensional object. SOLUTION: A source program including the part to calculate the three- dimensional rotary matrix is generated by using data on the Euler angle provided from a motion capture 100, the data is transformed to the data of four- way number (16) when the data is compiled, the source program is transformed to the object program (170 and a library to calculate the three-dimensional rotary matrix by using the data of four-way number is incorporated in the object program as it is.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、3次元回転行列を
使用してアニメーション等を実行するアニメーションプ
ログラムを製造するプログラム製造方法に関する。
[0001] The present invention relates to a program manufacturing method for manufacturing an animation program for executing an animation or the like using a three-dimensional rotation matrix.

【0002】[0002]

【従来の技術】アニメーションプログラムを作成するに
は、モーション・キャプチャと呼ばれる測定装置を使っ
てモデルとする3次元の物体の3次元の位置を表すデー
タおよび3次元の角位置を表すデータを取り込み、運動
モデルを作る。モーション・キャプチャは物体の3次元
の角位置を表すデータとして、歴史的な経緯から物体の
オイラー角を表すデータを出力するのが普通である。物
体の位置、角度を変化させて表示するには、物体の3次
元の角位置に関連する3次元回転行列を計算する必要と
なる。
2. Description of the Related Art In order to create an animation program, data representing a three-dimensional position of a three-dimensional object to be modeled and data representing a three-dimensional angular position are taken by using a measuring device called a motion capture. Make an exercise model. In the motion capture, data representing the Euler angle of an object is generally output as data representing a three-dimensional angular position of the object from a historical background. In order to change and display the position and angle of the object, it is necessary to calculate a three-dimensional rotation matrix related to the three-dimensional angular position of the object.

【0003】オイラー角を用いて3次元回転行列を計算
するには、オイラー角に対する正弦と余弦という三角関
数を計算する必要がある。四則演算を実行できる一般の
演算器を使用して三角関数を計算すると、計算時間が掛
かる。
To calculate a three-dimensional rotation matrix using Euler angles, it is necessary to calculate trigonometric functions of sine and cosine with respect to the Euler angles. When a trigonometric function is calculated using a general arithmetic unit capable of executing the four arithmetic operations, it takes a long calculation time.

【0004】あらかじめいろいろのオイラー角に対して
計算された三角関数の値を記憶したテーブルを演算器と
して用意し、あるオイラー角の三角関数の値を求めると
きに、このテーブルを参照し、その三角関数の値を高速
に算出する方法も知られている。しかし、上記テーブル
を記憶するには大容量のメモリを必要とする。
A table storing the values of trigonometric functions calculated in advance for various Euler angles is prepared as an arithmetic unit. When calculating the value of a trigonometric function at a certain Euler angle, this table is referred to and the trigonometric function is referred to. A method of calculating a function value at high speed is also known. However, storing the table requires a large-capacity memory.

【0005】3次元回転行列を高速に計算するための他
の方法として、三角関数を近似多項式によって計算する
方法が知られている。近似多項式を高速に計算するため
の演算器は比較的コンパクトな回路により実現できる。
As another method for calculating a three-dimensional rotation matrix at high speed, a method of calculating a trigonometric function by an approximate polynomial is known. An arithmetic unit for calculating an approximate polynomial at high speed can be realized by a relatively compact circuit.

【0006】一方、物体の3次元の角位置を表す他のデ
ータとして4元数が知られている。この4元数により角
位置を表すと、3次元回転行列は、三角関数を使わない
で、加減と乗算だけで計算できることが知られている
(例えば、S. Shoemake: Animating Rotation with Qua
ternion Curves, Proc. Siggraph '85, Computer Graph
ics, Vol. 19, No. 3, pp. 245-254, 1985参照)。
On the other hand, a quaternion is known as another data representing a three-dimensional angular position of an object. It is known that when the angular position is represented by this quaternion, a three-dimensional rotation matrix can be calculated only by addition and subtraction and multiplication without using a trigonometric function (for example, S. Shoemake: Animating Rotation with Qua
ternion Curves, Proc.Siggraph '85, Computer Graph
ics, Vol. 19, No. 3, pp. 245-254, 1985).

【0007】[0007]

【発明が解決しようとする課題】オイラー角を用いて3
次元回転行列を計算する従来の方法は計算時間が掛かる
かあるいは比較的規模の大きい回路を必要とする。三角
関数を近似多項式により計算する従来の方法が必要とす
る演算器は比較的コンパクトな回路により実現できる。
しかし、4元数を用いて3次元回転行列を計算する方法
が必要とする演算器の方が簡単である。一方、現在アニ
メーションプログラムの作成によく使用されるモーショ
ン・キャプチャは、物体の3次元の角位置を表すデータ
としてオイラー角のデータを出力する。したがって、こ
のモーション・キャプチャが出力するオイラー角のデー
タを使用してアニメーションプログラムを製造できるこ
とが望ましい。あるいは、物体の3次元の角位置を表す
データとして4元数のデータを出力できるようにモーシ
ョン・キャプチャを改良し、その出力を使用してアニメ
ーションプログラムを製造できることが望ましい。
Problems to be Solved by the Invention 3
Conventional methods of calculating the dimensional rotation matrix are computationally time consuming or require relatively large circuits. The arithmetic unit required by the conventional method of calculating a trigonometric function by an approximate polynomial can be realized by a relatively compact circuit.
However, an arithmetic unit that requires a method of calculating a three-dimensional rotation matrix using a quaternion is simpler. On the other hand, motion capture, which is currently often used for creating animation programs, outputs Euler angle data as data representing a three-dimensional angular position of an object. Therefore, it is desirable that an animation program can be manufactured using the Euler angle data output by the motion capture. Alternatively, it is desirable that motion capture be improved so that quaternion data can be output as data representing a three-dimensional angular position of an object, and an animation program can be manufactured using the output.

【0008】したがって、本願発明の目的は、物体の3
次元の角位置を表すデータとしてオイラー角のデータを
出力するモーション・キャプチャを用いて従来作成する
ことが可能な、物体の3次元の角位置を表すデータとし
てオイラー角のデータを含み、そのデータを用いて3次
元回転行列を計算する部分を含む、アニメーション用の
ソースプログラムから、4元数を用いてその3次元回転
行列を計算する部分を含むアニメーションプログラムを
製造する方法を提供することである。
[0008] Therefore, the object of the present invention is to provide an object 3
Including Euler angle data as data representing a three-dimensional angular position of an object, which can be conventionally created using motion capture that outputs Euler angle data as data representing a three-dimensional angular position, An object of the present invention is to provide a method for producing an animation program including a part for calculating a three-dimensional rotation matrix using a quaternion from a source program for animation including a part for calculating a three-dimensional rotation matrix using the same.

【0009】本願発明の他の目的は、4元数を出力でき
るモーション・キャプチャを用いて3次元回転行列を計
算するアニメーションプログラムを製造する方法を提供
することである。
It is another object of the present invention to provide a method for producing an animation program for calculating a three-dimensional rotation matrix using motion capture capable of outputting a quaternion.

【0010】本願発明のさらに他の目的は、オイラー角
を用いて3次元回転行列を計算する部分を含む、アニメ
ーション用のソースプログラムあるいは4元数を用いて
3次元回転行列を計算する部分を含むアニメーション用
のソースプログラムから、三角関数の値を比較的高速に
計算できる演算器を使用して3次元回転行列を計算する
オブジェクトプログラムあるいは4元数のデータに対し
て加減算と乗算を用いて3次元回転行列を計算するオブ
ジェクトプログラムを切り替えて製造することができる
プログラム製造方法を提供することを目的とする。
Still another object of the present invention is to include a part for calculating a three-dimensional rotation matrix using an Euler angle, a part for calculating a three-dimensional rotation matrix using a source program for animation or a quaternion. An object program that calculates a three-dimensional rotation matrix using an arithmetic unit that can calculate the value of a trigonometric function from an animation source program at a relatively high speed, or a three-dimensional object using addition, subtraction, and multiplication of quaternion data It is an object of the present invention to provide a program manufacturing method capable of manufacturing by switching an object program for calculating a rotation matrix.

【0011】本願発明の他の目的は、以下に記載の実施
の形態からもさらに明らかである。
[0011] Other objects of the present invention will be more apparent from the embodiments described below.

【0012】[0012]

【課題を解決するための手段】本願第1の発明は、物体
の3次元の角位置を表すオイラー角のデータを含み、そ
のデータを使用して3次元回転行列を計算する部分を含
むアニメーション用のソースプログラムをソースプログ
ラムとして使用する。
A first aspect of the present invention is directed to an animation for animation including Euler angle data representing a three-dimensional angular position of an object and including a part for calculating a three-dimensional rotation matrix using the data. Use the source program of the above as the source program.

【0013】まず、上記オイラー角のデータを同じ角位
置を表す4元数のデータに変換する。この変換は、例え
ば、上記ソースプログラムのコンパイル時に行う。その
後、得られた4元数のデータを使用して3次元回転行列
を計算する部分を含むオブジェクトプログラムに上記ソ
ースプログラムを変換し、これによりアニメーションプ
ログラムを製造する。
First, the Euler angle data is converted into quaternion data representing the same angular position. This conversion is performed, for example, when compiling the source program. Thereafter, the source program is converted into an object program including a part for calculating a three-dimensional rotation matrix using the obtained quaternion data, thereby producing an animation program.

【0014】上記データは、従来から利用可能なモーシ
ョン・キャプチャから供給されるので、上記ソースプロ
グラムは、このような従来のモーション・キャプチャを
使用して作成できる。したがって、本願第1の発明によ
れば、このようなモーション・キャプチャを用いて作成
されたソースプログラムを用いながら、4元数のデータ
を使用して3次元回転行列を計算する部分を含むオブジ
ェクトプログラムを製造することができる。
Since the data is provided from a conventionally available motion capture, the source program can be created using such a conventional motion capture. Therefore, according to the first aspect of the present invention, an object program including a part for calculating a three-dimensional rotation matrix using quaternion data while using a source program created using such motion capture Can be manufactured.

【0015】さらに、本願第2の発明では、モデルとし
て使用する3次元の物体の3次元の角位置を表すデータ
として4元数のデータを出力させるモーション・キャプ
チャを使用する。コンピュータによりこのデータを上記
物体の角位置を変えて繰り返し取り込む。それぞれの取
り込みにより得られた4元数のデータを用いて3次元回
転行列を計算する部分を含むアニメーション用のソース
プログラムを、コンピュータに対するオペレータ操作に
より生成する。その後、4元数のデータに対する加減算
と乗算とにより上記3次元回転行列を計算する部分を含
むように、上記ソースプログラムを対応するオブジェク
トプログラムにコンピュータにより変換してアニメーシ
ョンプログラムを製造する。このように新しいモーショ
ン・キャプチャを使用することにより、4元数のデータ
を使用して3次元回転行列を計算する部分を含むオブジ
ェクトプログラムを簡単に製造することができる。
Further, in the second invention of the present application, motion capture for outputting quaternion data as data representing a three-dimensional angular position of a three-dimensional object used as a model is used. This data is repeatedly captured by a computer by changing the angular position of the object. A source program for animation including a part for calculating a three-dimensional rotation matrix using quaternion data obtained by each capture is generated by an operator operation on a computer. Then, the source program is converted into a corresponding object program by a computer so as to include a part for calculating the three-dimensional rotation matrix by addition, subtraction, and multiplication of quaternion data, thereby producing an animation program. By using the new motion capture in this manner, an object program including a part for calculating a three-dimensional rotation matrix using quaternion data can be easily manufactured.

【0016】さらに本願第3の発明は、物体の3次元の
角位置を表すオイラー角のデータを含み、そのデータを
使用して3次元回転行列を計算する部分を含むアニメー
ション用のソースプログラム、あるいは、物体の3次元
の角位置を表す4元数のデータを含み、そのデータを使
用して3次元回転行列を計算する部分を含むアニメーシ
ョン用のソースプログラムのいずれをもソースプログラ
ムとして使用することを許す。これらのソースプログラ
ムに対してコンピュータにより以下の二つのステップ
(a)(b)のいずれかを実行する。
Further, the third invention of the present application provides an animation source program including Euler angle data representing a three-dimensional angular position of an object and including a part for calculating a three-dimensional rotation matrix using the data. Any of the animation source programs including a quaternion data representing a three-dimensional angular position of an object and a part for calculating a three-dimensional rotation matrix using the data may be used as a source program. forgive. The computer executes one of the following two steps (a) and (b) on these source programs.

【0017】(a)上記データがオイラー角のデータで
あるとき、上記ソースプログラムに対応するオブジェク
トプログラムを製造する前に、上記オイラー角のデータ
を同じ角位置を表す4元数のデータに変換する。
(A) When the data is Euler angle data, the Euler angle data is converted into quaternion data representing the same angular position before an object program corresponding to the source program is manufactured. .

【0018】変換により得られた4元数のデータに対し
て加減算と乗算を使用して3次元回転行列を計算する部
分を含むオブジェクトプログラムを上記変換後に上記ソ
ースプログラムから製造する。
An object program including a part for calculating a three-dimensional rotation matrix using addition, subtraction, and multiplication with respect to quaternion data obtained by the conversion is manufactured from the source program after the conversion.

【0019】(b)上記データが4元数のデータである
とき、その4元数のデータに対して加減算と乗算を使用
して3次元回転行列を計算する部分を含むオブジェクト
プログラムに、上記ソースプログラムを変換する。
(B) When the data is quaternion data, an object program including a part for calculating a three-dimensional rotation matrix by using addition, subtraction, and multiplication on the quaternion data, Convert the program.

【0020】このように上記ステップ(a)(b)の一
方を実行することにより、これらの2種のソースプログ
ラムのいずれもから、4元数のデータを用いて加減算と
乗算を使用して3次元回転行列を計算する部分を含むオ
ブジェクトプログラムを製造できる。
By executing one of the above steps (a) and (b) in this manner, from either of these two types of source programs, three types of data can be obtained by using addition and subtraction and multiplication using quaternion data. An object program including a part for calculating a dimensional rotation matrix can be manufactured.

【0021】さらに、本願第4の発明では、上記第3の
発明で使用する2種類のソースプログラムに対して、コ
ンピュータにより以下の二つのステップ(a)(b)の
一方を実行する。
Further, in the fourth invention of the present application, one of the following two steps (a) and (b) is executed by a computer for the two types of source programs used in the third invention.

【0022】(a)オブジェクトプログラムとして、上
記演算器を使用して、上記オイラー角のデータに対する
複数の三角関数の値を計算し、計算された値を使用し
て、3次元回転行列を計算する部分を含むものに、上記
ソースプログラムを変換する。
(A) Using the arithmetic unit as an object program, calculate a plurality of trigonometric functions for the Euler angle data, and calculate a three-dimensional rotation matrix using the calculated values. Convert the above source program to one containing the part.

【0023】(b)上記ソースプログラムに対応するオ
ブジェクトプログラムを製造する前に、上記オイラー角
のデータを同じ角位置を表す4元数のデータに変換し、
さらに、変換により得られた4元数のデータに対して加
減算と乗算を使用して3次元回転行列を計算する部分を
含むオブジェクトプログラムに、上記ソースプログラム
を変換する。
(B) converting the Euler angle data to quaternion data representing the same angular position before manufacturing an object program corresponding to the source program;
Further, the source program is converted into an object program including a part for calculating a three-dimensional rotation matrix by using addition, subtraction, and multiplication on quaternion data obtained by the conversion.

【0024】この結果、上記2種のソースプログラムの
いずれからも、三角関数の値を比較的高速に計算できる
演算器を使用するコンピュータおよびその演算器を使用
しないコンピュータのそれぞれによって実行できる2種
類のオブジェクトプログラムを切り替えて製造できる。
As a result, from either of the above two types of source programs, two types of computers can be executed by a computer using an arithmetic unit capable of calculating the value of the trigonometric function at a relatively high speed and a computer not using the arithmetic unit. It can be manufactured by switching object programs.

【0025】さらに、本願第5の発明では、本願第3の
発明で使用する2種類のソースプログラムに対して、コ
ンピュータにより以下の三つのステップ(a)(b)
(c)の一つを実行する。
Further, in the fifth invention of the present application, the following three steps (a) and (b) are executed by a computer for the two types of source programs used in the third invention of the present application.
Execute one of (c).

【0026】(a)上記データがオイラー角のデータで
あるとき、上記演算器を使用して、上記オイラー角のデ
ータに対する複数の三角関数の値を計算し、さらに、計
算された値を使用して、3次元回転行列を計算する部分
を含むオブジェクトプログラムに上記ソースプログラム
を変換する。
(A) When the data is Euler angle data, a plurality of trigonometric function values for the Euler angle data are calculated using the arithmetic unit, and further, the calculated values are used. Then, the source program is converted into an object program including a part for calculating a three-dimensional rotation matrix.

【0027】(b)上記データがオイラー角のデータで
あるとき、上記ソースプログラムに対応するオブジェク
トプログラムを製造する前に、上記オイラー角のデータ
を同じ角位置を表す4元数のデータに変換し、変換によ
り得られた4元数のデータに対して加減算と乗算を使用
して3次元回転行列を計算する部分を含むオブジェクト
プログラムに、上記ソースプログラムを変換する。
(B) When the data is Euler angle data, the Euler angle data is converted into quaternion data representing the same angular position before manufacturing an object program corresponding to the source program. The source program is converted into an object program including a part for calculating a three-dimensional rotation matrix by using addition, subtraction, and multiplication on quaternion data obtained by the conversion.

【0028】(c)上記データが4元数のデータである
とき、その4元数のデータに対して加減算と乗算を使用
して3次元回転行列を計算する部分を含むオブジェクト
プログラムに、上記ソースプログラムを変換する。
(C) When the data is quaternion data, an object program including a part for calculating a three-dimensional rotation matrix by using addition, subtraction and multiplication on the quaternion data, Convert the program.

【0029】この結果、ソースプログラムに含まれたデ
ータがオイラー角のデータであるとき、三角関数の値を
比較的高速に計算できる演算器を使用するコンピュータ
のためのオブジェクトプログラムおよびその演算器を使
用しないコンピュータのためのオブジェクトプログラム
をそのソースプログラムから製造でき、しかも、ソース
プログラムに含まれたデータが4元数のデータであると
き、上記演算器を使用しないコンピュータによって実行
できるオブジェクトプログラムを製造できる。
As a result, when the data included in the source program is Euler angle data, an object program for a computer using an arithmetic unit capable of calculating the value of a trigonometric function at a relatively high speed and the use of the arithmetic unit An object program for a computer that does not use a computer can be manufactured from the source program, and when the data included in the source program is quaternion data, an object program that can be executed by a computer that does not use the arithmetic unit can be manufactured.

【0030】[0030]

【発明の実施の形態】発明の実施の形態を説明する前
に、オイラー角、物体の3次元の角位置を表す、オイラ
ー角および4元数という2種類のパラメータおよび3次
元回転行列について説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Before describing an embodiment of the present invention, two kinds of parameters, ie, Euler angles and quaternions, representing three-dimensional angular positions of an object and a three-dimensional rotation matrix will be described. .

【0031】オイラー角は物体上で定義される三次元の
座標軸と空間に静止した座標軸とのなす角であり、具体
的には、図2に示すように、物体(剛体)の一転Oが固
定されているものとして、空間に固定された静止座標系
(x,y,z)と物体に固定された座標軸(ξ,η,
ζ)とについて、z軸に対するζ軸のなす角をθとし、
xy平面とξη平面との交線OLがη軸に対してなす角
をなす角をψ、y軸に対してなす角をφとする。これら
の角をオイラー角という。但し、オイラー角の定め方は
いろいろありうるが、本発明はいずれのオイラー角も使
用可能である。図3に示すように、これらの角度φ,
θ,ψは、それぞれz軸の周りの回転角、y軸周りの回
転角、ζ軸周りの回転角と考えることができる。それぞ
れの回転に対して、座標(x,y,z)を(ξ,η,
ζ)に変換するための3次元行列Rz(φ),Ry
(θ),Rζ(ψ)が定義される。これらの行列は図3
に示した通りである。したがって、三つの角度φ,θ,
ψによる回転を全て行ったときには、この回転に対する
3次元の回転行列Rは、図4(a)に示すように、これ
ら三つの行列の積Rζ(ψ)Ry(θ)Rz(φ)によ
り与えられる。この3次元回転行列Rに座標(x,y,
z)を掛ける、回転後の物体上の座標(ξ,η,ζ)が
得られる。
The Euler angle is an angle formed between a three-dimensional coordinate axis defined on the object and a coordinate axis stationary in space. Specifically, as shown in FIG. 2, the rotation O of the object (rigid body) is fixed. It is assumed that the stationary coordinate system (x, y, z) fixed in space and the coordinate axes (ξ, η,
ζ), the angle formed by the ζ axis with respect to the z axis is θ,
An angle formed by an intersection line OL between the xy plane and the ξ plane with respect to the η axis is defined as ψ, and an angle formed with respect to the y axis is defined as φ. These angles are called Euler angles. However, although there are various ways of determining the Euler angle, any Euler angle can be used in the present invention. As shown in FIG. 3, these angles φ,
θ and ψ can be considered as a rotation angle around the z axis, a rotation angle around the y axis, and a rotation angle around the ζ axis, respectively. For each rotation, the coordinates (x, y, z) are (ξ, η,
ζ) to convert to three-dimensional matrix Rz (φ), Ry
(Θ), Rζ (ψ) are defined. These matrices are shown in FIG.
As shown in FIG. Therefore, three angles φ, θ,
When all the rotations by ψ are performed, a three-dimensional rotation matrix R for this rotation is given by a product Rζ (ψ) Ry (θ) Rz (φ) of these three matrices as shown in FIG. Can be The coordinates (x, y,
By multiplying by z), the coordinates (ξ, η, ζ) on the rotated object are obtained.

【0032】4元数は、回転物体の角位置を表す4つの
パラメータからなり、それ自体周知である。通常、4元
数は4つのパラメータ(w,x,y,z)により表され
ることが多い。但し、このx,y,zは静止座標(x,
y,z)とは異なる。
The quaternion consists of four parameters representing the angular position of a rotating object, and is well known per se. Usually, a quaternion is often represented by four parameters (w, x, y, z). Here, x, y, and z are stationary coordinates (x, y, z).
y, z).

【0033】特定のオイラー角(φ,θ,ψ)に対して
は、特定の4元数(w,x,y,z)が対応する。両者
の関係は、図4(b)に示すとおりである。3次元回転
行列は、4元数(w,x,y,z)を用いると、図4
(c)のように表される。これから分かるように、この
3次元回転行列の各要素は、加減算と乗算とで計算で
き、特別の演算器を使用しなくても通常のコンピュータ
にある演算器により高速に計算できる。
A specific quaternion (w, x, y, z) corresponds to a specific Euler angle (φ, θ, ψ). The relationship between the two is as shown in FIG. When a quaternion (w, x, y, z) is used for the three-dimensional rotation matrix, FIG.
It is expressed as (c). As can be seen, each element of the three-dimensional rotation matrix can be calculated by addition, subtraction, and multiplication, and can be calculated at a high speed by an arithmetic unit in an ordinary computer without using a special arithmetic unit.

【0034】以下、本発明に係るプログラム製造方法を
図面に示したいくつかの実施の形態を参照してさらに詳
細に説明する。なお、以下においては、同じ参照番号は
同じものもしくは類似のものを表すものとする。また、
発明の第2の実施の形態以降においては、発明の第1の
実施の形態との相違点を主に説明するに止める。
Hereinafter, the program manufacturing method according to the present invention will be described in more detail with reference to some embodiments shown in the drawings. In the following, the same reference numerals represent the same or similar ones. Also,
In the second and subsequent embodiments of the invention, only the differences from the first embodiment of the invention will be mainly described.

【0035】<発明の実施の形態1>本実施の形態で
は、モデル物体の3次元の角位置を表すオイラー角のデ
ータを出力するモーション・キャプチャが使用され、そ
こから出力されるオイラー角のデータに対して3次元の
回転行列を計算する部分を含むようにアニメーション用
のソースプログラムが生成される。そのソースプログラ
ムが、そのオイラー角のデータに対応する4元数のデー
タを使用して加減算と乗算により3次元の回転行列を計
算する部分を含むオブジェクトプログラムに変換され
る。これにより、従来のモーション・キャプチャを使用
しながら、加減算と乗算により3次元の回転行列を計算
するオブジェクトプログラムが得られる。
<Embodiment 1> In the present embodiment, a motion capture which outputs Euler angle data representing a three-dimensional angular position of a model object is used, and Euler angle data output therefrom is used. , A source program for animation is generated so as to include a part for calculating a three-dimensional rotation matrix. The source program is converted into an object program including a part for calculating a three-dimensional rotation matrix by addition, subtraction, and multiplication using quaternion data corresponding to the Euler angle data. This provides an object program that calculates a three-dimensional rotation matrix by addition, subtraction and multiplication while using conventional motion capture.

【0036】図1において、モーション・キャプチャ1
00は、モデル物体の3次元の角位置を表すオイラー角
のデータを出力する装置である。この装置は、具体的に
は、モデルとすべき物体(図示せず)を撮像するカメラ
等からなる画像入力部101と、画像入力部101の出
力画像の各画素の座標を測定し、その結果を解析して物
体の複数の代表点の座標および物体の角位置を検出する
画像座標測定解析部102と、検出された物体の角位置
をオイラー角データに変換して出力するオイラー角出力
変換部103とを有する。
In FIG. 1, motion capture 1
Reference numeral 00 denotes an apparatus that outputs Euler angle data representing a three-dimensional angular position of a model object. Specifically, the apparatus measures an image input unit 101 including a camera or the like that captures an object (not shown) to be a model, and measures the coordinates of each pixel of an output image of the image input unit 101. Image coordinate measurement analysis unit 102 for analyzing the coordinates of a plurality of representative points of the object and detecting the angular position of the object, and an Euler angle output conversion unit for converting the detected angular position of the object into Euler angle data and outputting the data 103.

【0037】アニメーションプログラムのプログラマ
は、この物体の位置および姿勢等を手動あるいはその他
の方法により変化させ、順次物体の座標を表すデータお
よび角位置を表すデータをコンピュータ200に取り込
む。プログラマは、この取り込みを繰り返すことによ
り、アニメーションに使用したい物体の動きモデルを作
成する。
The programmer of the animation program changes the position and orientation of the object manually or by another method, and sequentially loads the data representing the coordinates of the object and the data representing the angular position into the computer 200. The programmer creates a motion model of the object that he / she wants to use for the animation by repeating this loading.

【0038】プログラマは、このデータを使用して動画
像を表示するアニメーション用のソースプログラムを、
入力装置260と表示装置250を使用してコンピュー
タ200に入力する。コンピュータ200に取り込まれ
たデータを使用して3次元回転行列を計算するプログラ
ム文も入力する。このソースプログラム21は、機種に
依存しない中間言語を用いてコンピュータ300上で書
かれる。例えば、C言語のような高級言語やJavaの
ような中間言語を使用すればよい。
The programmer prepares a source program for animation for displaying a moving image using this data,
An input is made to the computer 200 using the input device 260 and the display device 250. A program sentence for calculating a three-dimensional rotation matrix using the data taken into the computer 200 is also input. The source program 21 is written on the computer 300 using an intermediate language that does not depend on the model. For example, a high-level language such as C or an intermediate language such as Java may be used.

【0039】図5はこのようにして生成されたソースプ
ログラム21を模式的に示す。ここで、22は、モーシ
ョン・キャプチャ100から取り込まれたオイラー角の
データであり、29は、3次元回転行列の要素を計算す
るための関数rotate3dを呼び出すコール文を示
す。ここではそれぞれのコール文29は、引数dadd
r1、daddr2を使用し、戻り値を配列r1、r2
に代入する。
FIG. 5 schematically shows the source program 21 generated in this manner. Here, reference numeral 22 denotes Euler angle data taken from the motion capture 100, and reference numeral 29 denotes a call statement for calling a function rotate3d for calculating an element of a three-dimensional rotation matrix. Here, each call statement 29 has an argument dadd
Using r1 and daddr2, return values are stored in arrays r1 and r2.
Substitute for

【0040】図6は、C言語で記載されたこのようなソ
ースプログラムの例を示す。ここで、24は、3次元の
回転行列を計算する上記関数rotate3dを組み込
むための宣言文である。25は、データ22の大きさに
関する宣言文である。入力パラメータについては、デー
タが格納されているアドレス・ポインタ(daddr)
を指定するようにする。そうすれば、パラメータ数が3
個と4個のどちらの場合にも対応できる。3次元回転行
列の入力パラメータ用の配列データdata[LDAT
A](22)は、配列文26により確保される。文25
はこの配列の大きさを示す。
FIG. 6 shows an example of such a source program described in the C language. Here, reference numeral 24 denotes a declaration statement for incorporating the function rotate3d for calculating a three-dimensional rotation matrix. Reference numeral 25 denotes a declaration sentence relating to the size of the data 22. For input parameters, an address pointer (daddr) where data is stored
To be specified. Then the number of parameters is 3
It is possible to cope with both cases. Array data data [LDAT for input parameters of a three-dimensional rotation matrix
A] (22) is secured by the array statement 26. Statement 25
Indicates the size of this array.

【0041】自然な動作アニメーションにするために、
プログラマは、モデルの必要な回転動作配置をモーショ
ン・キャプチャ100によってあらかじめ測定してお
く。モデルの描画シーンの配置を対話的に決定し、モデ
ルの回転動作をパラメータdaddrによって選択的に
指定する。3次元回転行列関数で計算した3次元行列を
用いて座標変換を実行し、モデルを描画する。実際に
は、モデルの位置の移動の計算を回転計算と連動させて
実行し、これらの二つの計算の結果を使用して上述の座
標変換を実行する。しかし、本明細書では、この移動計
算に関する説明は簡単化するために省略している。
For a natural motion animation,
The programmer measures in advance the required rotational motion arrangement of the model by the motion capture 100. The layout of the drawing scene of the model is interactively determined, and the rotation operation of the model is selectively designated by the parameter daddr. A coordinate transformation is performed using the three-dimensional matrix calculated by the three-dimensional rotation matrix function, and a model is drawn. In practice, the calculation of the movement of the position of the model is performed in conjunction with the rotation calculation, and the above-described coordinate transformation is performed using the results of these two calculations. However, in this specification, the description of the movement calculation is omitted for simplification.

【0042】文28は、配列data[LDATA]2
2上の引用したいデータのアドレスをパラメータdad
dr1(またはdaddr2)を指定し、3次元回転行
列計算関数rotate3d(daddr1(またはd
addr2))(29)は、この指定されたアドレスに
記憶されたオイラー角のデータの3つの成分を使用し
て、3次元回転行列の3行3列の成分を計算する関数で
ある。
Statement 28 includes the sequence data [LDATA] 2
2. The address of the data to be quoted on
dr1 (or daddr2) is specified, and a three-dimensional rotation matrix calculation function rotate3d (daddr1 (or d
addr2)) (29) is a function for calculating the three-row, three-column component of the three-dimensional rotation matrix using the three components of the Euler angle data stored at the specified address.

【0043】図1に戻り、こうして製造されたアニメー
ション用のソースプログラムを、コンピュータ300上
で走行するコンパイラ400により、3次元回転行列の
計算を4元数のデータを使用して行うオブジェクトプロ
グラムに変換する。このコンパイラ400は、まず、ソ
ースプログラムに含まれたオイラー角のデータ22を4
元数のデータに変換する(16)。この変換は図7に示
す手順により実行可能である。配列データdataの連
続する3つの要素data(i),data(i+
1),data(i+2)(i=0,1,2,,,)は
それぞれ同じオイラー角に属する3つのパラメータ
(φ,θ,ψ)を保持すると仮定する。これらの3つの
パラメータの1/2の値φ/2,θ/2,ψ/2のsi
n、cosを計算する。その後、図4(b)で示した関
係式を使用して、対応する4元数(w,x,y,z)を
計算し、それぞれを別の配列tdataの4つの連続す
る要素tdata(j),tdata(j+1),td
ata(j+2),tdata(j+3)に格納する
(201,202)。配列dataの総要素数LDAT
Aの4/3倍を配列tdataの総要素数として計算
し、その後、配列tdataを配列dataにコピーす
る(203)。こうして、元の配列dataから新たな
配列tdataが得られ、最終的に配列dataが更新
される。
Referring back to FIG. 1, the source program for animation produced in this manner is converted into an object program for calculating a three-dimensional rotation matrix using quaternion data by a compiler 400 running on a computer 300. I do. The compiler 400 first converts the Euler angle data 22 included in the source program into 4
The data is converted to the original number data (16). This conversion can be performed by the procedure shown in FIG. Three consecutive elements data (i) and data (i +
It is assumed that 1) and data (i + 2) (i = 0, 1, 2,...) Respectively hold three parameters (φ, θ, ψ) belonging to the same Euler angle. 1/2 of these three parameters, φ / 2, θ / 2, ψ / 2, si
Calculate n and cos. Thereafter, the corresponding quaternion (w, x, y, z) is calculated using the relational expression shown in FIG. 4 (b), and each of the quaternions is calculated as four consecutive elements tdata (j ), Tdata (j + 1), td
Data are stored in data (j + 2) and tdata (j + 3) (201, 202). Total number of elements of array data LDAT
4/3 times A is calculated as the total number of elements of the array tdata, and then the array tdata is copied to the array data (203). In this way, a new array tdata is obtained from the original array data, and finally the array data is updated.

【0044】図1に戻り、その後、このソースプログラ
ムを特定のコンピュータ用のオブジェクトプログラムに
変換する(17)。
Returning to FIG. 1, the source program is converted into an object program for a specific computer (17).

【0045】その後、4元数による3次元回転行列を計
算するライブラリをこのオブジェクトプログラムに組み
込む(20)。より具体的には、図6のソースプログラ
ムに対しては、このライブラリは、関数rotate3
dを実行するものとして、コンパイラ300に予め準備
されている。このライブラリは、4元数のデータに対す
る3次元の回転行列を、図4(c)にしたがって行えば
よい。具体的には、先に求められた4元数のデータda
taに対して図8に示すように行えばよい。この3次元
の回転行列の要素r[1,1]からr[3,3]の計算
は、図8に示すように、乗算と加減算により実行でき
る。したがって、こうして作成されたアニメーション用
のオブジェクトプログラムは、三角関数用の演算器を有
しないコンピュータでも高速に実行できる。
Thereafter, a library for calculating a three-dimensional rotation matrix based on a quaternion is incorporated into this object program (20). More specifically, for the source program of FIG.
The compiler 300 is prepared in advance to execute d. This library may perform a three-dimensional rotation matrix for quaternion data in accordance with FIG. Specifically, the data da of the quaternion obtained earlier is
ta may be performed as shown in FIG. The calculation of the elements r [1,1] to r [3,3] of the three-dimensional rotation matrix can be executed by multiplication and addition / subtraction as shown in FIG. Therefore, the animation object program created in this way can be executed at high speed even by a computer having no arithmetic unit for trigonometric functions.

【0046】以上の結果、モーション・キャプチャから
出力されるオイラー角のデータを含み、3次元の回転行
列を計算する部分を有するソースプログラムから、4元
数のデータに対する3次元の回転行列を計算する部分を
含むオブジェクトプログラムを製造できる。
As a result, a three-dimensional rotation matrix for quaternion data is calculated from a source program including Euler angle data output from motion capture and having a part for calculating a three-dimensional rotation matrix. An object program including a part can be manufactured.

【0047】なお、配列20の変換は、コンパイル時に
行わないで、それより前に行わせることも可能である。
しかし、本実施の形態のように、コンパイル時にこの変
換を行う方が処理が簡単である。
It should be noted that the conversion of the array 20 may not be performed at the time of compilation, but may be performed earlier.
However, as in the present embodiment, it is easier to perform this conversion when compiling.

【0048】<発明の実施の形態2>本実施の形態で
は、モデル物体の3次元の角位置を表す4元数のデータ
を出力する新規なモーション・キャプチャが使用され、
そこから出力されるデータに対して3次元の回転行列を
計算する部分を含むようにアニメーション用のソースプ
ログラムが生成される。そのソースプログラムが、4元
数のデータを使用して加減算と乗算により3次元の回転
行列を計算する部分を含むオブジェクトプログラムに変
換される。こうして、新規なモーション・キャプチャを
使用することにより、加減算と乗算により3次元の回転
行列を計算するオブジェクトプログラムが得られる。
<Embodiment 2 of the Invention> In this embodiment, a novel motion capture that outputs quaternion data representing a three-dimensional angular position of a model object is used.
A source program for animation is generated so as to include a part for calculating a three-dimensional rotation matrix for the data output therefrom. The source program is converted into an object program including a part for calculating a three-dimensional rotation matrix by addition, subtraction, and multiplication using quaternion data. Thus, by using the new motion capture, an object program that calculates a three-dimensional rotation matrix by addition, subtraction, and multiplication is obtained.

【0049】図9において、モーション・キャプチャ1
00は、先に述べたオイラー角出力変換部103に代え
て、4元数出力変換部104が使用される。オイラー角
出力変換部103は、画像座標測定解析部102の出力
をオイラー角のデータに変換したが、前者の出力を4元
数となるように、4元数出力変換部104を構成するこ
とは同様に可能である。4元数にもとづくその解法につ
いては既に知られている(例えば、D.W. Eggert: Estim
ating 3-D rigid body transformations: a comparison
of four major algorithms, Machine Vision and Appl
ications, 1997,9, pp. 272-290参照)。
In FIG. 9, motion capture 1
For 00, a quaternion output converter 104 is used instead of the Euler angle output converter 103 described above. The Euler angle output conversion unit 103 converts the output of the image coordinate measurement analysis unit 102 into Euler angle data. However, it is not possible to configure the quaternion output conversion unit 104 so that the former output becomes a quaternion. It is equally possible. The solution based on the quaternion is already known (for example, DW Eggert: Estim
ating 3-D rigid body transformations: a comparison
of four major algorithms, Machine Vision and Appl
ications, 1997, 9, pp. 272-290).

【0050】その後のソースプログラムの作成は、実施
の形態1とは、モーション・キャプチャ100から出力
されるデータ以外は基本的には同様になされる。このと
きC言語で作成されたソースプログラムの例は、図6に
示されたものに対しては、配列dataの各要素の値と
要素数が異なるのみである。
The subsequent creation of the source program is basically the same as that of the first embodiment except for the data output from the motion capture 100. At this time, the example of the source program created in the C language differs from that shown in FIG. 6 only in the value of each element of the array data and the number of elements.

【0051】こうして作成されたソースプログラムをコ
ンパイラ400によりコンパイルするときには、実施の
形態1における、データ変換手順(16(図1))を実
行する必要はなく、すなわち、そのソースプログラムを
オブジェクトプログラムに変換し(17)、その後、4
元数による3次元回転行列を計算するライブラリをこの
オブジェクトプログラムに組み込めばよい(20)。
When compiling the source program thus created by the compiler 400, it is not necessary to execute the data conversion procedure (16 (FIG. 1)) in the first embodiment, that is, the source program is converted into an object program. (17), then 4
A library for calculating a three-dimensional rotation matrix based on the element number may be incorporated into this object program (20).

【0052】以上の結果、モーション・キャプチャから
4元数のデータを出力させて、このデータを含み、3次
元の回転行列を計算する部分を有するソースプログラム
が製造できる。さらにこのソースプログラムから、4元
数のデータに対する3次元の回転行列を計算する部分を
含むオブジェクトプログラムを製造できる。このような
オブジェクトプログラムは、三角関数を算出する演算器
を有しないコンピュータで実行できるのは、実施の形態
と同じである。
As a result, a quaternion data is output from the motion capture, and a source program including this data and having a part for calculating a three-dimensional rotation matrix can be manufactured. Further, from this source program, an object program including a part for calculating a three-dimensional rotation matrix for quaternion data can be manufactured. Such an object program can be executed by a computer having no arithmetic unit for calculating a trigonometric function, as in the embodiment.

【0053】<発明の実施の形態3>本実施の形態は、
実施の形態1で使用された、物体の3次元の角位置を表
すオイラー角のデータもしくは実施の形態2で使用され
た、物体の3次元の角位置を表す4元数のデータの任意
のいずれかと、そのデータを使用して3次元の回転行列
を計算する部分を含むソースプログラムから、複数種類
のコンピュータ、とくに、三角関数の演算器を有するコ
ンピュータおよびそれを有しないコンピュータの任意の
一つで実行可能な、アニメーション用のオブジェクトプ
ログラムを同じコンパイラを使用して製造可能にする。
<Third Embodiment of the Invention>
Either the Euler angle data representing the three-dimensional angular position of the object used in the first embodiment or the quaternion data representing the three-dimensional angular position of the object used in the second embodiment From a source program including a part for calculating a three-dimensional rotation matrix using the data, a plurality of types of computers, in particular, a computer having a trigonometric function calculator and a computer not having one An executable object program for animation can be manufactured using the same compiler.

【0054】より具体的には、本実施の形態のコンパイ
ラは、オイラー角のデータと、そのデータを使用して3
次元の回転行列を計算する部分を含む第1種のソースプ
ログラムから、4元数のデータを使用して3次元の回転
行列を計算するアニメーション用の第1種のオブジェク
トプログラムを製造することができる。この第1種のオ
ブジェクトプログラムも三角関数の演算器を有しないコ
ンピュータでも3次元の回転行列を高速に計算可能であ
る。
More specifically, the compiler of the present embodiment uses the Euler angle data and
From a first type source program including a part for calculating a three-dimensional rotation matrix, a first type object program for animation for calculating a three-dimensional rotation matrix using quaternion data can be manufactured. . This first type of object program can also calculate a three-dimensional rotation matrix at high speed even with a computer having no trigonometric function calculator.

【0055】さらに、本実施の形態のコンパイラは、上
記第1種のソースプログラムから、三角関数の演算器を
使用して3次元の回転行列を計算する第2種のオブジェ
クトプログラムを製造することができる。このオブジェ
クトプログラムは、三角関数の演算器を有するコンピュ
ータで実行可能である。
Further, the compiler of the present embodiment can produce a second type of object program for calculating a three-dimensional rotation matrix from the first type of source program by using a trigonometric function calculator. it can. This object program can be executed by a computer having a trigonometric function calculator.

【0056】このように、本実施の形態のコンパイラ
は、同じ第1種のソースプログラムに対してこれらの2
種類のオブジェクトプログラムを製造する機能を用いる
と、同じテーマのアニメーションソフトを異なるコンピ
ュータ用に簡単に製造できる。
As described above, the compiler according to the present embodiment uses these two
By using the function of manufacturing various types of object programs, animation software of the same theme can be easily manufactured for different computers.

【0057】さらに、本実施の形態のコンパイラは、4
元数のデータと、そのデータを使用して3次元の回転行
列を計算する部分を含む第2種のソースプログラムか
ら、4元数のデータを使用して3次元の回転行列を計算
するアニメーション用の第2種のオブジェクトプログラ
ムを製造することができる。
Further, the compiler according to the present embodiment
For an animation that calculates a three-dimensional rotation matrix using quaternion data from a second-type source program that includes data of an enumeration and a part that calculates a three-dimensional rotation matrix using the data Can be manufactured.

【0058】したがって、第1種のソースプログラムお
よび第2種のソースプログラムからも、同じコンパイラ
により上記第1種のプログラムを製造できる。第1種の
ソースプログラムは、従来のモーション・キャプチャを
使用して作成できる。第2種のソースプログラムは、本
発明の第2の実施の形態において提案された新しいモー
ション・キャプチャを使用して作成できる。したがっ
て、本実施の形態のコンパイラは、いずれのソースプロ
グラムからも4元数のデータを使用するオブジェクトプ
ログラムを製造できる。
Therefore, the first type program can be manufactured from the first type source program and the second type source program by the same compiler. The first type of source program can be created using conventional motion capture. A second type of source program can be created using the new motion capture proposed in the second embodiment of the present invention. Therefore, the compiler according to the present embodiment can manufacture an object program using quaternion data from any source program.

【0059】さらに、本実施の形態のコンパイラは、第
1種オブジェクトプログラムを製造するときに、三角関
数の演算器を有しないコンピュータで実行可能なオブジ
ェクトプログラムを、三角関数の演算器を有しない点で
は共通であるが、実際には命令体系等のアーキテクチャ
が異なる複数のコンピュータに対応して、このオブジェ
クトプログラムを異なるコードにより構成することがで
きる。本実施の形態のコンパイラは、第2種のオブジェ
クトプログラムを製造するときに、三角関数の演算器を
有するコンピュータで実行可能なオブジェクトプログラ
ムを、三角関数の演算器を有する点では共通であるが、
実際には命令体系等のアーキテクチャが異なる複数のコ
ンピュータに対応して、このオブジェクトプログラムを
異なるコードにより構成することができる。したがっ
て、これらの機能により、同じテーマのアニメーション
用のオブジェクトプログラムを、種々のコンピュータ用
に容易に製造できる。
Furthermore, the compiler according to the present embodiment, when producing a first-type object program, converts an object program that can be executed by a computer having no trigonometric function calculator into a computer program having no trigonometric function calculator. However, in practice, this object program can be configured by different codes corresponding to a plurality of computers having different architectures such as instruction systems. The compiler according to the present embodiment has a common feature in that when a second type of object program is manufactured, an object program that can be executed by a computer having a trigonometric function operation unit has a trigonometric function operation unit.
Actually, this object program can be constituted by different codes corresponding to a plurality of computers having different architectures such as an instruction system. Therefore, with these functions, an object program for animation of the same theme can be easily manufactured for various computers.

【0060】本実施の形態によれば、各ターゲットコン
ピュータの演算器構成が他と異なっていても、また3次
元回転行列の入力パラメータの形式が異なっていても、
それぞれのターゲットコンピュータに対応するコードか
らなる、3次元回転行列を計算する部分を有するオブジ
ェクトプログラムをパソコンのような低価格の開発環境
のもとで統一して開発するのに有効である。また、これ
らのターゲットコンピュータに対して同じタイトルのア
ニメーションソフトを簡単に移植するのにも役立つ。
According to the present embodiment, even if the configuration of the arithmetic unit of each target computer is different from the others, and the format of the input parameters of the three-dimensional rotation matrix is different,
This is effective in unifying the development of an object program having a part for calculating a three-dimensional rotation matrix composed of codes corresponding to the respective target computers under a low-cost development environment such as a personal computer. It is also useful for easily porting animation software of the same title to these target computers.

【0061】図10において、ソースプログラム21
が、実施の形態1のように、モデル物体の3次元の角位
置を表すオイラー角のデータを出力するモーション・キ
ャプチャを用いて製造されるか、あるいは、実施の形態
2のように、モデル物体の3次元の角位置を表す4元数
のデータを出力するモーション・キャプチャを用いて製
造される。実施の形態1あるいは2と異なり、このソー
スプログラム21は、コンパイラ400の変換動作を指
定するための情報28をいろいろ含んでいる。図10に
は、その一例として、このソースプログラム21に含ま
れたデータ22が、オイラー角のデータかあるいは4元
数のデータかを識別する文を含んでいる。
In FIG. 10, the source program 21
Is manufactured using motion capture that outputs Euler angle data representing a three-dimensional angular position of the model object as in the first embodiment, or the model object is manufactured as in the second embodiment. It is manufactured using a motion capture that outputs quaternion data representing the three-dimensional angular position of. Unlike the first or second embodiment, the source program 21 includes various information 28 for specifying the conversion operation of the compiler 400. FIG. 10 includes, as an example, a sentence for identifying whether the data 22 included in the source program 21 is Euler angle data or quaternion data.

【0062】図11は、ソースプログラム21の具体例
であり、C言語で記載されている。ここで、変数EUL
ERは、このデータ22が、オイラー角のデータかある
いは4元数のデータであるかを示す。変数SCSUP
は、コンパイル結果を利用すべきコンピュータが正弦、
余弦という三角関数を計算するための演算器を有するか
否かを示す。この演算器は、三角関数の値を記憶したメ
モリを使用するもの、多項式近似により三角関数の値を
求めるものあるいはその他のものでもよい。さらに、E
ULANGは、コンパイル結果を利用すべきコンピュー
タが正弦、余弦という三角関数を計算するための演算器
を有する場合に、その演算器を使用するオブジェクトプ
ログラムを製造するか否かを示すものである。MACN
は、コンパイラ40の結果を利用するコンピュータ(タ
ーゲットコンピュータ)に割り当てられた識別番号であ
る。オペレータは、ソースプログラム21を新たに作成
する前にまたは作成した後に以上の変換動作指定情報を
ソースプログラム21に含ませる。すでに作成済みのソ
ースプログラムにこれらの情報を付加してもよい。識別
番号MACN以外の変数は、値1又は0を有する。
FIG. 11 shows a specific example of the source program 21, which is described in C language. Where the variable EUL
ER indicates whether the data 22 is Euler angle data or quaternion data. Variable SCSUP
Is that the computer that should use the compilation results is a sine,
It indicates whether or not there is a calculator for calculating a trigonometric function called cosine. This arithmetic unit may use a memory that stores the value of the trigonometric function, may calculate the value of the trigonometric function by polynomial approximation, or may be of another type. Furthermore, E
ULANG indicates whether or not to manufacture an object program that uses a computing unit when a computer that should use the compilation result has a computing unit for calculating trigonometric functions such as sine and cosine. MACN
Is an identification number assigned to a computer (target computer) that uses the result of the compiler 40. The operator causes the above-mentioned conversion operation designation information to be included in the source program 21 before or after newly creating the source program 21. Such information may be added to a source program that has already been created. Variables other than the identification number MACN have the value 1 or 0.

【0063】図10に戻り、コンピュータ300内に
は、3次元回転行列を計算するためのライブラリ群8が
予め用意されている。コンパイラ400はソースプログ
ラム21をコンパイルして、異なるコンピュータ用のオ
ブジェクトプログラム23から27のいずれかを製造す
る。これらは、データ33から37とライブラリ群8に
含まれている適当なライブラリ93から97を含んでい
る。
Returning to FIG. 10, a library group 8 for calculating a three-dimensional rotation matrix is prepared in the computer 300 in advance. Compiler 400 compiles source program 21 to produce one of object programs 23 to 27 for different computers. These include data 33 to 37 and appropriate libraries 93 to 97 included in library group 8.

【0064】図12に示すように、コンパイラ400
は、まず、ソースプログラム21を入力する(10)。
ソースプログラム21に含まれたデータ22が、オイラ
ー角のデータか4元数のデータかを判別する(10)。
この判別は、図11のソースプログラム21の場合、変
数EULERが0か1か否かに依存して行われる。デー
タ22がオイラー角の場合、コンパイラ400は、ター
ゲットコンピュータに正弦、余弦という三角関数を計算
する演算器が含まれているか否かを判別する(12)。
この判別は、図11のプログラムの場合、変数SCSU
Pが1か否かにより行われる。もし、ターゲットコンピ
ュータがこの演算器を有しないとき、コンパイラ400
は、データ21を対応する4元数のデータに変換する
(16)。この変換は、実施の形態1あるいは2と同じ
ようにして行われる。その後、ソースプログラム21を
ターゲットコンピュータに対応するコードからなるオブ
ジェクトプログラムに変換する(17)。この処理17
も実施の形態1と全く同じように実行される。なお、タ
ーゲットコンピュータは、図11のプログラムの場合、
識別番号MACNにより識別される。次に、得られた4
元数のデータを利用して3次元回転行列を計算するライ
ブラリを、ライブラリ群8(図11)から選択してこの
オブジェクトプログラムに組み込む。このライブラリ
は、図11のプログラムの場合、識別番号MACNによ
り定まるターゲットコンピュータ用に用意されたものが
ライブラリ群8から選択される。このライブラリも、実
施の形態1と同様に、乗算と加減算を使用してこの行列
の要素を計算する。こうして、実施の形態1と同様にし
て、オイラー角のデータと、そのデータを使用して3次
元の回転行列を計算するソースプログラムから、4元数
のデータを使用して3次元の回転行列を計算する、ター
ゲットコンピュータ用のオブジェクトプログラムが製造
される。
As shown in FIG.
First, the user inputs the source program 21 (10).
It is determined whether the data 22 included in the source program 21 is Euler angle data or quaternion data (10).
This determination is made depending on whether the variable EULER is 0 or 1 in the case of the source program 21 in FIG. If the data 22 is an Euler angle, the compiler 400 determines whether or not the target computer includes a calculator for calculating trigonometric functions such as sine and cosine (12).
This determination is made in the case of the program of FIG.
This is performed depending on whether P is 1 or not. If the target computer does not have this operator, the compiler 400
Converts the data 21 into corresponding quaternion data (16). This conversion is performed in the same manner as in the first or second embodiment. After that, the source program 21 is converted into an object program consisting of codes corresponding to the target computer (17). This processing 17
Is executed in exactly the same manner as in the first embodiment. Note that the target computer is the program of FIG.
It is identified by the identification number MACN. Next, the obtained 4
A library for calculating a three-dimensional rotation matrix using the data of the element number is selected from the library group 8 (FIG. 11) and incorporated into the object program. In the case of the program shown in FIG. 11, the library prepared for the target computer determined by the identification number MACN is selected from the library group 8. This library also calculates the elements of this matrix using multiplication and addition / subtraction, as in the first embodiment. Thus, in the same manner as in the first embodiment, the three-dimensional rotation matrix is calculated from the Euler angle data and the source program for calculating the three-dimensional rotation matrix using the data using the quaternion data. An object program for the target computer to be calculated is manufactured.

【0065】ステップ11での判別の結果、データ22
が4元数のデータであると判別されたときには、ステッ
プ17、20が実行される。この結果、実施の形態2と
同様にして、4元数のデータと、そのデータを使用して
3次元の回転行列を計算するソースプログラムから、4
元数のデータを使用して3次元の回転行列を計算する、
ターゲットコンピュータ用のオブジェクトプログラムが
製造される。
As a result of the determination in step 11, the data 22
Are determined to be quaternion data, steps 17 and 20 are executed. As a result, in the same manner as in Embodiment 2, quaternion data and a source program for calculating a three-dimensional rotation matrix using the data,
Calculate a three-dimensional rotation matrix using the data of the element numbers,
An object program for the target computer is manufactured.

【0066】ステップ12での判別の結果、ターゲット
コンピュータに前述の演算器が含まれていると判別され
たとき、コンパイラ400は、その演算器を使用するオ
ブジェクトプログラムを製造するか否かを判別する(1
3)。図11のプログラムの場合、この判別は、変数E
ULANGの値に基づいて行われる。もし、その演算器
を使用するオブジェクトプログラムを製造しないときに
は、既に説明したステップ17、20が実行される。
As a result of the determination in step 12, when it is determined that the above-described arithmetic unit is included in the target computer, the compiler 400 determines whether or not to manufacture an object program using the arithmetic unit. (1
3). In the case of the program shown in FIG.
This is performed based on the value of ULANG. If an object program using the arithmetic unit is not manufactured, steps 17 and 20 described above are executed.

【0067】ステップ13での判別の結果、上記演算器
を使用するオブジェクトプログラムを製造すると判断さ
れたときには、コンパイラ400は、オイラー角の3つ
のパラメータの正弦と余弦をその演算器を使用して計算
し、それらの計算結果を使用して3次元の回転行列を計
算するための、そのターゲットコンピュータ用に準備さ
れたライブラリをオブジェクトプログラムに組み込む
(19)。このライブラリは、図4(a)にしたがって
3次元回転行列を計算すればよい。より具体的には、図
13に示すようにデータ22を使用して計算すればよ
い。
When it is determined in step 13 that an object program using the above-described arithmetic unit is manufactured, the compiler 400 calculates the sine and cosine of the three parameters of the Euler angles using the arithmetic unit. Then, a library prepared for the target computer for calculating a three-dimensional rotation matrix using the calculation results is incorporated in the object program (19). This library may calculate a three-dimensional rotation matrix according to FIG. More specifically, the calculation may be performed using the data 22 as shown in FIG.

【0068】こうして、オイラー角のデータとそれを使
用して3次元の回転行列を計算する部分とを含むソース
プログラムから、上記演算器を使用して上記3次元の回
転行列を計算する部分を含むオブジェクトプログラムが
製造される。このオブジェクトは、上記演算器を有する
コンピュータにより、ソースプログラム21を実行させ
たいときに使用できる。
Thus, the source program including the Euler angle data and the part for calculating the three-dimensional rotation matrix using the data includes the part for calculating the three-dimensional rotation matrix using the arithmetic unit. An object program is manufactured. This object can be used when it is desired to execute the source program 21 by a computer having the arithmetic unit.

【0069】なお、変換動作指定情報は、図11に示し
たソースプログラムに含まれた情報に代えて、他の方法
で利用者に指定させてもよい。例えばコンパイラ400
が、判定11,12,13に必要な情報を、コンピュー
タ300に接続された表示装置と入力装置(ともに図示
せず)により、コンパイラの利用者に入力させてもよ
い。
The conversion operation specifying information may be specified by the user by another method instead of the information included in the source program shown in FIG. For example, compiler 400
However, a user of the compiler may input information necessary for determinations 11, 12, and 13 by using a display device and an input device (both not shown) connected to the computer 300.

【0070】<発明の実施の形態4>実施の形態1、2
あるいは3においては、生成されたオブジェクトプログ
ラムに含まれた、4元数のデータを使用して3次元の回
転行列を計算する部分は、乗算と加減算により実行でき
るので、通常コンピュータに含まれている演算器を使用
して高速に実行されると記載した。本実施の形態は、4
元数による3次元回転行列をより高速に計算するための
演算器を提供する。この演算器は、上記オブジェクトプ
ログラムを実行するコンピュータに含ませると、上記行
列の計算をより高速に実行できる。
<Embodiment 4> Embodiments 1 and 2
Alternatively, in 3, in the generated object program, a part for calculating a three-dimensional rotation matrix using quaternion data can be executed by multiplication and addition / subtraction, and is usually included in a computer. It is described that the processing is executed at high speed by using an arithmetic unit. In the present embodiment, 4
Provided is an arithmetic unit for calculating a three-dimensional rotation matrix based on an element at a higher speed. When this arithmetic unit is included in a computer that executes the object program, the calculation of the matrix can be performed at higher speed.

【0071】図14において、本演算器は、3個の乗算
器60,61,62と加算器70、71,72,73お
よびその他の回路からなる。4元数w,x,y,zは、
レジスタ50,51,52,53にそれぞれ図示しない
メモリからロードされる。レジスタ50からパラメータ
wが乗算器60に供給される。セレクタ54は、レジス
タ53,52,51からパラメータz、y、xを順次乗
算器60に供給し、パラメータwとの積を計算させる。
その結果、乗算器60は、積wz,wy,wxを順に出
力する。セレクタ55と56は、レジスタ53,52,
51からパラメータ対xy、xz、yzを順次乗算器6
1に供給し、それぞれの対に属する二つのパラメータの
積を計算させる。その結果、乗算器61は、積xy,x
z,yzを順に出力する。セレクタ57は、レジスタ5
1,52,53からパラメータx,y、zを順次乗算器
62に供給し、それぞれの二乗を計算させる。その結
果、乗算器62は、積xx,yy,zzを順に出力す
る。セレクタ54,55,56,57は互いに同期して
動作する。乗算器60,61,62も同じである。した
がって、乗算器60,61,62からは、あるマシーン
サイクルで並列にwz、xy、xxが出力され、次のマ
シーンサイクルでwy、xz、yyが出力される。さら
に次のマシーンサイクルで、wx,yz,zzが並列に
出力される。
In FIG. 14, the arithmetic unit comprises three multipliers 60, 61, 62, adders 70, 71, 72, 73 and other circuits. The quaternions w, x, y, z are
The registers 50, 51, 52, and 53 are loaded from memories (not shown). The parameter w is supplied from the register 50 to the multiplier 60. The selector 54 sequentially supplies the parameters z, y, and x from the registers 53, 52, and 51 to the multiplier 60, and causes the multiplier 60 to calculate a product with the parameter w.
As a result, the multiplier 60 sequentially outputs the products wz, wy, and wx. The selectors 55 and 56 include registers 53, 52,
From 51, the parameter pair xy, xz, yz is sequentially multiplied by 6
1 to calculate the product of the two parameters belonging to each pair. As a result, the multiplier 61 outputs the product xy, x
z and yz are output in order. The selector 57 selects the register 5
The parameters x, y, and z are sequentially supplied from 1, 52, and 53 to the multiplier 62, and the respective squares are calculated. As a result, the multiplier 62 sequentially outputs the products xx, yy, and zz. The selectors 54, 55, 56, 57 operate in synchronization with each other. The same applies to the multipliers 60, 61, and 62. Therefore, wz, xy, and xx are output in parallel in a certain machine cycle from the multipliers 60, 61, and 62, and wy, xz, and yy are output in the next machine cycle. In the next machine cycle, wx, yz, and zz are output in parallel.

【0072】加算器70は、乗算器60、61の出力を
加算する。加算器71は、減算器として動作し、乗算器
61の出力から乗算器60の出力を減ずる。加算器7
0,71は同期して動作する。
The adder 70 adds the outputs of the multipliers 60 and 61. The adder 71 operates as a subtractor, and subtracts the output of the multiplier 60 from the output of the multiplier 61. Adder 7
0, 71 operate synchronously.

【0073】乗算器60,61の最初の2出力wz、x
yに対して、加算結果xy+wzが加算器70から与え
られ、それらの2出力の減算結果xy−wzが減算器7
1により同時に与えられる。加算結果および減算結果
は、加算器70,71の出力に接続されたシフター7
4,75により左へ1ビットシフトされてレジスタ8
0、81にそれぞれセットされる。すなわち、レジスタ
80,81には、2(xy+wz)と2(xy−wz)
とがセットされる。これらのデータは3次元回転行列R
の要素R(2,1)とR(1,2)を表す。
First two outputs wz, x of multipliers 60 and 61
y, an addition result xy + wz is given from the adder 70, and a subtraction result xy-wz of those two outputs is obtained by the subtractor 7
1 at the same time. The addition result and the subtraction result are output to the shifter 7 connected to the outputs of the adders 70 and 71.
The register 8 is shifted left by 1 bit by
0 and 81 are set respectively. That is, 2 (xy + wz) and 2 (xy−wz) are stored in the registers 80 and 81.
Is set. These data are represented by a three-dimensional rotation matrix R
R (2,1) and R (1,2).

【0074】第2のマシーンサイクルでは、乗算器6
0,61の出力wy、xzにより、同様にして2(xz
+wy)および2(xz−wy)がレジスタ80,81
にセットされる。これらのデータは3次元回転行列Rの
要素R(1,3)とR(3,1)を表す。
In the second machine cycle, the multiplier 6
Similarly, 2 (xz
+ Wy) and 2 (xz-wy) are the registers 80 and 81
Is set to These data represent the elements R (1,3) and R (3,1) of the three-dimensional rotation matrix R.

【0075】更に第3のマシーンサイクルでは、乗算器
60,61の出力wx、yzにより、同様にして2(y
z+wx)および2(yz−wx)がレジスタ80,8
1にセットされる。これらのデータは3次元回転行列R
の要素R(3,2)とR(2,3)を表す。
Further, in the third machine cycle, the outputs wx and yz of the multipliers 60 and 61 are used to calculate 2 (y
z + wx) and 2 (yz−wx) are the registers 80 and 8
Set to 1. These data are represented by a three-dimensional rotation matrix R
R (3,2) and R (2,3).

【0076】一方、最初のマシーンサイクルでは、シフ
ター78は乗算器62の出力xxを左へ1ビットシフト
して加算器(これは減算器として動作する)72に2x
xとして供給する。セレクタ76は、最初のマシーンサ
イクルでは定数1.0を選択して減算器72へ供給す
る。減算器72は、この定数1.0から2xxを減算す
る。マルティプレクサ79はこの減算結果1−2xxを
レジスタ82にセットする。こうして、最初のマシーン
サイクルでは、レジスタ82に演算結果1−2xxが格
納される。
On the other hand, in the first machine cycle, the shifter 78 shifts the output xx of the multiplier 62 to the left by one bit, and outputs 2x to the adder (which operates as a subtractor) 72.
Supply as x. The selector 76 selects the constant 1.0 in the first machine cycle and supplies it to the subtractor 72. The subtracter 72 subtracts 2xx from the constant 1.0. The multiplexer 79 sets the subtraction result 1-2xx in the register 82. Thus, in the first machine cycle, the operation result 1-2xx is stored in the register 82.

【0077】セレクタ76は、第2のマシーンサイクル
ではレジスタ82を選択する。このマシーンサイクルで
は、減算器72にはセレクタ78より乗算器62の出力
yyの2倍が供給され、セレクタ76からは、1−2x
xが供給される。この結果、減算器72は1−2xx−
2yyを出力する。このマルティプレクサ79はこの減
算結果をレジスタ84にセットする。こうして、第2の
マシーンサイクルでは、レジスタ84に演算結果1−2
xx−2yyが格納され、3次元回転行列Rの要素R
(3,3)として使用される。
The selector 76 selects the register 82 in the second machine cycle. In this machine cycle, the selector 78 is supplied with twice the output yy of the multiplier 62 from the selector 78, and the selector 76 outputs 1-2x
x is supplied. As a result, the subtractor 72 outputs 1-2xx-
2yy is output. The multiplexer 79 sets the result of the subtraction in the register 84. Thus, in the second machine cycle, the operation result 1-2 is stored in the register 84.
xx-2yy is stored, and the element R of the three-dimensional rotation matrix R
Used as (3,3).

【0078】セレクタ76は、第3のマシーンサイクル
でもレジスタ82を選択する。このマシーンサイクルで
は、減算器72にはセレクタ78より乗算器62の出力
zzの2倍が供給され、セレクタ76からは、1−2x
xが供給される。この結果、減算器72は1−2xx−
2zzを出力する。このマルティプレクサ79はこの減
算結果をレジスタ82にセットする。こうして、第3の
マシーンサイクルでは、レジスタ82に演算結果1−2
xx−2zzが格納され、3次元回転行列Rの要素R
(2,2)として使用される。
The selector 76 selects the register 82 also in the third machine cycle. In this machine cycle, the selector 78 is supplied with twice the output zz of the multiplier 62 from the selector 78, and the selector 76 outputs 1-2x
x is supplied. As a result, the subtractor 72 outputs 1-2xx-
2zz is output. The multiplexer 79 sets the subtraction result in the register 82. Thus, in the third machine cycle, the operation result 1-2 is stored in the register 82.
xx-2zz is stored, and the element R of the three-dimensional rotation matrix R is stored.
Used as (2,2).

【0079】一方、第2のマシーンサイクルでは、セレ
クタ78の出力2yyは、減算器73へも供給される。
セレクタ77は定数1.0を減算器73に供給する。減
算器73は、1−2yyをレジスタ83に出力する。第
3のマシーンサイクルでは、セレクタ78が、乗算器6
2の出力zzの2倍を減算器73に出力する。セレクタ
77はレジスタ83内のデータ1−2yyを減算器73
に供給する。こうして減算器73は、1−2yy−2z
zをレジスタ83に格納する。このデータは、3次元回
転行列Rの要素R(1,1)として使用される。
On the other hand, in the second machine cycle, the output 2yy of the selector 78 is also supplied to the subtractor 73.
The selector 77 supplies the constant 1.0 to the subtractor 73. The subtractor 73 outputs 1-2yy to the register 83. In the third machine cycle, the selector 78 selects the multiplier 6
2 is output to the subtractor 73. The selector 77 subtracts the data 1-2yy in the register 83 from the subtractor 73.
To supply. Thus, the subtractor 73 has 1-2yy-2z
z is stored in the register 83. This data is used as an element R (1, 1) of the three-dimensional rotation matrix R.

【0080】このように、本演算器では、レジスタ8
0,81,82,83,84内に4元数による3次元回
転行列17の全要素が得られる。これらのデータは、図
示しないメモリへストアされる。しかもこれらのデータ
は、3マシーンサイクルで得られる。
As described above, in this operation unit, the register 8
All the elements of the three-dimensional rotation matrix 17 based on the quaternion are obtained in 0, 81, 82, 83, 84. These data are stored in a memory (not shown). Moreover, these data are obtained in three machine cycles.

【0081】なお、メモリ(図示しない)からレジスタ
50,51,52,53へのデータw,x,y,zのロ
ードは、先行する4元数データに対して同様にしてレジ
スタ80,81,82,83,84に得られた結果デー
タをメモリへストアする動作とパイプライン的にオーバ
ラップして実行される。
The loading of data w, x, y, z from a memory (not shown) to the registers 50, 51, 52, 53 is performed in the same manner as for the preceding quaternion data. The operation of storing the result data obtained in 82, 83, and 84 in the memory is executed in a manner overlapping the pipeline.

【0082】本演算器は、3つの乗算器と4つの加算器
を主たる構成要素としているので、その構造は比較的簡
単である。さらに、従来のコンピュータの演算器には、
4個の乗算器と1個の加算器70とを積和演算用に有す
るものも多い。本実施の形態では、そのようなコンピュ
ータでは、それらの4つの乗算器の内の3つとその加算
器70を使用し、さらにその加算器71,72,73と
配線および制御をその追加して実現できる。したがっ
て、本演算器は、従来のコンピュータにある演算器に少
しの回路を付加するだけで実現ができる。
Since this arithmetic unit has three multipliers and four adders as main components, its structure is relatively simple. In addition, conventional computer computing units include:
Many have four multipliers and one adder 70 for the product-sum operation. In the present embodiment, such a computer uses three of the four multipliers and the adder 70, and further realizes the adders 71, 72, 73, and the wiring and control additionally. it can. Therefore, this arithmetic unit can be realized by adding a few circuits to the arithmetic unit in the conventional computer.

【0083】このような特殊な演算器を、各ターゲット
コンピュータに設けても、3次元回転行列計算式17
は、単純なので、各ターゲットコンピュータ対応に、こ
の演算器を使用して3次元回転行列を計算するコードを
書いて出力することが容易である。このため、統一環境
の中でこの演算器を使用するプログラムを開発すること
が可能となる。
Even if such a special arithmetic unit is provided in each target computer, the three-dimensional rotation matrix calculation formula 17
Is simple, so that it is easy to write and output a code for calculating a three-dimensional rotation matrix using this calculator for each target computer. For this reason, it is possible to develop a program using this arithmetic unit in a unified environment.

【0084】[0084]

【発明の効果】以上説明したように、本願発明によれ
ば、物体の3次元の角位置を表すオイラー角のデータ
と、そのデータを用いて3次元回転行列を計算する部分
とを含む、アニメーション用のソースプログラムから、
4元数を用いてその3次元回転行列を計算する部分を含
むアニメーションプログラムを製造できる。
As described above, according to the present invention, an animation including Euler angle data representing a three-dimensional angular position of an object and a part for calculating a three-dimensional rotation matrix using the data. From the source program for
An animation program including a part for calculating the three-dimensional rotation matrix using a quaternion can be manufactured.

【0085】さらに、本願発明によれば、4元数を出力
できるモーション・キャプチャを用いて3次元回転行列
を計算するアニメーションプログラムを製造することが
できる。
Further, according to the present invention, it is possible to manufacture an animation program for calculating a three-dimensional rotation matrix using motion capture capable of outputting a quaternion.

【0086】さらに、本願発明によれば、オイラー角を
用いて3次元回転行列を計算する部分を含む、アニメー
ション用のソースプログラムあるいは4元数を用いて3
次元回転行列を計算する部分を含むアニメーション用の
ソースプログラムから、三角関数の値を比較的高速に計
算できる演算器を使用して3次元回転行列を計算するオ
ブジェクトプログラムあるいは4元数のデータに対して
加減算と乗算を用いて3次元回転行列を計算するオブジ
ェクトプログラムを切り替えて製造することができる。
Further, according to the present invention, an animation source program or a quaternion including a part for calculating a three-dimensional rotation matrix using Euler angles is used.
From an animation source program that includes a part that calculates a three-dimensional rotation matrix, to an object program that calculates a three-dimensional rotation matrix using a calculator that can calculate trigonometric function values at relatively high speed, or quaternion data It can be manufactured by switching an object program that calculates a three-dimensional rotation matrix using addition, subtraction, and multiplication.

【0087】さらに、本願発明によれば、上記の演算器
を有するコンピュータ用のアニメーションプログラムあ
るいはその演算器を有しないコンピュータ用のアニメー
ションプログラムを統一した環境で開発できる。
Further, according to the present invention, an animation program for a computer having the above-described arithmetic unit or an animation program for a computer having no such arithmetic unit can be developed in a unified environment.

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

【図1】オイラー角のデータを用いて3次元の回転行列
を計算するように制作されたソースプログラムから、そ
のデータに対応する4元数のデータを使用してその行列
を計算することができるオブジェクトプログラムを製造
する手順のフローチャート。
FIG. 1 can calculate a matrix using quaternion data corresponding to the data from a source program created to calculate a three-dimensional rotation matrix using the Euler angle data. 9 is a flowchart of a procedure for manufacturing an object program.

【図2】オイラー角を説明する図。FIG. 2 is a diagram illustrating an Euler angle.

【図3】オイラー角を用いて3次元の回転行列を計算す
るのに用いられる3つの3次元行列を説明する図。
FIG. 3 is a view for explaining three three-dimensional matrices used to calculate a three-dimensional rotation matrix using Euler angles.

【図4】(a)は、オイラー角を用いて計算する3次元
の回転行列を示す図。(b)は、オイラー角と4元数と
の関係を示す図。(c)は、4元数を用いて計算する3
次元の回転行列を示す図。
FIG. 4A is a diagram illustrating a three-dimensional rotation matrix calculated using Euler angles. (B) is a diagram showing the relationship between Euler angles and quaternions. (C) is calculated using quaternion 3
The figure which shows the rotation matrix of a dimension.

【図5】図1の手順で使用されるソースプログラムを模
式的に示す図。
FIG. 5 is a diagram schematically showing a source program used in the procedure of FIG. 1;

【図6】図1の手順で使用されるソースプログラムの具
体例を示す図。
FIG. 6 is a view showing a specific example of a source program used in the procedure of FIG. 1;

【図7】図1の手順で使用される、オイラー角を4元数
に変換する手順を示す図。
FIG. 7 is a diagram showing a procedure used to convert the Euler angle into a quaternion used in the procedure of FIG. 1;

【図8】図1の手順で使用される、4元数を用いて3次
元の回転行列を計算する手順を示す図。
FIG. 8 is a diagram illustrating a procedure for calculating a three-dimensional rotation matrix using a quaternion, which is used in the procedure of FIG. 1;

【図9】4元数を出力可能なモーション・キャプチャの
出力を用いて3次元の回転行列を計算するように制作さ
れたソースプログラムから、4元数のデータを使用して
その行列を計算することができるオブジェクトプログラ
ムを製造する手順のフローチャート。
FIG. 9 calculates a matrix using quaternion data from a source program created to calculate a three-dimensional rotation matrix using the output of a motion capture capable of outputting a quaternion. 5 is a flowchart of a procedure for manufacturing an object program that can be used.

【図10】いろいろのソースプログラムからいろいろの
ターゲットコンピュータ用のオブジェクトプログラムを
共通のコンパイラを用いて製造する手順のフローチャー
ト。
FIG. 10 is a flowchart of a procedure of manufacturing object programs for various target computers from various source programs using a common compiler.

【図11】図10の手順で使用されるソースプログラム
の具体例を示す図。
FIG. 11 is a view showing a specific example of a source program used in the procedure of FIG. 10;

【図12】図10の手順で使用されるコンパイラの処理
手順を示すフローチャート。
FIG. 12 is a flowchart showing a processing procedure of a compiler used in the procedure of FIG. 10;

【図13】図10の手順で使用される、オイラー角を用
いて3次元の回転行列を計算する手順を示す図。
FIG. 13 is a diagram showing a procedure for calculating a three-dimensional rotation matrix using Euler angles, which is used in the procedure of FIG. 10;

【図14】4元数を用いて3次元の回転行列を計算する
のに適した演算器の概略構成図。
FIG. 14 is a schematic configuration diagram of an arithmetic unit suitable for calculating a three-dimensional rotation matrix using a quaternion.

【符号の説明】 21・・・3次元回転行列の計算プログラムを含むソー
スプログラム。
[Description of Signs] 21... Source program including a calculation program for a three-dimensional rotation matrix.

Claims (20)

【特許請求の範囲】[Claims] 【請求項1】物体の3次元の角位置を表すオイラー角の
データと、そのデータを使用して3次元回転行列を計算
する部分とを含むアニメーション用のソースプログラム
からオブジェクトプログラムを製造するプログラム製造
方法であって、以下の手順をコンピュータにより実行す
るもの。上記オイラー角のデータを同じ角位置を表す4
元数のデータに変換し、 上記ソースプログラムを、上記変換により得られた4元
数のデータを使用して3次元回転行列を計算する部分を
含むオブジェクトプログラムに変換してアニメーション
プログラムを製造する。
An object program is produced from an animation source program including Euler angle data representing a three-dimensional angular position of an object and a part for calculating a three-dimensional rotation matrix using the data. A method in which the following steps are performed by a computer. The above Euler angle data represents the same angular position as 4
The data is converted into element data, and the source program is converted into an object program including a part for calculating a three-dimensional rotation matrix using the data of the quaternion obtained by the conversion to produce an animation program.
【請求項2】上記ソースプログラム中の3次元回転行列
を計算する部分は、3次元回転行列を計算するプログラ
ムルーチンを呼び出す呼び出し文を含み、 上記ソースプログラムの変換は、上記呼び出し文で呼び
出されるオブジェクトルーティンを上記オブジェクトプ
ログラムの一部として組み込むステップを含み、 上記オブジェクトルーティンは、4元数のデータに対す
る加減算と乗算とにより上記3次元回転行列を計算する
ルーティンである請求項1記載のプログラム製造方法。
2. A part for calculating a three-dimensional rotation matrix in the source program includes a call statement for calling a program routine for calculating a three-dimensional rotation matrix, and the conversion of the source program includes an object called by the call statement. The program manufacturing method according to claim 1, further comprising a step of incorporating a routine as a part of the object program, wherein the object routine is a routine for calculating the three-dimensional rotation matrix by addition, subtraction, and multiplication of quaternion data.
【請求項3】モーション・キャプチャによりモデルとす
る3次元の物体の3次元の角位置を表す4元数のデータ
をコンピュータにより取り込み、 上記の取り込みを上記物体の角位置を変えて繰り返し、 それぞれの取り込みにより得られた4元数のデータを用
いて3次元回転行列を計算する部分を含むアニメーショ
ン用のソースプログラムを、コンピュータに対するオペ
レータ操作により生成し、 4元数のデータに対する加減算と乗算とにより上記3次
元回転行列を計算する部分を含むように、上記ソースプ
ログラムを対応するオブジェクトプログラムにコンピュ
ータにより変換してアニメーションプログラムを製造す
るプログラム製造方法。
3. A computer which captures quaternion data representing a three-dimensional angular position of a three-dimensional object to be modeled by motion capture, and repeats the above capturing by changing the angular position of the object. An animation source program including a part for calculating a three-dimensional rotation matrix using the quaternion data obtained by the capture is generated by an operator operation on a computer, and the above-described quaternion data is added and subtracted and multiplied by multiplication. A program manufacturing method for manufacturing an animation program by converting the source program into a corresponding object program by a computer so as to include a part for calculating a three-dimensional rotation matrix.
【請求項4】上記ソースプログラム中の3次元回転行列
を計算する部分は、3次元回転行列を計算するプログラ
ムルーチンを呼び出す呼び出し文を含み、 上記ソースプログラムの変換は、上記呼び出し文で呼び
出されるオブジェクトルーティンを上記オブジェクトプ
ログラムの一部として組み込むステップを含み、 上記オブジェクトルーティンは、4元数のデータに対す
る加減算と乗算とにより上記3次元回転行列を計算する
ルーティンである請求項3記載のプログラム製造方法。
4. A part for calculating a three-dimensional rotation matrix in the source program includes a call statement for calling a program routine for calculating a three-dimensional rotation matrix, and the conversion of the source program includes an object called by the call statement. 4. The method according to claim 3, further comprising the step of incorporating a routine as a part of the object program, wherein the object routine is a routine for calculating the three-dimensional rotation matrix by adding, subtracting, and multiplying quaternion data.
【請求項5】物体の3次元の角位置を表すデータと、そ
のデータを使用して3次元回転行列を計算する部分とを
含むアニメーション用のソースプログラムから、使用可
能な演算器が異なる複数のコンピュータの任意の一つの
ためのオブジェクトプログラムを製造するプログラム製
造方法であって、コンピュータにより以下の二つを切り
替えて実行するもの。 (a)上記データがオイラー角のデータであるとき、上
記ソースプログラムに対応するオブジェクトプログラム
を製造する前に、上記オイラー角のデータを同じ角位置
を表す4元数のデータに変換し、 変換により得られた4元数のデータに対して加減算と乗
算を使用して3次元回転行列を計算する部分を含むオブ
ジェクトプログラムに、上記ソースプログラムを変換す
る。 (b)上記データが4元数のデータであるとき、その4
元数のデータに対して加減算と乗算を使用して3次元回
転行列を計算する部分を含むオブジェクトプログラムに
上記ソースプログラムを変換する。
5. A method according to claim 1, wherein a plurality of arithmetic units that can be used are different from an animation source program including data representing a three-dimensional angular position of the object and a part for calculating a three-dimensional rotation matrix using the data. A program manufacturing method for manufacturing an object program for any one of a computer, wherein the computer switches between the following two and executes the object program. (A) when the data is Euler angle data, convert the Euler angle data to quaternion data representing the same angular position before manufacturing an object program corresponding to the source program; The source program is converted into an object program including a part for calculating a three-dimensional rotation matrix by using addition / subtraction and multiplication on the obtained quaternion data. (B) when the data is quaternion data,
The above source program is converted into an object program including a part for calculating a three-dimensional rotation matrix by using addition and subtraction and multiplication on the data of the element number.
【請求項6】上記ソースプログラム中の3次元回転行列
を計算する部分は、3次元回転行列を計算するプログラ
ムルーチンを呼び出す呼び出し文を含み、 上記ステップ(a)または(b)で製造される上記オブ
ジェクトプログラム中の3次元回転行列を計算する部分
は、上記呼び出し文で呼び出されるオブジェクトルーテ
ィンを含み、 そのオブジェクトルーティンは、4元数のデータ対して
加減算と乗算を使用して3次元回転行列を計算するルー
ティンである請求項5記載のプログラム製造方法。
6. A part for calculating a three-dimensional rotation matrix in the source program includes a call statement for calling a program routine for calculating a three-dimensional rotation matrix, and is manufactured in the step (a) or (b). The part for calculating the three-dimensional rotation matrix in the object program includes the object routine called by the above call statement, and the object routine calculates the three-dimensional rotation matrix using addition, subtraction, and multiplication on quaternion data. The program manufacturing method according to claim 5, wherein the program is a routine for performing a program.
【請求項7】物体の3次元の角位置を表すオイラー角の
データと、そのデータを使用して3次元回転行列を計算
する部分とを含むアニメーション用のソースプログラム
から、使用可能な演算器が異なる複数のコンピュータの
任意の一つのためのオブジェクトプログラムを製造する
プログラム製造方法であって、コンピュータにより以下
の二つのステップ(a)(b)を切り替えて実行するも
の。 (a)三角関数の値を比較的高速に計算できる演算器を
使用して、上記オイラー角のデータに対する複数の三角
関数の値を計算し、さらに計算された値を使用して、3
次元回転行列を計算する部分を含むオブジェクトプログ
ラムに、上記ソースプログラムを変換する。 (b)上記ソースプログラムに対応するオブジェクトプ
ログラムを製造する前に、上記オイラー角のデータを同
じ角位置を表す4元数のデータに変換し、 変換により得られた4元数のデータに対して加減算と乗
算を使用して3次元回転行列を計算する部分を含むオブ
ジェクトプログラムに、上記ソースプログラムを変換す
る。
7. An operation unit that can be used from an animation source program including Euler angle data representing a three-dimensional angular position of an object and a part for calculating a three-dimensional rotation matrix using the data. A program manufacturing method for manufacturing an object program for any one of a plurality of different computers, wherein the following two steps (a) and (b) are switched by a computer and executed. (A) Using a calculator capable of calculating the value of the trigonometric function at a relatively high speed, calculating the values of a plurality of trigonometric functions with respect to the Euler angle data, and further using the calculated values to obtain 3
The source program is converted into an object program including a part for calculating a dimensional rotation matrix. (B) Before manufacturing the object program corresponding to the source program, the Euler angle data is converted into quaternion data representing the same angular position, and the quaternion data obtained by the conversion is converted. The source program is converted into an object program including a part for calculating a three-dimensional rotation matrix using addition and subtraction and multiplication.
【請求項8】上記ソースプログラム中の3次元回転行列
を計算する部分は、3次元回転行列を計算するプログラ
ムルーチンを呼び出す呼び出し文を含み、 上記ステップ(a)で製造される上記オブジェクトプロ
グラム中の3次元回転行列を計算する部分は、上記呼び
出し文で呼び出される第1のオブジェクトルーティンを
含み、 その第1のオブジェクトルーティンは、上記演算器を使
用して、上記オイラー角のデータに対する複数の三角関
数の値を計算し、計算された値を使用して、3次元回転
行列を計算するルーティンであり、 上記ステップ(b)で製造される上記オブジェクトプロ
グラム中の3次元回転行列を計算する部分は、上記呼び
出し文で呼び出される第2のオブジェクトルーティンを
含み、 その第2のオブジェクトルーティンは、4元数のデータ
対して加減算と乗算を使用して3次元回転行列を計算す
るルーティンである請求項7記載のプログラム製造方
法。
8. A part for calculating a three-dimensional rotation matrix in the source program includes a call statement for calling a program routine for calculating a three-dimensional rotation matrix, and a part of the object program in the object program manufactured in the step (a). The part for calculating the three-dimensional rotation matrix includes a first object routine called by the above-mentioned call statement, and the first object routine uses the arithmetic unit to generate a plurality of trigonometric functions for the Euler angle data. Is a routine for calculating a three-dimensional rotation matrix using the calculated value, and a part for calculating the three-dimensional rotation matrix in the object program manufactured in the step (b) is: A second object routine that is called by the above call statement; 8. The method according to claim 7, wherein the routine is a routine for calculating a three-dimensional rotation matrix using addition, subtraction, and multiplication on quaternion data.
【請求項9】物体の3次元の角位置を表すデータを含
み、そのデータを使用して3次元回転行列を計算する部
分を含むアニメーション用のソースプログラムから、使
用可能な演算器が異なる複数のコンピュータの任意の一
つのためのオブジェクトプログラムを製造するプログラ
ム製造方法であって、コンピュータにより以下の3つの
ステップ(a)(b)(c)を切り替えて実行するも
の。 (a)上記データがオイラー角のデータであるとき、三
角関数の値を比較的高速に計算できる演算器を使用し
て、上記オイラー角のデータに対する複数の三角関数の
値を計算し、さらに、計算された値を使用して、3次元
回転行列を計算する部分を含むオブジェクトプログラム
に、上記ソースプログラムを変換する。 (b)上記データがオイラー角のデータであるとき、上
記ソースプログラムに対応するオブジェクトプログラム
を製造する前に、上記オイラー角のデータを同じ角位置
を表す4元数のデータに変換し、 上記変換により得られた4元数のデータに対して加減算
と乗算を使用して3次元回転行列を計算する部分を含む
オブジェクトプログラムに、上記ソースプログラムを変
換する。 (c)上記データが4元数のデータであるとき、その4
元数のデータに対して加減算と乗算を使用して3次元回
転行列を計算する部分を含むオブジェクトプログラム
に、上記ソースプログラムを変換する。
9. An animation source program including data representing a three-dimensional angular position of an object and including a part for calculating a three-dimensional rotation matrix using the data, wherein a plurality of usable arithmetic units differ from each other. A program manufacturing method for manufacturing an object program for an arbitrary one of computers, wherein the computer executes the following three steps (a), (b), and (c) by switching. (A) When the data is Euler angle data, a plurality of trigonometric function values for the Euler angle data are calculated using an arithmetic unit capable of calculating the value of the trigonometric function at a relatively high speed; Using the calculated values, the source program is converted into an object program including a part for calculating a three-dimensional rotation matrix. (B) when the data is Euler angle data, convert the Euler angle data to quaternion data representing the same angular position before manufacturing an object program corresponding to the source program; The above source program is converted into an object program including a part for calculating a three-dimensional rotation matrix using addition / subtraction and multiplication with respect to the data of the quaternion obtained by the above. (C) when the data is quaternion data,
The source program is converted into an object program including a part for calculating a three-dimensional rotation matrix by using addition and subtraction and multiplication on the data of the element number.
【請求項10】上記ソースプログラム中の3次元回転行
列を計算する部分は、3次元回転行列を計算するプログ
ラムルーチンを呼び出す呼び出し文を含み、 上記ステップ(a)で製造される上記オブジェクトプロ
グラム中の3次元回転行列を計算する部分は、上記呼び
出し文で呼び出される第1のオブジェクトルーティンを
含み、 その第1のオブジェクトルーティンは、上記演算器を使
用して、上記オイラー角のデータに対する複数の三角関
数の値を計算し、計算された値を使用して、3次元回転
行列を計算するルーティンであり、 上記ステップ(b)または(c)で製造される上記オブ
ジェクトプログラム中の3次元回転行列を計算する部分
は、上記呼び出し文で呼び出される第2のオブジェクト
ルーティンを含み、 第2のオブジェクトルーティンは、4元数のデータ対し
て加減算と乗算を使用して3次元回転行列を計算するル
ーティンである請求項9記載のプログラム製造方法。
10. A part for calculating a three-dimensional rotation matrix in the source program includes a call statement for calling a program routine for calculating a three-dimensional rotation matrix, and a part of the object program manufactured in the step (a). The part for calculating the three-dimensional rotation matrix includes a first object routine called by the above-mentioned call statement, and the first object routine uses the arithmetic unit to generate a plurality of trigonometric functions for the Euler angle data. Is a routine for calculating a three-dimensional rotation matrix using the calculated value, and calculating a three-dimensional rotation matrix in the object program manufactured in the step (b) or (c). The second part includes a second object routine called by the above call statement, and a second object 10. The program manufacturing method according to claim 9, wherein the routine is a routine for calculating a three-dimensional rotation matrix by using addition, subtraction, and multiplication on quaternion data.
【請求項11】物体の3次元の角位置を表すオイラー角
のデータと、そのデータを使用して3次元回転行列を計
算する部分とを含むアニメーション用のソースプログラ
ムからオブジェクトプログラムをコンピュータにより製
造するプログラムを記録したプログラム記録媒体であっ
て、上記プログラムは、 上記オイラー角のデータを同じ角位置を表す4元数のデ
ータに変換し、 上記ソースプログラムを、得られた4元数のデータを使
用して3次元回転行列を計算する部分を含むオブジェク
トプログラムに変換してアニメーションプログラムを製
造する。
11. An object program produced by a computer from an animation source program including Euler angle data representing a three-dimensional angular position of an object and a part for calculating a three-dimensional rotation matrix using the data. A program recording medium on which a program is recorded, wherein the program converts the Euler angle data into quaternion data representing the same angular position, and uses the obtained quaternion data as the source program. Then, the program is converted into an object program including a part for calculating a three-dimensional rotation matrix to produce an animation program.
【請求項12】上記ソースプログラム中の3次元回転行
列を計算する部分は、3次元回転行列を計算するプログ
ラムルーチンを呼び出す呼び出し文を含み、 上記ソースプログラムの変換は、上記呼び出し文で呼び
出されるオブジェクトルーティンを上記オブジェクトプ
ログラムの一部として組み込むステップを含み、 上記オブジェクトルーティンは、4元数のデータに対す
る加減算と乗算とにより上記3次元回転行列を計算する
ルーティンである請求項11記載のプログラム記録媒
体。
12. A part for calculating a three-dimensional rotation matrix in the source program includes a call statement for calling a program routine for calculating a three-dimensional rotation matrix, and the conversion of the source program includes an object called by the call statement. 12. The program recording medium according to claim 11, further comprising a step of incorporating a routine as a part of the object program, wherein the object routine is a routine for calculating the three-dimensional rotation matrix by adding, subtracting, and multiplying quaternion data.
【請求項13】モーション・キャプチャによりモデルと
する3次元の物体の3次元の角位置を表す4元数のデー
タをコンピュータにより取り込み、 上記の取り込みを上記物体の角位置を変えて繰り返し、 それぞれの取り込みにより得られた4元数のデータを用
いて3次元回転行列を計算する部分を含むアニメーショ
ン用のソースプログラムを、コンピュータに対するオペ
レータ操作により生成し、 4元数のデータに対する加減算と乗算とにより上記3次
元回転行列を計算する部分を含むように、上記ソースプ
ログラムを対応するオブジェクトプログラムにコンピュ
ータにより変換してアニメーションプログラムを製造す
るプログラムを記録したプログラム記録媒体。
13. A computer which captures quaternion data representing a three-dimensional angular position of a three-dimensional object to be modeled by motion capture, and repeats the capturing by changing the angular position of the object. An animation source program including a part for calculating a three-dimensional rotation matrix using the quaternion data obtained by the capture is generated by an operator operation on a computer, and the above-described quaternion data is added and subtracted and multiplied by multiplication. A program recording medium in which a program for producing an animation program by converting the source program into a corresponding object program by a computer so as to include a part for calculating a three-dimensional rotation matrix is recorded.
【請求項14】上記ソースプログラム中の3次元回転行
列を計算する部分は、3次元回転行列を計算するプログ
ラムルーチンを呼び出す呼び出し文を含み、 上記ソースプログラムの変換は、上記呼び出し文で呼び
出されるオブジェクトルーティンを上記オブジェクトプ
ログラムの一部として組み込むステップを含み、 上記オブジェクトルーティンは、4元数のデータに対す
る加減算と乗算とにより上記3次元回転行列を計算する
ルーティンである請求項13記載のプログラム記録媒
体。
14. A part for calculating a three-dimensional rotation matrix in the source program includes a call statement for calling a program routine for calculating a three-dimensional rotation matrix, and the conversion of the source program includes an object called by the call statement. 14. The program recording medium according to claim 13, further comprising a step of incorporating a routine as a part of the object program, wherein the object routine is a routine for calculating the three-dimensional rotation matrix by adding, subtracting, and multiplying quaternion data.
【請求項15】物体の3次元の角位置を表すデータと、
そのデータを使用して3次元回転行列を計算する部分と
を含むアニメーション用のソースプログラムから使用可
能な演算器が異なる複数のコンピュータの任意の一つの
ためのオブジェクトプログラムをコンピュータにより製
造するプログラムを記録したプログラム記録媒体であっ
て、上記プログラムは、以下の二つのステップ(a)
(b)を切り替えて実行する。 (a)上記データがオイラー角のデータであるとき、上
記ソースプログラムに対応するオブジェクトプログラム
を製造する前に、上記オイラー角のデータを同じ角位置
を表す4元数のデータに変換し、 変換により得られた4元数のデータに対して加減算と乗
算を使用して3次元回転行列を計算する部分を含むオブ
ジェクトプログラムに、上記ソースプログラムを変換す
る。 (b)上記データが4元数のデータであるとき、その4
元数のデータに対して加減算と乗算を使用して3次元回
転行列を計算する部分を含むオブジェクトプログラムに
上記ソースプログラムを変換する。
15. Data representing a three-dimensional angular position of the object;
A program for producing, by a computer, an object program for any one of a plurality of computers having different usable computing units from a source program for animation including a part for calculating a three-dimensional rotation matrix using the data. In the following two steps (a):
(B) is switched and executed. (A) when the data is Euler angle data, convert the Euler angle data into quaternion data representing the same angular position before manufacturing an object program corresponding to the source program; The source program is converted into an object program including a part for calculating a three-dimensional rotation matrix by using addition / subtraction and multiplication on the obtained quaternion data. (B) when the data is quaternion data,
The above source program is converted into an object program including a part for calculating a three-dimensional rotation matrix by using addition and subtraction and multiplication on the data of the element number.
【請求項16】上記ソースプログラム中の3次元回転行
列を計算する部分は、3次元回転行列を計算するプログ
ラムルーチンを呼び出す呼び出し文を含み、 上記ステップ(a)または(b)で製造される上記オブ
ジェクトプログラム中の3次元回転行列を計算する部分
は、上記呼び出し文で呼び出されるオブジェクトルーテ
ィンを含み、 そのオブジェクトルーティンは、4元数のデータ対して
加減算と乗算を使用して3次元回転行列を計算するルー
ティンである請求項15記載のプログラム記録媒体。
16. A part for calculating a three-dimensional rotation matrix in the source program includes a call statement for calling a program routine for calculating a three-dimensional rotation matrix, wherein the part is manufactured in the step (a) or (b). The part for calculating the three-dimensional rotation matrix in the object program includes an object routine called by the above call statement, and the object routine calculates the three-dimensional rotation matrix using addition, subtraction, and multiplication on quaternion data. 16. The program recording medium according to claim 15, wherein the program recording medium is a routine for performing a program.
【請求項17】物体の3次元の角位置を表すオイラー角
のデータを含み、そのデータを使用して3次元回転行列
を計算する部分を含むアニメーション用のソースプログ
ラムから、使用可能な演算器が異なる複数のコンピュー
タの任意の一つのためのオブジェクトプログラムをコン
ピュータにより製造するプログラムを記録した記録媒体
であって、上記プログラムは、以下の二つのステップ
(a)(b)を切り替えて実行する。 (a)三角関数の値を比較的高速に計算できる演算器を
使用して、上記オイラー角のデータに対する複数の三角
関数の値を計算し、さらに、計算された値を使用して、
3次元回転行列を計算する部分を含むオブジェクトプロ
グラムに、上記ソースプログラムを変換する。 (b)上記ソースプログラムに対応するオブジェクトプ
ログラムを製造する前に、上記オイラー角のデータを同
じ角位置を表す4元数のデータに変換し、 変換により得られた4元数のデータに対して加減算と乗
算を使用して3次元回転行列を計算する部分を含むオブ
ジェクトプログラムに、上記ソースプログラムを変換す
る。
17. An operation unit which can be used from an animation source program including Euler angle data representing a three-dimensional angular position of an object and including a part for calculating a three-dimensional rotation matrix using the data. A recording medium recording a program for manufacturing an object program for any one of a plurality of different computers by a computer, wherein the program switches and executes the following two steps (a) and (b). (A) Using a calculator capable of calculating the value of the trigonometric function at a relatively high speed, calculating the values of the plurality of trigonometric functions for the data of the Euler angles, and further using the calculated values,
The above source program is converted into an object program including a part for calculating a three-dimensional rotation matrix. (B) Before manufacturing the object program corresponding to the source program, the Euler angle data is converted into quaternion data representing the same angular position, and the quaternion data obtained by the conversion is converted. The source program is converted into an object program including a part for calculating a three-dimensional rotation matrix using addition and subtraction and multiplication.
【請求項18】上記ソースプログラム中の3次元回転行
列を計算する部分は、3次元回転行列を計算するプログ
ラムルーチンを呼び出す呼び出し文を含み、 上記ステップ(a)で製造される上記オブジェクトプロ
グラム中の3次元回転行列を計算する部分は、上記呼び
出し文で呼び出される第1のオブジェクトルーティンを
含み、 その第1のオブジェクトルーティンは、上記演算器を使
用して、上記オイラー角のデータに対する複数の三角関
数の値を計算し、計算された値を使用して、3次元回転
行列を計算するルーティンであり、 上記ステップ(b)で製造される上記オブジェクトプロ
グラム中の3次元回転行列を計算する部分は、上記呼び
出し文で呼び出される第2のオブジェクトルーティンを
含み、 第2のオブジェクトルーティンは、4元数のデータ対し
て加減算と乗算を使用して3次元回転行列を計算するル
ーティンである請求項17記載のプログラム記録媒体。
18. A part for calculating a three-dimensional rotation matrix in the source program includes a call statement for calling a program routine for calculating a three-dimensional rotation matrix, and includes a call statement in the object program manufactured in the step (a). The part for calculating the three-dimensional rotation matrix includes a first object routine called by the above-mentioned call statement, and the first object routine uses the arithmetic unit to generate a plurality of trigonometric functions for the Euler angle data. Is a routine for calculating a three-dimensional rotation matrix using the calculated value, and a part for calculating the three-dimensional rotation matrix in the object program manufactured in the step (b) is: Including a second object routine called in the above call statement, the second object routine 18. The program recording medium according to claim 17, wherein the routine is a routine for calculating a three-dimensional rotation matrix using addition / subtraction and multiplication on quaternion data.
【請求項19】物体の3次元の角位置を表すデータを含
み、そのデータを使用して3次元回転行列を計算する部
分を含むアニメーション用のソースプログラムから、使
用可能な演算器が異なる複数のコンピュータの任意の一
つのためのオブジェクトプログラムをコンピュータによ
り製造するプログラムを記録したプログラム記録媒体で
あって、上記プログラムは以下の3つのステップ(a)
(b)(c)を切り替えて実行する。 (a)上記データがオイラー角のデータであるとき、オ
ブジェクトプログラムとして、三角関数の値を比較的高
速に計算できる演算器を使用して、上記オイラー角のデ
ータに対する複数の三角関数の値を計算し、さらに、計
算された値を使用して、3次元回転行列を計算する部分
を含むものに、上記ソースプログラムを変換する。 (b)上記データがオイラー角のデータであるとき、上
記ソースプログラムに対応するオブジェクトプログラム
を製造する前に、上記オイラー角のデータを同じ角位置
を表す4元数のデータに変換し、 変換により得られた4元数のデータに対して加減算と乗
算を使用して3次元回転行列を計算する部分を含むオブ
ジェクトプログラムに、上記ソースプログラムを変換す
る。 (c)上記データが4元数のデータであるとき、その4
元数のデータに対して加減算と乗算を使用して3次元回
転行列を計算する部分を含むオブジェクトプログラムに
上記ソースプログラムを変換する。
19. An animation source program including data representing a three-dimensional angular position of an object and including a part for calculating a three-dimensional rotation matrix using the data, wherein a plurality of usable arithmetic units differ from each other. A program recording medium recording a program for manufacturing an object program for any one of the computers by a computer, wherein the program includes the following three steps (a):
(B) Switch and execute (c). (A) When the data is Euler angle data, a plurality of trigonometric function values with respect to the Euler angle data are calculated using an arithmetic unit capable of calculating the trigonometric function value at a relatively high speed as an object program. Then, using the calculated values, the source program is converted into a part including a part for calculating a three-dimensional rotation matrix. (B) when the data is Euler angle data, convert the Euler angle data into quaternion data representing the same angular position before manufacturing an object program corresponding to the source program; The source program is converted into an object program including a part for calculating a three-dimensional rotation matrix by using addition / subtraction and multiplication on the obtained quaternion data. (C) when the data is quaternion data,
The above source program is converted into an object program including a part for calculating a three-dimensional rotation matrix by using addition and subtraction and multiplication on the data of the element number.
【請求項20】上記ソースプログラム中の3次元回転行
列を計算する部分は、3次元回転行列を計算するプログ
ラムルーチンを呼び出す呼び出し文を含み、 上記ステップ(a)で製造される上記オブジェクトプロ
グラム中の3次元回転行列を計算する部分は、上記呼び
出し文で呼び出される第1のオブジェクトルーティンを
含み、 その第1のオブジェクトルーティンは、上記演算器を使
用して、上記オイラー角のデータに対する複数の三角関
数の値を計算し、計算された値を使用して、3次元回転
行列を計算するルーティンであり、 上記ステップ(b)または(c)で製造される上記オブ
ジェクトプログラム中の3次元回転行列を計算する部分
は、上記呼び出し文で呼び出される第2のオブジェクト
ルーティンを含み、 その第2のオブジェクトルーティンは、4元数のデータ
対して加減算と乗算を使用して3次元回転行列を計算す
るルーティンである請求項19記載のプログラム記録媒
体。
20. A part for calculating a three-dimensional rotation matrix in the source program includes a call statement for calling a program routine for calculating a three-dimensional rotation matrix, and a part of the object program manufactured in the step (a) includes: The part for calculating the three-dimensional rotation matrix includes a first object routine called by the above-mentioned call statement, and the first object routine uses the arithmetic unit to generate a plurality of trigonometric functions for the Euler angle data. Is a routine for calculating a three-dimensional rotation matrix using the calculated value, and calculating a three-dimensional rotation matrix in the object program manufactured in the step (b) or (c). The second object routine includes a second object routine called by the above call statement, and the second object routine 20. The program recording medium according to claim 19, wherein the ctroutine is a routine for calculating a three-dimensional rotation matrix using addition, subtraction, and multiplication on quaternion data.
JP10010080A 1998-01-22 1998-01-22 Production of program and program recording medium Pending JPH11213175A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10010080A JPH11213175A (en) 1998-01-22 1998-01-22 Production of program and program recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10010080A JPH11213175A (en) 1998-01-22 1998-01-22 Production of program and program recording medium

Publications (1)

Publication Number Publication Date
JPH11213175A true JPH11213175A (en) 1999-08-06

Family

ID=11740381

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10010080A Pending JPH11213175A (en) 1998-01-22 1998-01-22 Production of program and program recording medium

Country Status (1)

Country Link
JP (1) JPH11213175A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100437643C (en) * 2006-09-08 2008-11-26 中国科学院计算技术研究所 Method for correcting noises and errors in human sports trapped data
JP2011529233A (en) * 2008-07-25 2011-12-01 マイクロソフト コーポレーション Touch interaction using curved display
JP2014071793A (en) * 2012-10-01 2014-04-21 Copcom Co Ltd Method for deforming three-dimensional model

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100437643C (en) * 2006-09-08 2008-11-26 中国科学院计算技术研究所 Method for correcting noises and errors in human sports trapped data
JP2011529233A (en) * 2008-07-25 2011-12-01 マイクロソフト コーポレーション Touch interaction using curved display
JP2014071793A (en) * 2012-10-01 2014-04-21 Copcom Co Ltd Method for deforming three-dimensional model

Similar Documents

Publication Publication Date Title
JP6821002B2 (en) Processing equipment and processing method
Howell et al. SimJava: A discrete event simulation library for java
JP3777830B2 (en) Computer program generation apparatus and computer program generation method
US4635292A (en) Image processor
JP5748935B2 (en) Programmable data processing circuit supporting SIMD instructions
CN111310904A (en) Apparatus and method for performing convolutional neural network training
JP2005531848A (en) Reconfigurable streaming vector processor
KR20090024178A (en) Fast reconfiguration of graphics pipeline state
JPH02289097A (en) Method and equipment for processing image display data
Gealow et al. System design for pixel-parallel image processing
US5724608A (en) Medical image system using dual address generators to allow CPU accessed three-dimensional body image data in accordance with one-dimensional storage address in dual memories simultaneously
US5936627A (en) Method and system for performing perspective divide operations on three-dimensional graphical object data within a computer system
JPH11213175A (en) Production of program and program recording medium
CA2349600C (en) Three-dimensional skeleton data error absorbing apparatus
JP5248482B2 (en) Programmable data processing circuit
US6631457B1 (en) Surface computer and computing method using the same
US5740070A (en) Apparatus for automatically generating logic circuit
Schimmler et al. Instruction systolic array in image processing applications
JP3505338B2 (en) Numerical analysis device, numerical analysis method, and integrated circuit
Benbelkacem et al. Mvc-3d: Adaptive design pattern for virtual and augmented reality systems
JPH06309349A (en) Program-controlled processor
JP3583443B2 (en) Arithmetic device and arithmetic method
Hou et al. DECOMPOSER: a synthesizer for systolic systems
JP3137094B2 (en) Simulation method, simulation device, and recording medium therefor
Parker Systems Aspects of Visualization Applications