JP2800435B2 - Method and apparatus for rotating figures in three-dimensional computer graphics - Google Patents

Method and apparatus for rotating figures in three-dimensional computer graphics

Info

Publication number
JP2800435B2
JP2800435B2 JP3031721A JP3172191A JP2800435B2 JP 2800435 B2 JP2800435 B2 JP 2800435B2 JP 3031721 A JP3031721 A JP 3031721A JP 3172191 A JP3172191 A JP 3172191A JP 2800435 B2 JP2800435 B2 JP 2800435B2
Authority
JP
Japan
Prior art keywords
rotating
computer graphics
rotation
coordinate
graphic
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP3031721A
Other languages
Japanese (ja)
Other versions
JPH04245388A (en
Inventor
充 高橋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Daikin Industries Ltd
Original Assignee
Daikin Industries 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 Daikin Industries Ltd filed Critical Daikin Industries Ltd
Priority to JP3031721A priority Critical patent/JP2800435B2/en
Publication of JPH04245388A publication Critical patent/JPH04245388A/en
Application granted granted Critical
Publication of JP2800435B2 publication Critical patent/JP2800435B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、3次元CAD装置等に
用いられるコンピュータグラフィックスにおける図形の
回転方法及びその装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method and apparatus for rotating figures in computer graphics used in a three-dimensional CAD apparatus or the like.

【0002】[0002]

【従来の技術】従来、3次元コンピュータグラフィック
スによる建築物等の図形のディスプレイ等の出力手段上
への表示においては、建築物等の高さ方向がY軸方向と
一致している場合が多い。また、表示される図形を回転
表示させるために、図形の座標データをX,Y,Z軸の
回りにマトリクス演算により変換することが知られてい
る。この場合、従来では、演算の内部処理はX,Y,Z
軸の順番に実行されていた。
2. Description of the Related Art Conventionally, in displaying graphics of a building or the like by three-dimensional computer graphics on output means such as a display, the height direction of the building or the like often coincides with the Y-axis direction. . It is also known that coordinate data of a graphic is converted by matrix operation around X, Y, and Z axes in order to rotate and display the graphic to be displayed. In this case, conventionally, the internal processing of the operation is X, Y, Z
The axes were executed in order.

【0003】[0003]

【発明が解決しようとする課題】ところが、上述したよ
うな順番でのマトリクス演算では、複雑な回転操作を行
った場合、出力手段に表示される建築図等の図形は高さ
方向が傾いてしまい、不都合が生じることがあり、操作
のしにくいものとなっていた。本発明は上記問題点を解
決するもので、マトリクス演算の順番を変更すること
で、複雑な回転操作を行った場合でも図形の高さ方向が
傾くといったことがなく、操作の容易な3次元コンピュ
ータグラフィックスにおける図形の回転方法及びその装
置を提供することを目的とする。
However, in the matrix operation in the above-described order, when a complicated rotation operation is performed, the graphic such as an architectural drawing displayed on the output means is inclined in the height direction. In some cases, inconveniences may occur, making operation difficult. SUMMARY OF THE INVENTION The present invention solves the above-described problem. By changing the order of matrix operations, a three-dimensional computer that is easy to operate does not tilt in the height direction of a figure even when a complicated rotation operation is performed. An object of the present invention is to provide a method and an apparatus for rotating a graphic in graphics.

【0004】[0004]

【課題を解決するための手段】上記目的を達成するため
に請求項1記載の発明は、図形の座標情報を3次元空間
座標系で表現し、図形の座標をマトリクス演算により回
転変換する3次元コンピュータグラフィックスにおける
図形の回転方法において、X,Y,Z軸回りの回転変換
指示が入力されたとき、マトリクス演算による回転変換
をY,X,Z軸の順番に実行するようにしたものであ
る。請求項2記載の発明は、図形の座標情報を3次元空
間座標系で表現した図形データを記憶した記憶手段と、
図形をX,Y,Z軸の回りに回転させるための情報を入
力する入力手段と、前記入力手段により入力された情報
に基づいてマトリクス演算により図形の座標変換を行う
演算手段と、前記演算手段で処理された図形データを表
示する出力手段を備えた3次元コンピュータグラフィッ
クスにおける図形の回転装置において、前記演算手段は
マトリクス演算による図形の座標変換をY,X,Z軸の
順番に実行するようにしたものである。
According to a first aspect of the present invention, there is provided a three-dimensional coordinate system in which coordinate information of a graphic is represented by a three-dimensional spatial coordinate system, and the coordinate of the graphic is rotationally transformed by a matrix operation. In the method of rotating graphics in computer graphics, when a rotation conversion instruction about X, Y, and Z axes is input, rotation conversion by matrix operation is performed in the order of Y, X, and Z axes. . According to a second aspect of the present invention, there is provided storage means for storing graphic data representing coordinate information of a graphic in a three-dimensional space coordinate system;
Input means for inputting information for rotating the graphic around the X, Y, and Z axes; calculating means for performing coordinate conversion of the graphic by matrix calculation based on the information input by the input means; In the apparatus for rotating figures in three-dimensional computer graphics provided with output means for displaying the figure data processed in step (a), the arithmetic means executes coordinate transformation of the figures by matrix operation in the order of Y, X and Z axes. It was made.

【0005】[0005]

【作用】本発明の方法乃至装置によれば、X,Y,Z軸
に対して回転変換する指示が入力されると、3次元空間
座標系で表現された図形の座標情報は、Y,X,Z軸の
順番にマトリクス演算による座標変換が行われる。その
結果、図形が物体であると、Y軸回転は必ず物体の高さ
方向の軸の回りに回転されることになる。
According to the method or the apparatus of the present invention, when an instruction for rotationally transforming the X, Y, and Z axes is input, the coordinate information of the figure represented in the three-dimensional space coordinate system is represented by Y, X , And Z-axis coordinate conversion by matrix operation. As a result, if the figure is an object, the Y-axis rotation is necessarily rotated about an axis in the height direction of the object.

【0006】[0006]

【実施例】以下、本発明の実施例について図面を用いて
説明する。図1は、本発明の方法乃至装置の実施例であ
る3次元CADシステムのブロック構成図である。同図
において、CADシステムは、建築図のファイル等を記
憶したハードディスク1と、建築図上の座標位置等を入
力するキーボード2(入力手段)およびダイヤル・ジョ
イスティック等のバリュエータ3(入力手段)と、入力
された座標データや変位量を取り込んで建築図の図形デ
ータを演算し編集処理するCAD本体4と、このCAD
本体4で処理された図形データを表示するディスプレイ
5(出力手段)と、前記図形データを記録紙上に建築図
として出力するプロッタ6(出力手段)から構成されて
いる。CAD本体4は、入力装置および装置全体を制御
するCPU7と、CADプログラムを格納するROM8
と、建築図データを編集する作業領域となるRAM9
と、CAD本体4と上記入出力装置間でデータ等を受け
渡すインタフェース10から構成されている。
Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram of a three-dimensional CAD system which is an embodiment of a method or apparatus according to the present invention. In the figure, a CAD system includes a hard disk 1 storing architectural drawing files and the like, a keyboard 2 (input means) for inputting a coordinate position and the like on the architectural drawing, and a valuator 3 (input means) such as a dial joystick; A CAD body 4 for taking in the input coordinate data and displacement and calculating and editing graphic data of the architectural drawing;
A display 5 (output means) for displaying graphic data processed by the main body 4 and a plotter 6 (output means) for outputting the graphic data as architectural drawings on recording paper. The CAD body 4 includes a CPU 7 for controlling an input device and the entire device, and a ROM 8 for storing a CAD program.
And a RAM 9 serving as a work area for editing architectural drawing data
And an interface 10 for transferring data and the like between the CAD body 4 and the input / output device.

【0007】図2は3次元コンピュータグラフィックス
による空間内の回転操作のしくみを示し、(a),
(b),(c)はそれぞれX,Y,Z各軸に回転させた
場合の回転態様を示している。回転量の入力は、バリュ
エータ3により行う。本実施例においては、ダイヤルの
,,がそれぞれX,Y,Zの軸回りの回転量に対
応するものとしている。
FIG. 2 shows a mechanism of a rotation operation in a space by three-dimensional computer graphics.
(B) and (c) show the rotation mode when rotated about each of the X, Y, and Z axes. The input of the rotation amount is performed by the valuator 3. In the present embodiment,, and of the dial correspond to the amounts of rotation about the X, Y, and Z axes, respectively.

【0008】図3は、図形の回転操作を指示したときの
CAD本体4で行われる処理動作を示すフローチャート
である。まず、バリュエータ,,を初期化し(バ
リュエータ値を0とする)(ステップ1、以下S1と記
す)、バリュエータ,,を使用可能にし(S
2)、バリュエータ入力があったかどうかを調べる(S
3)。入力があったとき、X,Y,Zの軸回りの回転量
が、ダイアルの,,の変位量に基づいて設定され
る(S4)。続いて、変換マトリクスを次式により求め
る(S5)。M´=〔Yrot〕〔M〕〔Xrot〕
〔Zrot〕次に、求めた変換マトリクスM´を用いて
次式のマトリクス変換を行い、変換後の図形データに基
づく図形をディスプレイ5に表示する(S6)。
FIG. 3 is a flowchart showing a processing operation performed by the CAD main unit 4 when a rotation operation of a figure is instructed. First, the valuators, are initialized (the valuator value is set to 0) (step 1, hereinafter referred to as S1), and the valuators, are enabled (S1).
2) Check whether there is a valuator input (S)
3). When there is an input, the amount of rotation about the X, Y, and Z axes is set based on the amount of displacement of the dial, and (S4). Subsequently, a conversion matrix is obtained by the following equation (S5). M '= [Yrot] [M] [Xrot]
[Zrot] Next, using the obtained conversion matrix M ', the following matrix conversion is performed, and a graphic based on the converted graphic data is displayed on the display 5 (S6).

