JPH04245388A - Method and device for rotating graphics in three-dimensional computer graphics - Google Patents

Method and device for rotating graphics in three-dimensional computer graphics

Info

Publication number
JPH04245388A
JPH04245388A JP3031721A JP3172191A JPH04245388A JP H04245388 A JPH04245388 A JP H04245388A JP 3031721 A JP3031721 A JP 3031721A JP 3172191 A JP3172191 A JP 3172191A JP H04245388 A JPH04245388 A JP H04245388A
Authority
JP
Japan
Prior art keywords
graphics
rotation
axis
axes
input
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.)
Granted
Application number
JP3031721A
Other languages
Japanese (ja)
Other versions
JP2800435B2 (en
Inventor
Mitsuru Takahashi
充 高橋
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

Landscapes

  • Controls And Circuits For Display Device (AREA)
  • Processing Or Creating Images (AREA)
  • Image Processing (AREA)
  • Image Generation (AREA)

Abstract

PURPOSE:To offer a method and device for rotating a graphic in three- dimensional computer graphics whose operation is easy by eliminating the slanting of the height direction of the graphics even when complicate rotating operation is performed by varying the order of matrix arithmetic. CONSTITUTION:When a valuator 3 input an instruction for rotational conversion of an X, a Y, and a Z axis to a CAD main body 4, coordinate information on the graphics represented by a three-dimensional space coordinate system is converted by the matrix arithmetic in the order of the Y, Z and Z axes. Consequently, when the graphics is a solid, the graphics is rotated on the axis of the height direction of the body as the Y-axis rotation and the figure is displayed on a display 5.

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 three-dimensional CAD systems and the like.

【0002】0002

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

【0003】0003

【発明が解決しようとする課題】ところが、上述したよ
うな順番でのマトリクス演算では、複雑な回転操作を行
った場合、出力手段に表示される建築図等の図形は高さ
方向が傾いてしまい、不都合が生じることがあり、操作
のしにくいものとなっていた。本発明は上記問題点を解
決するもので、マトリクス演算の順番を変更することで
、複雑な回転操作を行った場合でも図形の高さ方向が傾
くといったことがなく、操作の容易な3次元コンピュー
タグラフィックスにおける図形の回転方法及びその装置
を提供することを目的とする。
[Problem to be Solved by the Invention] However, when performing matrix calculations in the order described above, when complex rotation operations are performed, the height direction of figures such as architectural drawings displayed on the output means is tilted. This may cause some inconvenience and is difficult to operate. The present invention solves the above problems, and by changing the order of matrix calculations, the height direction of the figure does not tilt even when complex rotation operations are performed, and the 3D computer can be easily operated. An object of the present invention is to provide a method and device for rotating figures in graphics.

【0004】0004

【課題を解決するための手段】上記目的を達成するため
に請求項1記載の発明は、図形の座標情報を3次元空間
座標系で表現し、図形の座標をマトリクス演算により回
転変換する3次元コンピュータグラフィックスにおける
図形の回転方法において、X,Y,Z軸回りの回転変換
指示が入力されたとき、マトリクス演算による回転変換
をY,X,Z軸の順番に実行するようにしたものである
。請求項2記載の発明は、図形の座標情報を3次元空間
座標系で表現した図形データを記憶した記憶手段と、図
形をX,Y,Z軸の回りに回転させるための情報を入力
する入力手段と、前記入力手段により入力された情報に
基づいてマトリクス演算により図形の座標変換を行う演
算手段と、前記演算手段で処理された図形データを表示
する出力手段を備えた3次元コンピュータグラフィック
スにおける図形の回転装置において、前記演算手段はマ
トリクス演算による図形の座標変換をY,X,Z軸の順
番に実行するようにしたものである。
[Means for Solving the Problem] In order to achieve the above object, the invention according to claim 1 is a three-dimensional system that expresses the coordinate information of a figure in a three-dimensional spatial coordinate system, and rotationally transforms the coordinates of the figure by matrix calculation. In a method for rotating figures in computer graphics, when a rotation conversion instruction about the X, Y, and Z axes is input, rotation conversion by matrix calculation is executed in the order of the Y, X, and Z axes. . The invention as claimed in claim 2 provides a storage means storing figure data representing the coordinate information of the figure in a three-dimensional spatial coordinate system, and an input for inputting information for rotating the figure around the X, Y, and Z axes. in three-dimensional computer graphics, comprising: means for converting the coordinates of a figure by a matrix operation based on information input by the input means; and an output means for displaying the figure data processed by the operation means. In the figure rotation device, the calculation means executes coordinate transformation of the figure by matrix calculation in the order of Y, X, and Z axes.

【0005】[0005]

【作用】本発明の方法乃至装置によれば、X,Y,Z軸
に対して回転変換する指示が入力されると、3次元空間
座標系で表現された図形の座標情報は、Y,X,Z軸の
順番にマトリクス演算による座標変換が行われる。その
結果、図形が物体であると、Y軸回転は必ず物体の高さ
方向の軸の回りに回転されることになる。
[Operation] According to the method or apparatus of the present invention, when an instruction for rotational transformation with respect to the X, Y, and Z axes is input, the coordinate information of a figure expressed in a three-dimensional spatial coordinate system is , Z-axis, coordinate transformation is performed by matrix calculation. As a result, if the figure is an object, the Y-axis rotation will always be about the 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 Hereinafter, embodiments of the present invention will be described with reference to the drawings. FIG. 1 is a block diagram of a three-dimensional CAD system that is an embodiment of the method and apparatus of the present invention. In the figure, the CAD system includes a hard disk 1 that stores architectural drawing files, etc., a keyboard 2 (input means) for inputting coordinate positions on the architectural drawing, and a valuator 3 (input means) such as a dial and joystick. A CAD main body 4 that imports input coordinate data and displacement amounts, calculates and edits geometric data of architectural drawings, and this CAD
It consists of a display 5 (output means) for displaying the graphic data processed by the main body 4, and a plotter 6 (output means) for outputting the graphic data on recording paper as an architectural drawing. The CAD main body 4 includes a CPU 7 that controls the input device and the entire device, and a ROM 8 that stores the CAD program.
, a RAM 9 serving as a work area for editing architectural drawing data, and an interface 10 for transferring data etc. between the CAD main body 4 and the input/output device.

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

【0008】図3は、図形の回転操作を指示したときの
CAD本体4で行われる処理動作を示すフローチャート
である。まず、バリュエータ■,■,■を初期化し(バ
リュエータ値を0とする)(ステップ1、以下S1と記
す)、バリュエータ■,■,■を使用可能にし(S2)
、バリュエータ入力があったかどうかを調べる(S3)
。入力があったとき、X,Y,Zの軸回りの回転量が、
ダイアルの■,■,■の変位量に基づいて設定される(
S4)。続いて、変換マトリクスを次式により求める(
S5)。M´=〔Yrot〕〔M〕〔Xrot〕〔Zr
ot〕次に、求めた変換マトリクスM´を用いて次式の
マトリクス変換を行い、変換後の図形データに基づく図
形をディスプレイ5に表示する(S6)。
FIG. 3 is a flowchart showing the processing operations performed in the CAD main body 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 made usable (S2).
, check whether there is a valuator input (S3)
. When there is an input, the amount of rotation around the X, Y, and Z axes is
Set based on the amount of displacement of ■, ■, ■ on the dial (
S4). Next, find the conversion matrix using the following formula (
S5). M'=[Yrot][M][Xrot][Zr
ot] Next, using the obtained conversion matrix M', matrix conversion is performed using the following equation, and a figure based on the converted figure data is displayed on the display 5 (S6).

