JPH07200866A - Image display position deciding method and device therefor - Google Patents
Image display position deciding method and device thereforInfo
- Publication number
- JPH07200866A JPH07200866A JP35086593A JP35086593A JPH07200866A JP H07200866 A JPH07200866 A JP H07200866A JP 35086593 A JP35086593 A JP 35086593A JP 35086593 A JP35086593 A JP 35086593A JP H07200866 A JPH07200866 A JP H07200866A
- Authority
- JP
- Japan
- Prior art keywords
- image data
- coordinate
- display position
- image
- coordinates
- 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
Links
Landscapes
- Processing Or Creating Images (AREA)
Abstract
Description
【0001】[0001]
【産業上の利用分野】本発明は、画像変形に係わり、詳
しくはアニメーション、ゲーム等で用いられるキャクラ
クター、背景データを初めとするドットで構成され、か
つ各ドット毎に表示色番号あるいはパレット番号を持つ
ようないわゆるビット配列形式の画像データの変形に際
して、画像データの大きさ、およびその位置が変化した
時の画像データの位置を検出し、表示位置を決定する画
像表示位置決定方法およびその方法を実現する装置に関
する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to image transformation, and more specifically, it is composed of dots such as a character used in animations and games, background data and the like, and a display color number or palette number for each dot. And method for determining the display position by detecting the size of the image data and the position of the image data when the position of the image data is changed when the image data of the so-called bit array format is modified. The present invention relates to a device that realizes.
【0002】[0002]
【従来の技術】従来、アニメーション、ゲーム等ではビ
ット配列形式の画像データを用いることが多く、この画
像データによりキャラクターや背景データを表示してい
る。これら、アニメーション、ゲーム等で、キャラクタ
または背景に動きを与えたり、その形を変える時には、
そのキャラクタまたは背景の一部分を構成する構成パー
ツ(例えば、キャラクタの目、口等)ごとに画像データ
を変形させていた。2. Description of the Related Art Conventionally, image data in a bit array format is often used in animation, games, etc., and characters and background data are displayed by this image data. When giving movement to the character or background or changing its shape in these animations, games, etc.,
The image data is transformed for each constituent part (for example, the eyes, mouth, etc.) of the character or a part of the background.
【0003】[0003]
【発明を解決するための課題】ところで、従来の画像変
形方法では、キャラクタや背景を移動もしくは変形した
際に、移動後もしくは変形後の画像データの位置検出を
行っていなかった。画像データは、移動もしくは変形に
伴ってその位置が変わる可能性がある。したがって、構
成パーツを変形していった時に、予期せぬ位置に表示さ
れるという不具合が生じていた。また、予期せぬ位置に
表示されないようにするために、構成パーツの変形の範
囲を限定すると、変形できる範囲が限られ、変形の機能
を極限まで利用することが難しいという欠点があった。By the way, in the conventional image transformation method, when the character or the background is moved or transformed, the position of the image data after the movement or after the transformation is not detected. The position of image data may change due to movement or deformation. Therefore, when the component parts are deformed, there is a problem that they are displayed at unexpected positions. In addition, if the range of deformation of the component parts is limited so as not to be displayed at an unexpected position, the range of deformation is limited, and it is difficult to use the deformation function to the limit.
【0004】そこで本発明は、画像データを移動、もし
くは変形する際に、構成パーツが予期せぬ位置に表示さ
れることなく、また、表示位置に拘束されずに、変形の
機能を極限まで利用できる画像表示位置決定方法および
その装置を提供することを目的とする。Therefore, according to the present invention, when the image data is moved or deformed, the function of the deformation is utilized to the maximum without the constituent parts being displayed at an unexpected position or being restricted by the display position. An object of the present invention is to provide an image display position determining method and an apparatus thereof.
【0005】[0005]
【課題を解決するための手段】上記目的達成のため、請
求項1記載の発明による画像表示位置決定方法は、変形
対象となる画像データを表示し得る表示可能領域を設定
し、前記画像データの変形が行われる度に、変形後の画
像データの大きさを表す判定領域を作成し、前記判定領
域が前記表示可能領域内に入るように前記画像データの
表示位置を決定することを特徴とする。請求項2記載の
発明による画像表示位置決定方法は、移動対象となる画
像データを表示し得る表示可能領域を設定し、前記画像
データの移動が行われる度に、移動後の画像データの大
きさを表す判定領域を作成し、前記判定領域が前記表示
可能領域内に入るように前記画像データの表示位置を決
定することを特徴とする。また、好ましい態様として、
例えば請求項3記載のように、前記表示可能領域は矩形
であり、前記判定領域は変形後の画像データを全て含む
最小の矩形としてもよい。例えば請求項4記載のよう
に、前記表示可能領域は矩形であり、前記判定領域は変
形後の画像データを全て含む最小の矩形よりも小さい矩
形にしてもよい。例えば請求項5記載のように、前記表
示可能領域は、対角の少なくとも2点のXY座標によっ
て表わすようにしてもよい。In order to achieve the above object, the image display position determining method according to the invention of claim 1 sets a displayable area capable of displaying image data to be transformed, and sets the displayable area of the image data. Each time the deformation is performed, a determination area representing the size of the image data after the deformation is created, and the display position of the image data is determined so that the determination area falls within the displayable area. . An image display position determining method according to the invention of claim 2 sets a displayable area capable of displaying image data to be moved, and sets the size of the image data after the movement each time the image data is moved. Is determined, and the display position of the image data is determined so that the determination area falls within the displayable area. Moreover, as a preferable aspect,
For example, as described in claim 3, the displayable area may be a rectangle, and the determination area may be a minimum rectangle including all the image data after transformation. For example, as in claim 4, the displayable area may be a rectangle, and the determination area may be a rectangle smaller than a minimum rectangle that includes all the image data after transformation. For example, as in claim 5, the displayable area may be represented by XY coordinates of at least two points on a diagonal.
【0006】例えば請求項6記載のように、前記判定領
域は、対角の4点のXY座標によって表わすようにして
もよい。例えば請求項7記載のように、前記画像データ
は、画像を構成する複数の構成パーツの各々であっても
よい。例えば請求項8記載のように、前記変形手段は、
ビット配列形式の画像データを有する変形対象を、複数
の小多角形に分割し、この各小多角形を所定の変形処理
に従って異なる小多角形に変形するデータに基づいて、
前記分割された各小多角形を異なる小多角形に変形する
多角形分割変形法を用いるようにしてもよい。請求項9
記載の発明による画像表示位置決定装置は、変形対象と
なる画像データを表示し得る表示可能領域を設定する表
示可能領域設定手段と、所定の変形処理に従って前記画
像データを変形する変形手段と、前記変形手段によって
前記画像データが変形される度に、変形後の画像データ
の大きさを表す判定領域を作成する判定領域作成手段
と、前記変形手段によって前記画像データが変形される
度に、前記判定領域作成手段によって作成された判定領
域が前記表示可能領域内に入るように前記画像データの
表示位置を決定する画像位置決定手段とを具備すること
を特徴とする。For example, as described in claim 6, the determination area may be represented by XY coordinates of four diagonal points. For example, as described in claim 7, the image data may be each of a plurality of constituent parts forming an image. For example, as described in claim 8, the deforming means comprises:
A transformation target having image data in a bit array format is divided into a plurality of small polygons, and based on data obtained by transforming each of these small polygons into different small polygons according to a predetermined transformation process,
It is also possible to use a polygon division transformation method for transforming each of the divided small polygons into different small polygons. Claim 9
An image display position determining device according to the invention described above, a displayable area setting means for setting a displayable area capable of displaying image data to be deformed, a deforming means for deforming the image data according to a predetermined deformation process, Determination area creating means for creating a determination area representing the size of the image data after deformation, each time the image data is deformed by the deforming means, and the determination area for each time the image data is deformed by the deforming means. Image position determining means for determining the display position of the image data so that the determination area created by the area creating means falls within the displayable area.
【0007】また、好ましい態様として、例えば請求項
10記載のように、前記画像データの形状をそのままに
して、所定の移動処理に従って画像データの座標を移動
し、該画像データの表示位置を変更する移動手段を備
え、前記判定領域作成手段は、前記移動手段によって前
記画像データが移動させられる度に、移動後の画像デー
タの大きさを表す判定領域を作成し、画像位置決定手段
は、前記移動手段によって前記画像データが移動させら
れる度に、前記判定領域作成手段によって作成された判
定領域が前記表示可能領域内に入るように前記画像デー
タの表示位置を決定するようにしてもよい。例えば請求
項11記載のように、ビット配列形式の画像データと、
前記画像データの大きさを表わすピクセル数と、前記画
像データの表示可能領域を表わす座標と、前記画像デー
タの初期配置座標とを記憶する記憶手段と、前記記憶手
段に記憶された前記ピクセル数および前記初期配置座標
に従って、前記画像データの表示位置を表わす表示座標
を算出し、前記表示座標および前記ピクセル数に従っ
て、前記判定領域を表わす判定領域座標を算出する演算
手段と、前記演算手段によって算出された前記表示座標
および判定領域座標を格納する格納手段とを備えるよう
にしてもよい。In a preferred aspect, for example, the shape of the image data is left unchanged, and the coordinates of the image data are moved according to a predetermined moving process to change the display position of the image data. The determination area creating means creates a determination area representing the size of the image data after the movement each time the image data is moved by the moving means, and the image position determining means sets the movement area. Each time the image data is moved by the means, the display position of the image data may be determined so that the determination area created by the determination area creating means falls within the displayable area. For example, as described in claim 11, image data in a bit array format,
Storage means for storing the number of pixels representing the size of the image data, coordinates representing the displayable area of the image data, and initial placement coordinates of the image data, and the number of pixels stored in the storage means, Calculating means for calculating display coordinates representing a display position of the image data according to the initial arrangement coordinates, and calculating determination area coordinates representing the determination area according to the display coordinates and the number of pixels; A storage unit for storing the display coordinates and the determination area coordinates may be provided.
【0008】例えば請求項12記載のように、前記画像
データは画像を構成する複数の構成パーツの各々であっ
て、前記複数の構成パーツのうち、処理対象となる構成
パーツを選択する構成パーツ選択手段を備えるようにし
てもよい。例えば請求項13記載のように、前記構成パ
ーツ選択手段によって選択された構成パーツに対する移
動、および移動方向を指示する移動指示手段を備えるよ
うにしてもよい。例えば請求項14記載のように、前記
構成パーツ選択手段によって選択された構成パーツに対
する変形を指示する変形指示手段を備えるようにしても
よい。例えば請求項15記載のように、前記変形手段
は、ビット配列形式の画像データを有する変形対象を、
複数の小多角形に分割し、この各小多角形を所定の変形
処理に従って異なる小多角形に変形するデータに基づい
て、前記分割された各小多角形を異なる小多角形に変形
するようにしてもよい。例えば請求項16記載のよう
に、前記変形手段によって変形された変形後の画像デー
タを表示する表示手段を、さらに有するようにしてもよ
い。For example, as described in claim 12, the image data is each of a plurality of constituent parts forming an image, and a constituent part selection for selecting a constituent part to be processed from the plurality of constituent parts. Means may be provided. For example, as described in claim 13, a movement instructing means for instructing a movement and a movement direction with respect to the constituent part selected by the constituent part selecting means may be provided. For example, as described in claim 14, deformation instruction means for instructing deformation of the constituent part selected by the constituent part selecting means may be provided. For example, as described in claim 15, the transforming means transforms a transform target having image data in a bit array format,
It is divided into a plurality of small polygons, and each divided small polygon is deformed into different small polygons based on data for deforming each of these small polygons into different small polygons according to a predetermined deformation process. May be. For example, as described in claim 16, a display unit may be further provided for displaying the image data after being transformed by the transforming unit.
【0009】[0009]
【作用】本発明では、まず、変形対象となる画像データ
を表示し得る表示可能領域を設定し、上記画像データの
変形が行われる度に、変形後の画像データの大きさを表
す判定領域を作成し、判定領域が上記表示可能領域内に
入るように変形後の画像データの表示位置を決定する。
したがって、変形後の画像データは、表示可能領域に表
示されるため、画像データが予期せぬ位置に表示される
等の不具合が生じなくなる。また、始めから画像データ
の変形の範囲を限定することなく、変形した後にその画
像データの表示位置を検出して補正するので、変形の機
能を極限まで利用することができる。According to the present invention, first, a displayable area capable of displaying image data to be deformed is set, and each time the image data is deformed, a determination area indicating the size of the deformed image data is set. The display position of the image data after the modification is determined so that the determination area is within the displayable area.
Therefore, since the deformed image data is displayed in the displayable area, a problem such as the image data being displayed at an unexpected position does not occur. Moreover, since the display position of the image data is detected and corrected after the deformation without limiting the deformation range of the image data from the beginning, the function of the deformation can be utilized to the maximum.
【0010】[0010]
【実施例】以下、図面を参照して本発明の実施例につい
て説明する。本発明の原理説明 まず、本発明の原理から説明する。図1は構成パーツの
変形を行った時に、その表示位置を検出する表示位置検
出方法の原理を示す図である。図1(a)は変形後の画
像データを示し、特にビット配列形式の画像データで、
「目」の画像(絵)Aを有している。また、実線Bは顔
などの輪郭線であり、変形された画像データは、破線C
で示す矩形の表示範囲内で表示可能となっている。ま
ず、表示範囲左上座標(△印)8と表示範囲右下座標
(▲印)9とによって、構成パーツを表示し得る表示範
囲を設定する。なお、構成パーツの元画像データは、図
1(b)に示すように矩形であり、説明を簡単にするた
めに、変形によって任意の四角形に変形されるものとす
る。また、図1(b)において、構成パーツの左上の頂
点A’(○印)は、表示面(ディスプレイ)に表示され
る際、その構成パーツの位置を表す点であり、基準点と
呼ぶことにする。Embodiments of the present invention will be described below with reference to the drawings. First, the principle of the present invention will be described. FIG. 1 is a diagram showing the principle of a display position detecting method for detecting the display position of a component when the component is deformed. FIG. 1 (a) shows the image data after the transformation, particularly the image data in the bit array format,
It has an image (picture) A of "eyes". A solid line B is a contour line of a face or the like, and the transformed image data is a broken line C.
Display is possible within the rectangular display range. First, the display range in which the constituent parts can be displayed is set by the display range upper left coordinates (Δ mark) 8 and the display range lower right coordinates (▲ mark) 9. It should be noted that the original image data of the constituent parts is rectangular as shown in FIG. 1B, and is assumed to be transformed into an arbitrary quadrangle by transformation for the sake of simplicity. Also, in FIG. 1B, the upper left apex A ′ (circle) of the constituent part is a point that represents the position of the constituent part when displayed on the display surface (display), and is called a reference point. To
【0011】図1(c)に示すように、上記構成パーツ
が変形されると、該構成パーツの点A’、点B’、点
C’、点D’は、それぞれ任意の位置に移動する。この
時、4点がすべて含まれるような矩形Dを決めて、矩形
Dの表示面での位置を表すために、最小X座標12、最
大X座標14、最小Y座標16、最大Y座標18を算出
する。例えば、図示のような変形を行った場合には、点
A’のX座標が最小X座標12となり、点D’のX座標
が最大X座標14、点A’のY座標が最小Y座標16、
そして、点C’のY座標が最大Y座標18になる。As shown in FIG. 1 (c), when the constituent parts are deformed, points A ', B', C'and D'of the constituent parts respectively move to arbitrary positions. . At this time, a rectangle D that includes all four points is determined, and in order to represent the position of the rectangle D on the display surface, the minimum X coordinate 12, the maximum X coordinate 14, the minimum Y coordinate 16, and the maximum Y coordinate 18 are set. calculate. For example, when the deformation shown in the drawing is performed, the X coordinate of the point A'is the minimum X coordinate 12, the X coordinate of the point D'is the maximum X coordinate 14, and the Y coordinate of the point A'is the minimum Y coordinate 16. ,
Then, the Y coordinate of the point C ′ becomes the maximum Y coordinate 18.
【0012】次に、図1(a)に示す表示範囲左上座標
8(X座標8x,Y座標8y)および表示範囲右下座標
9(X座標9x,Y座標9y)と、最小X座標12、最
大X座標14、最小Y座標16、および最大Y座標18
とを比較して、変形後の構成パーツが上述した矩形Cの
表示範囲からはみ出さないように、構成パーツの表示位
置を決定する。このように、構成パーツを表示可能な範
囲を設定すると共に、構成パーツの変形が行われた時
に、変形後の画像データのX座標、Y座標の最少値、最
大値を算出し、構成パーツが表示可能範囲Cの中に入っ
ていない場合には、範囲内に入るように構成パーツの表
示位置を変更する。したがって、構成パーツが予期せぬ
位置に表示されることがない。また、表示位置に拘束さ
れずに、変形の機能を極限まで利用できる。Next, a display range upper left coordinate 8 (X coordinate 8x, Y coordinate 8y) and a display range lower right coordinate 9 (X coordinate 9x, Y coordinate 9y) shown in FIG. Maximum X coordinate 14, minimum Y coordinate 16, and maximum Y coordinate 18
And the display positions of the component parts are determined so that the component parts after the deformation do not protrude from the display range of the rectangle C described above. In this way, the display range of the component parts is set, and when the component parts are deformed, the minimum and maximum values of the X coordinate and Y coordinate of the image data after the deformation are calculated, and the component parts are If it is not within the displayable range C, the display positions of the constituent parts are changed so as to be within the range. Therefore, the constituent parts are not displayed at unexpected positions. Further, the deformation function can be used to the maximum without being restricted by the display position.
【0013】次に、上記原理に基づく本発明の具体的な
実施例について説明する。画像位置決定装置の構成 図2は本発明に係る画像位置決定方法を実現する画像位
置決定装置の一実施例の構成を示すブロック図である。
図2において、画像位置決定装置は、大きく分けて、C
PU31、入力操作子32、記憶装置33、画像信号発
生回路(VideoDisplay Prosseser:以下VDPという)
34、VRAM35およびTVディスプレイ36によっ
て構成される。Next, a specific embodiment of the present invention based on the above principle will be described. Configuration of Image Positioning Device FIG. 2 is a block diagram showing the configuration of an embodiment of the image position determining device which realizes the image position determining method according to the present invention.
In FIG. 2, the image position determining device is roughly divided into C
PU 31, input operator 32, storage device 33, image signal generation circuit (Video Display Prosseser: hereinafter referred to as VDP)
34, VRAM 35 and TV display 36.
【0014】CPU31は装置全体を制御するもので、
入力操作子32の変形スイッチ(後述)が押されたこと
を検知し、その指令情報に対応すべく内部のメモリに格
納されている制御プログラムに基づいて、記憶装置33
に記憶されている該当する構成パーツの画像データを読
み出して変形すると共に、変形後の画像データが含まれ
る矩形Dの座標を算出して、該矩形Dが表示可能範囲C
に入っているか否かを判別し、表示可能範囲Cに入って
いなければ、表示可能範囲Cに入るように、構成パーツ
の表示位置を変更した後、VDP34に画像データを出
力する。また、CPU31は内部レジスタ(格納手段)
31aを有しており、内部レジスタ31aには後述の図
4に示すような構成パーツの各点の座標や、現在選択さ
れている構成パーツの番号を示す選択中パーツ番号が格
納されるようになっている。The CPU 31 controls the entire apparatus,
When the deformation switch (described later) of the input operator 32 is pressed, the storage device 33 is detected based on the control program stored in the internal memory so as to correspond to the command information.
The image data of the corresponding constituent part stored in C is read and deformed, the coordinates of the rectangle D including the image data after the deformation are calculated, and the rectangle D is displayed in the displayable range C.
It is determined whether or not it is within the displayable range C, and if it is not within the displayable range C, the display positions of the constituent parts are changed so as to be within the displayable range C, and then the image data is output to the VDP 34. Further, the CPU 31 is an internal register (storage means).
The internal register 31a stores the coordinates of each point of the constituent parts as shown in FIG. 4 described later and the selected part number indicating the number of the currently selected constituent part. Has become.
【0015】入力操作子32は、オペレータによって操
作されるものであり、変形対象となる構成パーツを選択
するパーツ選択スイッチ32a(構成パーツ選択手
段)、選択された構成パーツの変形を指示する変形スイ
ッチ32b(変形指示手段)、選択された構成パーツの
移動を指示する移動スイッチ32c(移動指示手段)を
有している。なお、各スイッチ32a〜32cは、単独
操作のプッシュスイッチでもよいし、あるいは複数のス
イッチからなるスイッチボード、キーボード等でもよ
い。また、入力操作子32としてスイッチボード等の他
に、マウス、トラックボール等を用いてもよい。The input operator 32 is operated by an operator, and is a part selection switch 32a (component part selection means) for selecting a component part to be deformed, and a deformation switch for instructing deformation of the selected component part. 32b (deformation instructing means) and a movement switch 32c (movement instructing means) for instructing movement of the selected component part. Each of the switches 32a to 32c may be a push switch that can be operated independently, or a switch board including a plurality of switches, a keyboard, or the like. As the input operator 32, a mouse, a trackball, or the like may be used instead of the switch board or the like.
【0016】記憶装置(記憶手段)33には、各構成パ
ーツごとに、元となる画像データと、構成パーツに関す
るデータが記憶されている。図3は該記憶装置に記憶さ
れている各構成パーツのデータを説明するための図であ
る。記憶装置33には、図3に示すように、各構成パー
ツごとに、画像データ、画像データのX方向のピクセル
数を示すX方向ピクセル数、Y方向のピクセル数を示す
Y方向ピクセル数、構成パーツの表示可能範囲を示す
(表示面での座標である)表示範囲左上X座標、表示範
囲左上Y座標、表示範囲右下X座標、表示範囲右下Y座
標、初期状態における各構成パーツの表示面での表示位
置を示す初期配置X座標、初期配置Y座標から構成され
る。図3では、例えば、構成パーツとして、左目、右
目、および口が示されている。The storage device (storage means) 33 stores, for each constituent part, original image data and data concerning the constituent part. FIG. 3 is a diagram for explaining the data of each component stored in the storage device. As shown in FIG. 3, the storage device 33 stores image data, the number of pixels in the X direction indicating the number of pixels in the X direction of the image data, the number of pixels in the Y direction indicating the number of pixels in the Y direction, and the configuration for each component. Display range upper left X coordinate, display range upper left Y coordinate, display range lower right X coordinate, display range lower right Y coordinate, display of each component part in the initial state, which indicates the displayable range of the part (coordinates on the display surface) It is composed of an initial arrangement X-coordinate and an initial arrangement Y-coordinate indicating a display position on the surface. In FIG. 3, for example, the left eye, the right eye, and the mouth are shown as the constituent parts.
【0017】VDP34はCPU31から与えられた変
形前のビット配列形式の画像データや変形後のビット配
列形式の画像データをVRAM34に書き込む。VRA
M34としては、例えば半導体メモリが用いられ、表示
する画像を1画面単位で記憶する。VRAM34に書き
込まれた画像データはTVディスプレイ(表示手段)3
6によって表示される。上記CPU31は、表示可能領
域設定手段、変形手段、判定領域作成手段、画像位置決
定手段を構成するとともに、さらに演算手段を構成す
る。The VDP 34 writes the image data in the bit array format before the transformation and the image data in the bit array format after the transformation given from the CPU 31 into the VRAM 34. VRA
As M34, for example, a semiconductor memory is used, and an image to be displayed is stored for each screen. The image data written in the VRAM 34 is the TV display (display means) 3
Displayed by 6. The CPU 31 constitutes a displayable area setting means, a deforming means, a judgment area creating means, an image position determining means, and further an arithmetic means.
【0018】次に、図4は、上述したCPU31の内部
レジスタ31aに記憶される座標データを説明するため
の図である。図4において、内部レジスタ31aには、
各構成パーツごとに、表示面での構成パーツの位置を表
す点である基準点A’のX座標、基準点A’のY座標、
構成パーツのその他の頂点の基準点A’からの相対位置
として、点B’の相対X座標、点B’の相対Y座標、点
C’の相対X座標、点C’の相対Y座標、点D’の相対
X座標、点D’の相対Y座標、および変形後の構成パー
ツが含まれる矩形の表示面での位置を表す最小X座標、
最大X座標、最小Y座標、最大Y座標が格納されてい
る。また、各構成パーツには、各々を識別するためのパ
ーツ番号が付けられている。さらに、内部レジスタ31
aには、現在選択中の構成パーツを記憶しておく、選択
中パーツ番号が格納されており、該選択中パーツ番号に
対応する構成パーツに対して、変形や移動が行われるよ
うになっている。FIG. 4 is a diagram for explaining the coordinate data stored in the internal register 31a of the CPU 31 described above. In FIG. 4, the internal register 31a includes
For each constituent part, the X coordinate of the reference point A ′, which is a point representing the position of the constituent part on the display surface, the Y coordinate of the reference point A ′,
As relative positions of the other vertices of the constituent parts from the reference point A ′, the relative X coordinate of the point B ′, the relative Y coordinate of the point B ′, the relative X coordinate of the point C ′, the relative Y coordinate of the point C ′, the point A relative X coordinate of D ', a relative Y coordinate of the point D', and a minimum X coordinate indicating a position on the display surface of a rectangle including the transformed component parts,
The maximum X coordinate, the minimum Y coordinate, and the maximum Y coordinate are stored. In addition, a part number for identifying each component is attached to each component part. Furthermore, the internal register 31
In a, the selected part number for storing the currently selected constituent part is stored, and the constituent part corresponding to the selected part number can be deformed or moved. There is.
【0019】次に、作用を説明する。イニシャル処理 図5は、電源オンまたはリセットされた時のイニシャル
処理を示すフローチャートである。電源が投入またはリ
セットされ、このプログラムがスタートすると、まず、
ステップS10において、各構成パーツごとに、記憶装
置33から初期配置X座標および初期配置Y座標を読み
出し、CPU31の内部レジスタ31aの基準点A’の
X座標、Y座標に代入する。次に、ステップS12で、
CPU31の内部レジスタ31aの点B’の相対X座標
に[0]を代入するとともに、記憶装置33から読み出
したY方向ピクセル数を、同内部レジスタ31aの相対
Y座標に代入して初期化する。次に、ステップS14で
は、記憶装置33から読み出したX方向ピクセル数を内
部レジスタ31aの点C’の相対X座標に代入するとと
もに、記憶装置33から読み出したY方向ピクセル数を
内部レジスタ31aの相対Y座標に代入して初期化す
る。そして、ステップS16においては、記憶装置33
から読み出したX方向ピクセル数を、内部レジスタ31
aの点D’の相対X座標に代入し、同内部レジスタ31
aの相対Y座標に[0]を代入して初期化する。このよ
うに、ステップS10〜S16では、各パーツごとに、
基準点A’のX座標およびY座標に、各々、記憶装置3
3に格納されている初期配置X座標および初期配置Y座
標を代入するとともに、点B’、点C’、および点D’
の相対X,Y座標に、[0]もしくは記憶装置33に格
納されているX,Y方向のピクセル数を代入する。この
状態における構成パーツは、図1(b)に示す矩形状の
画像となる。Next, the operation will be described. Initial Processing FIG. 5 is a flowchart showing the initial processing when the power is turned on or reset. When the power is turned on or reset and this program starts, first,
In step S10, the initial arrangement X-coordinate and the initial arrangement Y-coordinate are read from the storage device 33 for each component part and substituted into the X-coordinate and Y-coordinate of the reference point A ′ of the internal register 31a of the CPU 31. Next, in step S12,
[0] is substituted for the relative X coordinate of the point B ′ of the internal register 31a of the CPU 31, and the number of pixels in the Y direction read from the storage device 33 is substituted for the relative Y coordinate of the internal register 31a for initialization. Next, in step S14, the number of pixels in the X direction read from the storage device 33 is substituted into the relative X coordinate of the point C ′ of the internal register 31a, and the number of pixels in the Y direction read from the storage device 33 is stored in the relative register of the internal register 31a. Initialize by substituting to Y coordinate. Then, in step S16, the storage device 33
The number of pixels in the X direction read from the
Substitute in the relative X coordinate of the point D ′ of a, and the internal register 31
Initialize by substituting [0] for the relative Y coordinate of a. Thus, in steps S10 to S16, for each part,
The storage device 3 is provided at each of the X coordinate and the Y coordinate of the reference point A ′.
Substituting the initial arrangement X-coordinate and the initial arrangement Y-coordinate stored in 3, the points B ′, C ′, and D ′
Substituting [0] or the number of pixels in the X and Y directions stored in the storage device 33 into the relative X and Y coordinates of. The component parts in this state become a rectangular image shown in FIG.
【0020】次に、ステップS18で、各構成パーツご
とに、内部レジスタ31aの最小X座標12に基準点
A’のX座標を代入して初期化する。次に、ステップS
20では、各構成パーツごとに、内部レジスタ31aの
最大X座標14に、基準点A’のX座標+X方向ピクセ
ル数を代入して初期化する。そして、ステップS22に
おいては、各構成パーツごとに、最小Y座標16に、基
準点A’のY座標を代入して初期化する。さらに、ステ
ップS24で、最大Y座標18に、基準点A’のY座標
+Y方向ピクセル数を代入して初期化する。このように
して、ステップS18〜S24では、図1(b)に示す
構成パーツの画像と、該構成パーツの点A’、点B’、
点C’、点D’の4点がすべて含まれる矩形D(図1
(b)参照)とを一致させる。そして、ステップS26
で、後述する選択中パーツの判定表示処理によって、構
成パーツを表示する。次いで、ステップS28におい
て、内部レジスタ31aに格納したすべての構成パーツ
を表示したか否かを判別し、NOであればステップS2
6に戻って同様の処理を繰り返す。そして、すべての構
成パーツに対する判定表示処理が終了し、ディスプレイ
36に全構成パーツが表示されると、ステップS28か
らYESに抜けて本ルーチンを終了する。Next, in step S18, the X coordinate of the reference point A'is substituted for the minimum X coordinate 12 of the internal register 31a for each component part for initialization. Next, step S
At 20, the initialization is performed by substituting the X coordinate of the reference point A ′ + the number of pixels in the X direction into the maximum X coordinate 14 of the internal register 31a for each component part. Then, in step S22, the Y coordinate of the reference point A ′ is substituted into the minimum Y coordinate 16 for each component part to initialize it. Further, in step S24, the maximum Y coordinate 18 is initialized by substituting the Y coordinate of the reference point A ′ + the number of pixels in the Y direction. In this way, in steps S18 to S24, the image of the constituent parts shown in FIG. 1B and the points A ′ and B ′ of the constituent parts,
A rectangle D including all four points C ′ and D ′ (see FIG.
(See (b)). Then, step S26
Then, the constituent parts are displayed by the determination display processing of the selected parts which will be described later. Next, in step S28, it is determined whether or not all the constituent parts stored in the internal register 31a are displayed, and if NO, step S2
Returning to step 6, the same processing is repeated. When the determination display process for all the constituent parts is completed and all the constituent parts are displayed on the display 36, the process exits from step S28 to YES, and the present routine ends.
【0021】メインルーチン 次に、図6はメインプログラムを示すフローチャートで
ある。このプログラムがスタートすると、まず、ステッ
プS30でキー情報取り込み処理を行う。これは、入力
操作子32における各スイッチ32a〜32cの操作情
報を入力するものである。次いで、ステップS32で変
形スイッチ32bが押されたか否かを判別し、変形スイ
ッチ32bが押されていなければ、NOに抜けてステッ
プS34へ進む。ステップS34では、移動スイッチ3
2cが押されたか否かを判別し、移動スイッチ32cが
押されていなければ、NOに抜けてステップS36へ進
む。ステップS36では、選択スイッチ32aが押され
たか否かを判別し、選択スイッチ32aが押されていな
ければ、NOに抜けて当該ルーチンを終了し、次回のル
ーチンで再びステップS30以降を実行する。 Main Routine Next, FIG. 6 is a flowchart showing a main program. When this program starts, first, in step S30, key information fetching processing is performed. This is for inputting operation information of each of the switches 32a to 32c in the input operator 32. Next, in step S32, it is determined whether or not the deformation switch 32b is pressed. If the deformation switch 32b is not pressed, the process proceeds to NO and proceeds to step S34. In step S34, the movement switch 3
It is determined whether or not 2c is pressed, and if the movement switch 32c is not pressed, the process returns to NO and proceeds to step S36. In step S36, it is determined whether or not the selection switch 32a has been pressed. If the selection switch 32a has not been pressed, NO is returned to and the routine is ended. In the next routine, steps S30 and thereafter are executed again.
【0022】まず、選択スイッチ32aが押された場合
には、ステップS36からYESに抜けてステップS3
8へ進む。ステップS38では、CPU31の内部レジ
スタ31aに格納している選択中パーツ番号を変更した
後、当該ルーチンを終了する。この処理により、これ以
降における変形処理、もしくは移動処理は、上記選択ス
イッチ32aによって選択されたパーツ番号の構成パー
ツに対して行われる。次に、移動スイッチ32cが押さ
れた場合には、ステップS34からYESに抜けてステ
ップS40へ進む。ステップS40では、操作された移
動スイッチ32cの方向(図2参照)に応じて、先のス
テップS38で選択した選択中パーツ番号に対応する構
成パーツの基準点A’のX座標およびY座標を変更す
る。この場合、移動だけなので、点B’、点C’、点
D’の各々の基準点A’に対する相対X座標、相対Y座
標は変わらない。First, when the selection switch 32a is pressed, the process exits from step S36 to YES and proceeds to step S3.
Go to 8. In step S38, the selected part number stored in the internal register 31a of the CPU 31 is changed, and then the routine ends. By this processing, the subsequent deformation processing or movement processing is performed on the constituent part of the part number selected by the selection switch 32a. Next, when the move switch 32c is pressed, the process exits from step S34 to YES and proceeds to step S40. In step S40, the X coordinate and the Y coordinate of the reference point A'of the component part corresponding to the selected part number selected in step S38 are changed according to the direction of the operated movement switch 32c (see FIG. 2). To do. In this case, since only the movement is performed, the relative X coordinate and the relative Y coordinate of each of the points B ′, C ′, and D ′ with respect to the reference point A ′ do not change.
【0023】次に、ステップS42では、同選択中パー
ツ番号に対応する構成パーツの基準点A’のX座標と、
点B’、点C’、点D’の相対X座標とから、最小X座
標12、最大X座標14を算出する。そして、ステップ
S44では、同選択中パーツ番号の構成パーツの基準点
A’のY座標と、点B’、点C’、点D’の相対Y座標
とから、最小Y座標16、最大Y座標18を算出する。
このように、ステップS42およびS44においては、
選択中パーツ番号に対応する構成パーツの移動後におけ
る最小X座標12、最大X座標14、最小Y座標16、
および最大Y座標18が得られる。次に、ステップS4
6において、最小X座標12、最大X座標14、最小Y
座標16、最大Y座標18に基づいて、後述する選択中
パーツの判定表示処理を実行して、表示位置を判別して
表示する。構成パーツを移動することによって、図1
(a)に示す表示可能範囲Cをはみ出る可能性がある。
そこで、ステップS42およびS43において、移動後
の構成パーツの最小X座標12、最大X座標14、最小
Y座標16、および最大Y座標18を算出し、後述する
判定表示処理によって、該構成パーツが表示可能範囲C
に入っているか、あるいははみ出しているかを判別し、
はみ出している場合には、はみ出した点の座標を変更し
て表示する。なお、判定表示処理の詳細について後述す
る。Next, in step S42, the X coordinate of the reference point A'of the component part corresponding to the selected part number,
The minimum X coordinate 12 and the maximum X coordinate 14 are calculated from the relative X coordinates of the points B ′, C ′, and D ′. Then, in step S44, the minimum Y coordinate 16 and the maximum Y coordinate are calculated from the Y coordinate of the reference point A'of the constituent parts of the selected part number and the relative Y coordinates of the points B ', C'and D'. Calculate 18.
Thus, in steps S42 and S44,
The minimum X coordinate 12, the maximum X coordinate 14, the minimum Y coordinate 16 after the movement of the component part corresponding to the selected part number,
And a maximum Y coordinate 18 is obtained. Next, step S4
6, minimum X coordinate 12, maximum X coordinate 14, minimum Y
Based on the coordinate 16 and the maximum Y coordinate 18, the determination display process of the selected part to be described later is executed to determine and display the display position. By moving the component parts,
There is a possibility that the displayable range C shown in FIG.
Therefore, in steps S42 and S43, the minimum X coordinate 12, the maximum X coordinate 14, the minimum Y coordinate 16, and the maximum Y coordinate 18 of the component part after movement are calculated, and the component part is displayed by the determination display process described later. Possible range C
Determine whether it is in or out,
If it is protruding, the coordinates of the protruding point are changed and displayed. The details of the determination display process will be described later.
【0024】次に、変形スイッチ32bが押された場合
には、ステップS32からYESに抜けてステップS4
8へ進む。ステップS48では、選択中パーツ番号に対
応する構成パーツの基準点A’の座標が変わらないよう
に、変形処理を行って画像データを変形する。図形の変
形処理には、周知の方法を用いてもよいし、後述する多
角形分割変形法を用いてもよい。次に、ステップS50
では、上記変形処理に伴い、選択中パーツ番号に対応す
る構成パーツの点B’の相対X座標および相対Y座標を
変更する。また、ステップS52では、選択中パーツ番
号に対応する構成パーツの点C’の相対X座標および相
対Y座標を変更する。さらに、ステップS54で、選択
中パーツ番号に対応する構成パーツの点D’の相対X座
標および相対Y座標を変更する。Next, when the deformation switch 32b is pressed, the process exits from step S32 to YES and proceeds to step S4.
Go to 8. In step S48, transformation processing is performed to transform the image data so that the coordinates of the reference point A'of the constituent part corresponding to the selected part number do not change. A well-known method may be used for the graphic deformation processing, or a polygon division deformation method described below may be used. Next, step S50.
Then, the relative X-coordinate and the relative Y-coordinate of the point B ′ of the constituent part corresponding to the selected part number are changed in accordance with the above-mentioned transformation process. Further, in step S52, the relative X coordinate and the relative Y coordinate of the point C ′ of the constituent part corresponding to the selected part number are changed. Further, in step S54, the relative X coordinate and the relative Y coordinate of the point D'of the constituent part corresponding to the selected part number are changed.
【0025】次に、前述したステップS42へ進み、基
準点A’のX座標と、点B’、点C’、および点D’の
相対X座標とから、最小X座標12および最大X座標1
4を算出し、ステップS44で、基準点A’のY座標
と、点B’、点C’、および点D’の相対Y座標とか
ら、最小Y座標16および最大Y座標18を算出する。
そして、最後にステップS46で、上記最小X座標1
2、最大X座標14、最小Y座標16、最大Y座標18
に基づいて、後述する選択中パーツの判定表示処理を実
行して、表示位置を判別して表示する。Next, in step S42, the minimum X coordinate 12 and the maximum X coordinate 1 are calculated from the X coordinate of the reference point A'and the relative X coordinates of the points B ', C'and D'.
4 is calculated, and in step S44, the minimum Y coordinate 16 and the maximum Y coordinate 18 are calculated from the Y coordinate of the reference point A ′ and the relative Y coordinates of the points B ′, C ′, and D ′.
Finally, in step S46, the minimum X coordinate 1
2, maximum X coordinate 14, minimum Y coordinate 16, maximum Y coordinate 18
Based on the above, the determination display processing of the selected part described later is executed to determine the display position and display.
【0026】判定表示処理 次に、図7はイニシャル処理のステップS26、および
メインルーチンのステップS46における判定表示処理
のサブルーチンを示すフローチャートである。この処理
は、前述した通り、構成パーツを移動もしくは変形した
際に、該構成パーツが表示可能範囲C(図1(a)参
照)に入っているか、はみ出したかを判別するととも
に、はみ出した場合には、構成パーツの該当点の座標を
変更して、表示可能範囲C内で表示するためのルーチン
である。 Judgment Display Processing Next, FIG. 7 is a flowchart showing a subroutine of the judgment display processing in step S26 of the initial processing and step S46 of the main routine. As described above, this process determines whether or not the constituent part is within the displayable range C (see FIG. 1A) when the constituent part is moved or deformed, and when the constituent part is projected. Is a routine for changing the coordinates of the corresponding points of the constituent parts and displaying them within the displayable range C.
【0027】このサブルーチンを実行すると、まず、ス
テップ60で、CPU31の内部レジスタ31aの選択
中パーツ番号に示される構成パーツの最小X座標12が
図1(a)に示す表示範囲左上X座標8x以上であるか
否かを判別し、最小X座標12が表示範囲左上X座標8
xより小さければ、すなわち表示可能範囲Cからはみ出
していれば、NOに抜けてステップS62へ進む。ステ
ップS62では、最小X座標12が表示範囲左上X座標
8xに等しくなるように、内部レジスタ31aにおける
基準点A’のX座標を変更し、ステップS64へ進む。
一方、構成パーツの最小X座標12が表示範囲左上X座
標8x以上であれば、すなわち表示可能範囲C内に入っ
ていれば、ステップS60からYESに抜けてそのまま
ステップS64へ進む。When this subroutine is executed, first, at step 60, the minimum X coordinate 12 of the constituent part indicated by the selected part number in the internal register 31a of the CPU 31 is the upper left X coordinate 8x or more of the display range shown in FIG. Is determined, and the minimum X coordinate 12 is the upper left X coordinate 8 of the display range.
If it is smaller than x, that is, if it is outside the displayable range C, the process returns to NO and proceeds to step S62. In step S62, the X coordinate of the reference point A'in the internal register 31a is changed so that the minimum X coordinate 12 becomes equal to the display range upper left X coordinate 8x, and the process proceeds to step S64.
On the other hand, if the minimum X-coordinate 12 of the component is equal to or more than the upper left X-coordinate of the display range 8x, that is, if it is within the displayable range C, the process exits YES from step S60 and proceeds directly to step S64.
【0028】次に、ステップS64では、選択中パーツ
番号に示される構成パーツの最大X座標14が表示範囲
右下X座標9x以下であるか否かを判別し、最大X座標
14が表示範囲右下X座標9xより大きければ、すなわ
ち表示可能範囲Cからはみ出していれば、NOに抜けて
ステップS66へ進む。ステップS66では、最大X座
標14が表示範囲右下X座標9xに等しくなるように、
内部レジスタ31aにおける基準点A’のX座標を変更
し、ステップS68へ進む。一方、構成パーツの最大X
座標14が表示範囲右下X座標9x以下であれば、すな
わち表示可能範囲C内に入っていれば、ステップS64
からYESに抜けてそのままステップS68へ進む。Next, in step S64, it is determined whether or not the maximum X coordinate 14 of the constituent part indicated by the selected part number is less than or equal to the lower right X coordinate 9x of the display range, and the maximum X coordinate 14 is the right display range. If it is larger than the lower X coordinate 9x, that is, if it is outside the displayable range C, the process returns to NO and proceeds to step S66. In step S66, the maximum X coordinate 14 is set to be equal to the lower right X coordinate 9x of the display range.
The X coordinate of the reference point A'in the internal register 31a is changed, and the process proceeds to step S68. On the other hand, the maximum X of component parts
If the coordinate 14 is not more than the lower right X coordinate 9x of the display range, that is, if it is within the displayable range C, step S64.
To YES, the process directly proceeds to step S68.
【0029】次に、ステップS68では、選択中パーツ
番号に示される構成パーツの最小Y座標16が表示範囲
左上Y座標8y以上であるか否かを判別し、最小Y座標
16が表示範囲左上Y座標8yより小さければ、すなわ
ち表示可能範囲Cからはみ出していれば、NOに抜けて
ステップS70へ進む。ステップS70では、最小Y座
標16が表示範囲左上Y座標8yに等しくなるように、
内部レジスタ31aにおける基準点A’のY座標を変更
し、ステップS72へ進む。一方、構成パーツの最小Y
座標16が表示範囲左上Y座標8y以上であれば、すな
わち表示可能範囲C内に入っていれば、ステップS68
からYESに抜けてそのままステップS72へ進む。Next, in step S68, it is determined whether or not the minimum Y coordinate 16 of the constituent part indicated by the selected part number is equal to or more than the upper left Y coordinate 8y of the display range, and the minimum Y coordinate 16 is the upper left Y of the display range. If it is smaller than the coordinates 8y, that is, if it is outside the displayable range C, the process returns to NO and proceeds to step S70. In step S70, the minimum Y coordinate 16 is set to be equal to the upper left Y coordinate 8y of the display range.
The Y coordinate of the reference point A'in the internal register 31a is changed, and the process proceeds to step S72. On the other hand, the minimum Y of the constituent parts
If the coordinate 16 is the upper left Y coordinate of the display range 8y or more, that is, if it is within the displayable range C, step S68.
From YES to YES, the process directly proceeds to step S72.
【0030】ステップS72では、選択中パーツ番号に
示される構成パーツの最大Y座標18が表示範囲右下Y
座標9y以下であるか否かを判別し、最大Y座標18が
表示範囲右下Y座標9yより大きければ、すなわち表示
可能範囲Cからはみ出していれば、NOに抜けてステッ
プS74へ進む。ステップS74では、最大Y座標18
が表示範囲右下Y座標9yに等しくなるように、内部レ
ジスタ31aにおける基準点A’のY座標を変更し、ス
テップS76へ進む。一方、構成パーツの最大Y座標1
8が表示範囲右下Y座標9y以下であれば、すなわち表
示可能範囲C内に入っていれば、ステップS72からY
ESに抜けてそのままステップS76へ進む。In step S72, the maximum Y coordinate 18 of the constituent part indicated by the selected part number is the lower right Y of the display range.
If the maximum Y coordinate 18 is larger than the lower right Y coordinate 9y of the display range, that is, if the maximum Y coordinate 18 is outside the displayable range C, the process proceeds to NO and proceeds to step S74. In step S74, the maximum Y coordinate 18
The Y coordinate of the reference point A'in the internal register 31a is changed so that is equal to the lower right Y coordinate 9y of the display range, and the process proceeds to step S76. On the other hand, the maximum Y coordinate of the component is 1
If 8 is at the lower right Y coordinate of the display range 9y or less, that is, if it is within the displayable range C, Y from step S72.
After exiting ES, the process directly proceeds to step S76.
【0031】このように、構成パーツの最小X座標1
2、最大X座標14、最小Y座標16、および最大Y座
標18と、表示範囲左上X座標8x、表示範囲左上Y座
標8y、表示範囲右下X座標9x、および表示範囲右下
Y座標9yとを比較して、構成パーツが表示可能範囲C
からはみ出していれば、基準点A’のX座標またはY座
標を、表示可能な最大値である表示範囲座標に変更す
る。そして、ステップS76において、ディスプレイ3
6の表示面における基準点A’の座標の位置に、画像デ
ータが表示されるようにVDP34に画像データを送出
する。これにより、VRAM34に書き込まれた画像デ
ータがTVディスプレイ36によって表示される。Thus, the minimum X coordinate 1 of the constituent parts
2, maximum X coordinate 14, minimum Y coordinate 16, maximum Y coordinate 18, display range upper left X coordinate 8x, display range upper left Y coordinate 8y, display range lower right X coordinate 9x, and display range lower right Y coordinate 9y. Comparing the two, the display range C of the component parts
If it is out of the range, the X coordinate or the Y coordinate of the reference point A ′ is changed to the display range coordinate which is the maximum displayable value. Then, in step S76, the display 3
The image data is sent to the VDP 34 so that the image data is displayed at the coordinate position of the reference point A ′ on the display surface 6. As a result, the image data written in the VRAM 34 is displayed on the TV display 36.
【0032】このように、本実施例の画像表示位置決定
方法によれば、アニメーション、ゲーム等で、キャラク
タまたは背景の一部分を構成するパーツ(例えば、キャ
ラクタの目、口等)を変形して、キャラクタや背景を作
成する時に、構成パーツが予期せぬ位置に表示される等
の不具合が生じないという効果を得ることができる。As described above, according to the image display position determining method of the present embodiment, the parts (eg, the eyes and mouth of the character) forming a part of the character or the background are deformed in animation, game, etc. When creating a character or a background, it is possible to obtain an effect that a defect such as a component part being displayed at an unexpected position does not occur.
【0033】以上、構成パーツを移動もしくは変形を行
った時に、その表示位置を検出する方法の例として、矩
形から任意の四角形への変形を用いた場合を説明した。
しかし、実際には任意の変形に対して、本実施例による
表示位置検出方法が適用できる。図8は、図形データの
変形方法として、多角形分割変形法を用いた場合の例を
示す図である。この多角形分割変形法では、構成パーツ
の図形データを小矩形に分割し、各小矩形に対して変形
を行う。図8(a)では、図形データは、予め、縦4分
割、横6分割の合計24個の小矩形(1)、(2)、(3)、・
・・・、(23)、(24)に分割される。図形データの移動、
もしくは変形は、上記小矩形(1)、(2)、(3)、・・・
・、(24)の各々に対して行われ、図8(b)に示すよう
に、小矩形(1)’、(2)’、(3)’、・・・・(23)’、(2
4)’となる。この場合、図8(b)に示すように、×印
で示す各格子点がすべて含まれるような矩形Eを算出
し、矩形Eの上下左右枠から、最小X座標12、最大X
座標14、最小Y座標16、および最大Y座標18を求
めればよい。この例のような変形を行った場合、△印で
示す格子点のX座標が最小X座標12、▲印で示す格子
点のX座標が最大X座標14、□印で示す格子点のY座
標が最小Y座標16、■印で示す格子点のY座標が最大
Y座標18になる。このように、多角形分割変形法等の
複雑な変形を用いても、その表示位置を的確に検出する
ことができるため、変化に富んだアニメーション、ゲー
ム等のキャラクタであっても、不具合なく作成すること
ができる。The case where the transformation from a rectangle to an arbitrary quadrangle is used has been described above as an example of the method of detecting the display position when the constituent parts are moved or transformed.
However, in practice, the display position detection method according to the present embodiment can be applied to any modification. FIG. 8 is a diagram showing an example in which the polygon division modification method is used as a modification method of graphic data. In this polygon division modification method, the graphic data of the constituent parts are divided into small rectangles, and each small rectangle is deformed. In FIG. 8A, the figure data is divided into four vertical divisions and six horizontal divisions in total of 24 small rectangles (1), (2), (3), ...
..., divided into (23) and (24). Moving figure data,
Or, the transformation is the small rectangles (1), (2), (3), ...
, (24), and as shown in FIG. 8 (b), small rectangles (1) ', (2)', (3) ', ... (23)', ( 2
4) '. In this case, as shown in FIG. 8B, a rectangle E including all lattice points indicated by X is calculated, and the minimum X coordinate 12 and the maximum X are calculated from the upper, lower, left, and right frames of the rectangle E.
The coordinates 14, the minimum Y coordinate 16, and the maximum Y coordinate 18 may be obtained. When the transformation as in this example is performed, the X coordinate of the grid point indicated by Δ is the minimum X coordinate 12, the X coordinate of the grid point indicated by ▲ is the maximum X coordinate 14, and the Y coordinate of the grid point indicated by □. Is the minimum Y coordinate 16 and the Y coordinate of the grid point indicated by the black square is the maximum Y coordinate 18. In this way, even if a complicated transformation such as the polygon division transformation method is used, its display position can be accurately detected, so even characters with a wide variety of animations, games, etc. can be created without problems. can do.
【0034】[0034]
【発明の効果】本発明によれば、変形対象となる画像デ
ータを表示し得る表示可能領域を設定し、上記画像デー
タの変形が行われる度に、変形後の画像データの大きさ
を表す判定領域を作成し、判定領域が上記表示可能領域
内に入るように変形後の画像データの表示位置を決定す
るようにしているので、変形後の画像データが予期せぬ
位置に表示されるという不具合が生じない。また、始め
から構成パーツの変形の範囲を限定することなく、変形
した後にその構成パーツの表示位置を検出して補正して
いるので、変形の機能を極限まで利用することができ
る。さらに、多角形分割変形法等の複雑な変形を用いて
も、その表示位置を的確に検出することができ、不具合
なくかつ変化に富んだアニメーション、ゲーム等のキャ
ラクタを作成することができる。According to the present invention, a displayable area in which image data to be deformed can be displayed is set, and each time the image data is deformed, a determination indicating the size of the deformed image data is made. Since the area is created and the display position of the transformed image data is determined so that the judgment area falls within the displayable area, the transformed image data is displayed at an unexpected position. Does not occur. Moreover, since the display position of the component is detected and corrected after the deformation without limiting the range of deformation of the component from the beginning, the function of the deformation can be utilized to the maximum. Further, even if a complicated transformation such as a polygonal division transformation method is used, the display position can be accurately detected, and a character such as an animation or a game can be created without trouble and rich in variation.
【図1】本発明による画像表示位置決定方法の原理を説
明する図である。FIG. 1 is a diagram illustrating the principle of an image display position determining method according to the present invention.
【図2】本発明に係る画像表示位置決定方法を実現する
画像表意位置決定装置の一実施例の構成を示すブロック
図である。FIG. 2 is a block diagram showing a configuration of an embodiment of an image ideographic position determining apparatus that realizes an image display position determining method according to the present invention.
【図3】同実施例の記憶装置に記憶されている各構成パ
ーツのデータを説明するための図である。FIG. 3 is a diagram for explaining data of each component stored in the storage device of the embodiment.
【図4】同実施例のCPUの内部レジスタに記憶される
座標データを説明するための図である。FIG. 4 is a diagram for explaining coordinate data stored in an internal register of the CPU of the same embodiment.
【図5】同実施例のイニシャル処理を示すフローチャー
トである。FIG. 5 is a flowchart showing an initial process of the embodiment.
【図6】同実施例のメインプログラムを示すフローチャ
ートである。FIG. 6 is a flowchart showing a main program of the embodiment.
【図7】同実施例の判定表示処理のサブルーチンを示す
フローチャートである。FIG. 7 is a flowchart showing a subroutine of determination display processing of the same embodiment.
【図8】同実施例の画像の変形例を示す図である。FIG. 8 is a diagram showing a modified example of the image of the embodiment.
31 CPU(表示可能領域設定手段、変形手段、判定
領域作成手段、画像位置決定手段、演算手段) 31a 内部レジスタ(格納手段) 32 入力操作子 32a 構成パーツ選択スイッチ(構成パーツ選択手
段) 32b 変形スイッチ(変形指示手段) 32c 移動スイッチ(移動指示手段) 33 記憶装置(記憶手段) 34 VDP 35 VRAM 36 TVディスプレイ C 表示可能範囲(表示可能領域) D,E 矩形(判定領域)31 CPU (displayable area setting means, deforming means, determination area creating means, image position determining means, arithmetic means) 31a internal register (storing means) 32 input operator 32a constituent part selection switch (constituent part selecting means) 32b deforming switch (Deformation instruction means) 32c Movement switch (movement instruction means) 33 Storage device (storage means) 34 VDP 35 VRAM 36 TV display C Displayable range (displayable area) D, E rectangle (determination area)
Claims (16)
表示可能領域を設定し、 前記画像データの変形が行われる度に、変形後の画像デ
ータの大きさを表す判定領域を作成し、 前記判定領域が前記表示可能領域内に入るように前記画
像データの表示位置を決定することを特徴とする画像表
示位置決定方法。1. A displayable region capable of displaying image data to be transformed is set, and a determination region representing the size of the transformed image data is created each time the image data is transformed, A method for determining an image display position, characterized in that the display position of the image data is determined so that a determination area is within the displayable area.
表示可能領域を設定し、 前記画像データの移動が行われる度に、移動後の画像デ
ータの大きさを表す判定領域を作成し、 前記判定領域が前記表示可能領域内に入るように前記画
像データの表示位置を決定することを特徴とする画像表
示位置決定方法。2. A displayable area capable of displaying image data to be moved is set, and a determination area representing the size of the image data after the movement is created each time the image data is moved, A method for determining an image display position, characterized in that the display position of the image data is determined so that a determination area is within the displayable area.
定領域は変形後の画像データを全て含む最小の矩形であ
ることを特徴とする請求項1又は2記載の画像表示位置
決定方法。3. The image display position determining method according to claim 1, wherein the displayable area is a rectangle, and the determination area is a minimum rectangle including all image data after transformation.
定領域は変形後の画像データを全て含む最小の矩形より
も小さい矩形であることを特徴とする請求項1又は2記
載の画像表示位置決定方法。4. The image display position according to claim 1, wherein the displayable area is a rectangle, and the determination area is a rectangle smaller than a minimum rectangle including all image data after transformation. How to decide.
2点のXY座標によって表わすことを特徴とする請求項
3又は4記載の画像表示決定方法。5. The image display determination method according to claim 3, wherein the displayable area is represented by XY coordinates of at least two diagonal points.
によって表わすことを特徴とする請求項3又は4記載の
画像表示決定方法。6. The image display determination method according to claim 3, wherein the determination area is represented by XY coordinates of four diagonal points.
の構成パーツの各々であることを特徴とする請求項1又
は2記載の画像表示決定方法。7. The image display determining method according to claim 1, wherein the image data is each of a plurality of constituent parts that form an image.
配列形式の画像データを有する変形対象を、複数の小多
角形に分割し、 この各小多角形を所定の変形処理に従って異なる小多角
形に変形するデータに基づいて、前記分割された各小多
角形を異なる小多角形に変形する多角形分割変形法を用
いることを特徴とする請求項1記載の画像表示位置決定
方法。8. In the process of transforming image data, a transform target having image data in a bit array format is divided into a plurality of small polygons, and each of these small polygons is transformed into different small polygons according to a predetermined transforming process. 2. The image display position determining method according to claim 1, wherein a polygon division deformation method is used that deforms each of the divided small polygons into different small polygons based on the data to be deformed.
表示可能領域を設定する表示可能領域設定手段と、 所定の変形処理に従って前記画像データを変形する変形
手段と、 前記変形手段によって前記画像データが変形される度
に、変形後の画像データの大きさを表す判定領域を作成
する判定領域作成手段と、 前記変形手段によって前記画像データが変形される度
に、前記判定領域作成手段によって作成された判定領域
が前記表示可能領域内に入るように前記画像データの表
示位置を決定する画像位置決定手段とを具備することを
特徴とする画像表示位置決定装置。9. A displayable area setting means for setting a displayable area capable of displaying image data to be deformed, a deforming means for deforming the image data according to a predetermined deformation process, and the image data by the deforming means. Each time the image data is deformed, a determination region creating unit that creates a determination region representing the size of the image data after the deformation; and each time the image data is deformed by the deforming unit, the determination region creating unit creates the determination region. An image display position determining device for determining the display position of the image data so that the determination region falls within the displayable region.
て、所定の移動処理に従って画像データの座標を移動
し、該画像データの表示位置を変更する移動手段を備
え、 前記判定領域作成手段は、前記移動手段によって前記画
像データが移動させられる度に、移動後の画像データの
大きさを表す判定領域を作成し、 画像位置決定手段は、前記移動手段によって前記画像デ
ータが移動させられる度に、前記判定領域作成手段によ
って作成された判定領域が前記表示可能領域内に入るよ
うに前記画像データの表示位置を決定することを特徴と
する請求項9記載の画像表示位置決定装置。10. A moving means for moving the coordinates of the image data according to a predetermined moving process to change the display position of the image data while keeping the shape of the image data as it is, Each time the image data is moved by the moving means, a determination region representing the size of the image data after the movement is created, and the image position determining means, the image data is moved every time the image data is moved by the moving means. 10. The image display position determining device according to claim 9, wherein the display position of the image data is determined so that the determination region created by the determination region creating means falls within the displayable region.
画像データの大きさを表わすピクセル数と、前記画像デ
ータの表示可能領域を表わす座標と、前記画像データの
初期配置座標とを記憶する記憶手段と、 前記記憶手段に記憶された前記ピクセル数および前記初
期配置座標に従って、前記画像データの表示位置を表わ
す表示座標を算出し、前記表示座標および前記ピクセル
数に従って、前記判定領域を表わす判定領域座標を算出
する演算手段と、 前記演算手段によって算出された前記表示座標および判
定領域座標を格納する格納手段とを備えることを特徴と
する請求項9又は10記載の画像表示位置決定装置。11. Storage means for storing image data in a bit array format, the number of pixels representing the size of the image data, coordinates representing a displayable area of the image data, and initial placement coordinates of the image data. And calculating display coordinates representing the display position of the image data according to the number of pixels and the initial arrangement coordinates stored in the storage means, and determining region coordinates representing the determination region according to the display coordinates and the number of pixels. The image display position determining device according to claim 9 or 10, further comprising: a calculating unit that calculates a value and a storage unit that stores the display coordinates and the determination area coordinates calculated by the calculating unit.
の構成パーツの各々であって、前記複数の構成パーツの
うち、処理対象となる構成パーツを選択する構成パーツ
選択手段を備えることを特徴とする請求項9又は10記
載の画像表示位置決定装置。12. The image data is each of a plurality of constituent parts that form an image, and a constituent part selection unit that selects a constituent part to be processed among the plurality of constituent parts is provided. The image display position determination device according to claim 9 or 10.
された構成パーツに対する移動、および移動方向を指示
する移動指示手段を備えることを特徴とする請求項12
記載の画像表示位置決定装置。13. The apparatus according to claim 12, further comprising movement instruction means for instructing a movement and a movement direction with respect to the constituent part selected by the constituent part selecting means.
The image display position determination device described.
された構成パーツに対する変形を指示する変形指示手段
を備えることを特徴とする請求項12記載の画像表示位
置決定装置。14. The image display position determining apparatus according to claim 12, further comprising deformation instruction means for instructing deformation of the constituent part selected by the constituent part selecting means.
像データを有する変形対象を、複数の小多角形に分割
し、この各小多角形を所定の変形処理に従って異なる小
多角形に変形するデータに基づいて、前記分割された各
小多角形を異なる小多角形に変形することを特徴とする
請求項9記載の画像表示位置決定装置。15. The transforming means divides a transform target having image data in a bit array format into a plurality of small polygons, and transforms each of these small polygons into different small polygons according to a predetermined transforming process. 10. The image display position determining apparatus according to claim 9, wherein each of the divided small polygons is transformed into a different small polygon based on the above.
後の画像データを表示する表示手段を、さらに有するこ
とを特徴とする請求項9記載の画像表示位置決定装置。16. The image display position determining device according to claim 9, further comprising display means for displaying the image data after the deformation which is deformed by the deforming means.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP35086593A JP3473079B2 (en) | 1993-12-30 | 1993-12-30 | Image display position determining method and apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP35086593A JP3473079B2 (en) | 1993-12-30 | 1993-12-30 | Image display position determining method and apparatus |
Publications (2)
Publication Number | Publication Date |
---|---|
JPH07200866A true JPH07200866A (en) | 1995-08-04 |
JP3473079B2 JP3473079B2 (en) | 2003-12-02 |
Family
ID=18413417
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP35086593A Expired - Fee Related JP3473079B2 (en) | 1993-12-30 | 1993-12-30 | Image display position determining method and apparatus |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3473079B2 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7295221B2 (en) | 1997-10-23 | 2007-11-13 | Canon Kabushiki Kaisha | Image processing apparatus and method, and computer-readable memory |
-
1993
- 1993-12-30 JP JP35086593A patent/JP3473079B2/en not_active Expired - Fee Related
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7295221B2 (en) | 1997-10-23 | 2007-11-13 | Canon Kabushiki Kaisha | Image processing apparatus and method, and computer-readable memory |
Also Published As
Publication number | Publication date |
---|---|
JP3473079B2 (en) | 2003-12-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR900006042B1 (en) | Display control device for compound document processing device | |
JP2003330102A (en) | Method and program for correcting distortion of projected image and projection type video display device | |
US4529978A (en) | Method and apparatus for generating graphic and textual images on a raster scan display | |
JPH0628438A (en) | Drawing processing system | |
US5068803A (en) | Method and apparatus for filling contours in digital typefaces | |
JP3473079B2 (en) | Image display position determining method and apparatus | |
EP0062669B1 (en) | Graphic and textual image generator for a raster scan display | |
JP2868666B2 (en) | Electronic typesetting device for typesetting along any line | |
JP3433763B2 (en) | Region inside / outside determination method and computer game machine using the same | |
US5995674A (en) | Image processing apparatus with shape-correction of a contour-specified figure | |
JPH1021377A (en) | Image processor | |
JP2611198B2 (en) | Image processing device | |
JP3861463B2 (en) | Image display control method and apparatus | |
JPH0721397A (en) | Paint-out plotting method for polygon | |
JP3533472B2 (en) | Image deformation method and apparatus | |
JPH09190538A (en) | Picture processor and its processing method | |
JPH04373084A (en) | Character/graphic deformation processing device | |
JP3551459B2 (en) | Image deformation method and apparatus | |
JPH07200806A (en) | Image deforming method/device | |
JPH07320077A (en) | Area specifying device | |
JP2746981B2 (en) | Figure generation method | |
JPH0231393B2 (en) | ||
JP2004086479A (en) | Information processor for displaying graphic, information processing method, program for realizing same method, and recording medium with its program recorded | |
JPH06110442A (en) | Character and figure processor and method for deforming character of figure | |
JPH05143053A (en) | Word processor provided with enlarging and smoothing function |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
FPAY | Renewal fee payment (prs date is renewal date of database) |
Year of fee payment: 4 Free format text: PAYMENT UNTIL: 20070919 |
|
FPAY | Renewal fee payment (prs date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20080919 Year of fee payment: 5 |
|
LAPS | Cancellation because of no payment of annual fees |