【0009】ここに、X軸回転マトリクス〔Xro
t〕、Y軸回転マトリクス〔Yrot〕、Z軸回転マト
リクス〔Zrot〕はそれぞれ、 〔Xrot〕= 1 0 0 0 0 cosθ sinθ 0 0 −sinθ cosθ 0 0 0 0 1 〔Yrot〕= cosθ 0 −sinθ 0 0 1 0 0 sinθ 0 cosθ 0 0 0 0 1 〔Zrot〕= cosθ sinθ 0 0 −sinθ cosθ 0 0 0 0 1 0 0 0 0 1 で表される。なお、上記で右辺の行列式の〔 〕は省略
している。
Here, an X-axis rotation matrix [Xro
t], the Y-axis rotation matrix [Yrot], and the Z-axis rotation matrix [Zrot] are respectively [Xrot] = 1000 cos θ sin θ 00-sin θ cos θ 00 00 01 [Yrot] = cos θ 0-sin θ 0 1 0 0 0 sin θ 0 cos θ 0 0 0 0 1 [Zrot] = cos θ sin θ 0 0 -sin θ cos θ 0 0 0 0 0 0 0 0 0 0 1 In the above description, [] in the determinant on the right side is omitted.

【0010】また、平行移動を含めたときの座標変換は
次式で表される。 〔x´,y´,z´,1〕=〔X,Y,Z,1〕〔M´〕 ただし、回転の軸中心が原点でない場合は次式となる。 〔x´,y´,z´,1〕=〔X,Y,Z,1〕〔−T〕〔M´〕〔T〕 ここに、〔T〕= 1 0 0 0 0 1 0 0 0 0 0 0 Px Py Pz 1 とする。なお、Px,Py,Pzは回転の軸中心であ
る。
The coordinate transformation including the translation is expressed by the following equation. [X ', y', z ', 1] = [X, Y, Z, 1] [M'] However, when the axis of rotation is not the origin, the following equation is obtained. [X ', y', z ', 1] = [X, Y, Z, 1] [-T] [M'] [T] where [T] = 1 0 0 0 0 0 0 0 0 0 0 It is assumed that 00 Px Py Pz 1. Note that Px, Py, and Pz are axes of rotation.