【0009】ここに、X軸回転マトリクス〔Xrot〕
、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〕=    co
sθ  sinθ    0        0   
               −sinθ  cos
θ    0        0          
            0        0   
     1        0          
            0        0   
     0        1で表される。なお、上
記で右辺の行列式の〔  〕は省略している。
Here, the X-axis rotation matrix [Xrot]
, Y-axis rotation matrix [Yrot], and Z-axis rotation matrix [Zrot], respectively, [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] = co
sθ sinθ 0 0
−sin θ cos
θ 0 0
0 0
1 0
0 0
It is expressed as 0 1. Note that in the above, the [ ] 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                      P
x      Py      Pz      1 
 とする。なお、Px,Py,Pzは回転の軸中心であ
る。
[0010] Furthermore, coordinate transformation including parallel movement is expressed by the following equation. [x', y', z', 1] = [X, Y, Z, 1] [
M'] However, if the center of the axis of rotation is not the origin, the following equation is obtained. [x', y', z', 1] = [X, Y, Z, 1] [
-T] [M'] [T] Here, [T] = 1
0 0
0 0
1 0
0 0
0 0
0P
x Py Pz 1
shall be. Note that Px, Py, and Pz are the centers of rotational axes.

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

【0012】0012

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

【図面の簡単な説明】[Brief explanation of the drawing]

【図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各軸
に図形を回転させた場合の概念図である。
FIG. 2 (a), (b), and (c) are conceptual diagrams when a figure is rotated around each of the X, Y, and Z axes.

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

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

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

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

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

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】  図形の座標情報を3次元空間座標系で
表現し、図形の座標をマトリクス演算により回転変換す
る3次元コンピュータグラフィックスにおける図形の回
転方法において、X,Y,Z軸回りの回転変換指示が入
力されたとき、マトリクス演算による回転変換をY,X
,Z軸の順番に実行することを特徴とした3次元コンピ
ュータグラフィックスにおける図形の回転方法。
Claim 1: In a method of rotating a figure in three-dimensional computer graphics, in which the coordinate information of a figure is expressed in a three-dimensional spatial coordinate system, and the coordinates of the figure are rotationally transformed by matrix calculations, rotation around the X, Y, and Z axes is performed. When a conversion instruction is input, rotation conversion by matrix calculation is performed by Y,X
, a method for rotating figures in three-dimensional computer graphics, which is performed in the order of the Z-axis.
【請求項2】  図形の座標情報を3次元空間座標系で
表現した図形データを記憶した記憶手段と、図形をX,
Y,Z軸の回りに回転させるための情報を入力する入力
手段と、前記入力手段により入力された情報に基づいて
マトリクス演算により図形の座標変換を行う演算手段と
、前記演算手段で処理された図形データを表示する出力
手段を備えた3次元コンピュータグラフィックスにおけ
る図形の回転装置において、前記演算手段はマトリクス
演算による図形の座標変換をY,X,Z軸の順番に実行
することを特徴とした3次元コンピュータグラフィック
スにおける図形の回転装置。
2. A storage means storing figure data representing the coordinate information of the figure in a three-dimensional spatial coordinate system;
an input means for inputting information for rotation around the Y and Z axes; a calculation means for performing coordinate transformation of a figure by matrix calculation based on the information input by the input means; A figure rotation device for three-dimensional computer graphics, which is equipped with an output means for displaying figure data, characterized in that the calculation means executes coordinate transformation of the figure by matrix calculation in the order of Y, X, and Z axes. A figure rotation device 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 true JPH04245388A (en) 1992-09-01
JP2800435B2 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)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018144034A1 (en) * 2017-02-06 2018-08-09 Hewlett-Packard Development Company, L.P. Digital pen to adjust a 3d object