【0011】いま、ここで本発明の方法を従来の方法と
対比して説明する。図5は、従来の回転方法による座標
変換を示し、座標変換のマトリクス演算式は、 M´=〔M〕〔Xrot〕〔Yrot〕〔Zrot〕と
表される。 同図に示されるように、従来では、X回転、Y回転の順
に回転処理しているので、画面に表示される物体の高さ
方向の軸が傾いてしまう。図4は、本発明による回転方
法による座標変換を示し、座標変換のマトリクス演算式
は、 M´=〔Yrot〕〔M〕〔Xrot〕〔Zrot〕と
表される。 同図に示されるように、本発明方法では、X回転、Y回
転の順で操作を行っても、内部処理として先にY回転を
行っているので、Y軸回転は必ず物体固有のY軸(高さ
方向の軸)の回りに回転し、X軸回転は必ず物体の水平
軸について回転することになる。
Now, the method of the present invention will be described in comparison with a conventional method. FIG. 5 shows a coordinate transformation by a conventional rotation method, and a matrix operation expression of the coordinate transformation is represented by M '= [M] [Xrot] [Yrot] [Zrot]. As shown in the figure, in the related art, since the rotation process is performed in the order of X rotation and Y rotation, the axis of the object displayed on the screen in the height direction is inclined. FIG. 4 shows the coordinate transformation by the rotation method according to the present invention, and the matrix operation formula of the coordinate transformation is represented by M '= [Yrot] [M] [Xrot] [Zrot]. As shown in the figure, in the method of the present invention, even if the operation is performed in the order of X rotation and Y rotation, the Y rotation is performed first as internal processing, so the Y axis rotation is always the Y axis unique to the object. (The axis in the height direction), and the X-axis rotation always rotates about the horizontal axis of the object.

【0012】[0012]

【発明の効果】以上のように本発明によれば、図形を
X,Y,Z各軸の回りに回転させる時に、座標変換のマ
トリクス演算をY,X,Zの順番に行うことで、Y軸回
転は必ず図形(物体)の高さ方向の軸について回転し、
X軸回転は必ず図形(物体)の水平軸について回転する
ことになり、複雑な回転を行っても高さ方向の軸が傾く
ようなことがなく、操作が容易なものとなる。
As described above, according to the present invention, when a figure is rotated around each of the X, Y, and Z axes, the matrix operation for coordinate conversion is performed in the order of Y, X, and Z, thereby providing Y. The axis rotation always rotates about the axis in the height direction of the figure (object).
The X-axis rotation always rotates about the horizontal axis of the figure (object), so that even if complicated rotation is performed, the axis in the height direction does not tilt, and the operation is easy.

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

【図1】 本発明が実施される3次元CADシステムの
ブロック構成図である。
FIG. 1 is a block diagram of a three-dimensional CAD system in which the present invention is implemented.

【図2】 (a),(b),(c)はX,Y,Z各軸に
図形を回転させた場合の概念図である。
FIGS. 2A, 2B, and 2C are conceptual diagrams when a figure is rotated around X, Y, and Z axes.

【図3】 本発明による処理動作を示すフローチャート
である。
FIG. 3 is a flowchart showing a processing operation according to the present invention.

【図4】 本発明による回転方法による座標変換を示す
図である。
FIG. 4 is a diagram showing coordinate transformation by a rotation method according to the present invention.

【図5】 従来の回転方法による座標変換を示す図であ
る。
FIG. 5 is a diagram showing coordinate conversion by a conventional rotation method.

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