Cited By (3)

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

Also Published As

Publication number Publication date
JP2800435B2 (en) 1998-09-21

Similar Documents

Publication Publication Date Title
JPH0327949B2 (en)
JPH05342310A (en) Method and device for three-dimensional conversion of linear element data
US20180036883A1 (en) Simulation apparatus, robot control apparatus and robot
JPS62159286A (en) Three-dimensional cursor control system
JPH11239989A (en) Calibration device in robot simulation
JP3522505B2 (en) Window display
JP5302763B2 (en) Image processing apparatus and image processing method
WO2006106829A1 (en) Structured grid data visualization method and program
JP2800435B2 (en) Method and apparatus for rotating figures in three-dimensional computer graphics
JP3138887B2 (en) How to display the constraint conditions of a structure model
JPH04137108A (en) Offline teaching method for robot
Rose et al. Intuitive and interactive modification of large finite element models
JP3147391B2 (en) Method and apparatus for setting curved surface in three-dimensional boundary fitting mesh division
JP2737126B2 (en) Method for creating cross-sectional image data of an object
JPH07134781A (en) Method for directing the rotation of three-dimensional object
JPS6340967A (en) Plane input device
JP3486644B2 (en) Moving object motion data processing method, and motion data processing apparatus and storage medium therefor
JPH07200875A (en) Display position changing method for three-dimensional model
JPS61243566A (en) Action display method
JPH06119430A (en) Graphic display device
JP3267030B2 (en) CAD / CAM system
JPH07200874A (en) Production of two-dimensional drawing for three-dimensional cad system
JPH11213178A (en) Three-dimensional data display and recording medium recorded with three-dimensional data transformation program
JPS6182278A (en) Three-dimension coordinate converter
JPH05314240A (en) Three-dimensional shape data display method

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