3 バリュエータ 4 CAD本体 5 ディスプレイ 3 Valuator 4 CAD body 5 Display

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 図形の座標情報を3次元空間座標系で表
現し、図形の座標をマトリクス演算により回転変換する
3次元コンピュータグラフィックスにおける図形の回転
方法において、X,Y,Z軸回りの回転変換指示が入力
されたとき、マトリクス演算による回転変換をY,X,
Z軸の順番に実行することを特徴とした3次元コンピュ
ータグラフィックスにおける図形の回転方法。
1. A method of rotating a figure in three-dimensional computer graphics in which coordinate information of the figure is expressed in a three-dimensional space coordinate system and the coordinates of the figure are rotationally converted by a matrix operation, the method comprising: When a conversion instruction is input, rotation conversion by matrix operation is performed by Y, X,
A method of rotating a figure in three-dimensional computer graphics, the method being performed in the order of the Z axis.
【請求項2】 図形の座標情報を3次元空間座標系で表
現した図形データを記憶した記憶手段と、図形をX,
Y,Z軸の回りに回転させるための情報を入力する入力
手段と、前記入力手段により入力された情報に基づいて
マトリクス演算により図形の座標変換を行う演算手段
と、前記演算手段で処理された図形データを表示する出
力手段を備えた3次元コンピュータグラフィックスにお
ける図形の回転装置において、前記演算手段はマトリク
ス演算による図形の座標変換をY,X,Z軸の順番に実
行することを特徴とした3次元コンピュータグラフィッ
クスにおける図形の回転装置。
2. A storage means for storing graphic data expressing coordinate information of a graphic in a three-dimensional space coordinate system, and storing the graphic in X,
Input means for inputting information for rotating about the Y and Z axes, calculating means for performing coordinate conversion of a figure by matrix calculation based on the information input by the input means, and processing by the calculating means In the apparatus for rotating figures in three-dimensional computer graphics provided with output means for displaying figure data, the calculating means executes coordinate transformation of the figures by matrix operation in the order of Y, X and Z axes. A device for rotating figures in three-dimensional computer graphics.
JP3031721A 1991-01-30 1991-01-30 Method and apparatus for rotating figures in three-dimensional computer graphics Expired - Lifetime JP2800435B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3031721A JP2800435B2 (en) 1991-01-30 1991-01-30 Method and apparatus for rotating figures in three-dimensional computer graphics

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3031721A JP2800435B2 (en) 1991-01-30 1991-01-30 Method and apparatus for rotating figures in three-dimensional computer graphics

Publications (2)

Publication Number Publication Date
JPH04245388A JPH04245388A (en) 1992-09-01
JP2800435B2 true JP2800435B2 (en) 1998-09-21

Family

ID=12338912

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3031721A Expired - Lifetime JP2800435B2 (en) 1991-01-30 1991-01-30 Method and apparatus for rotating figures in three-dimensional computer graphics

Country Status (1)

Country Link
JP (1) JP2800435B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11016583B2 (en) 2017-02-06 2021-05-25 Hewlett-Packard Development Company, L.P. Digital pen to adjust a 3D object

Also Published As

Publication number Publication date
JPH04245388A (en) 1992-09-01

Similar Documents

Publication Publication Date Title
US6542168B2 (en) Three-dimensional window displaying apparatus and method thereof
JPH0327949B2 (en)
JPH05342310A (en) Method and device for three-dimensional conversion of linear element data
JP2800435B2 (en) Method and apparatus for rotating figures in three-dimensional computer graphics
JP3599198B2 (en) Figure editing device
JP3522505B2 (en) Window display
WO2006106829A1 (en) Structured grid data visualization method and program
JP3138887B2 (en) How to display the constraint conditions of a structure model
JPH04137108A (en) Offline teaching method for robot
JP3520118B2 (en) Projection diagram creation device
JPH05101150A (en) Analytic result data display system
JPH0950358A (en) Document processor and document editing method
JP2924750B2 (en) Three-dimensional shape modeling method and apparatus
JP3486644B2 (en) Moving object motion data processing method, and motion data processing apparatus and storage medium therefor
JP2737126B2 (en) Method for creating cross-sectional image data of an object
JP3147391B2 (en) Method and apparatus for setting curved surface in three-dimensional boundary fitting mesh division
JP3156297B2 (en) Pattern output device
JPS6340967A (en) Plane input device
JPH06243266A (en) Perspective drawing generating device
JPH07134781A (en) Method for directing the rotation of three-dimensional object
JP3470974B2 (en) Figure creation method and apparatus
JP3254328B2 (en) Ellipse data processing device
JPH07200875A (en) Display position changing method for three-dimensional model
JP3225634B2 (en) How to create display screen display data
JPS6121698Y2 (en)

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 19980609

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

Free format text: PAYMENT UNTIL: 20080710

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20090710

Year of fee payment: 11

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

Free format text: PAYMENT UNTIL: 20100710

Year of fee payment: 12