JP2012073857A - Image processing program and image processor - Google Patents
Image processing program and image processor Download PDFInfo
- Publication number
- JP2012073857A JP2012073857A JP2010218666A JP2010218666A JP2012073857A JP 2012073857 A JP2012073857 A JP 2012073857A JP 2010218666 A JP2010218666 A JP 2010218666A JP 2010218666 A JP2010218666 A JP 2010218666A JP 2012073857 A JP2012073857 A JP 2012073857A
- Authority
- JP
- Japan
- Prior art keywords
- input point
- image
- input
- line
- image processing
- 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
Images
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Graphics (AREA)
- User Interface Of Digital Computer (AREA)
- Processing Or Creating Images (AREA)
- Image Generation (AREA)
- Computer Hardware Design (AREA)
- General Engineering & Computer Science (AREA)
- Software Systems (AREA)
Abstract
Description
本発明は、ポインティングデバイスによる画面上の入力点の移動軌跡を、画面に表示される仮想の三次元空間内に描画する画像処理プログラム、及び画像処理装置に関する。 The present invention relates to an image processing program and an image processing apparatus for drawing a movement locus of an input point on a screen by a pointing device in a virtual three-dimensional space displayed on the screen.
従来、タブレット(又はタッチパネル)及びスタイラス等のポインティングデバイスを備えるゲーム装置において、スタイラスによるタブレット又はタッチパネル上の入力点の移動軌跡を、単なる均等幅の実線状に描画するのではなく、入力操作に応じて線種を変えて描画するものがある。例えば、特許文献1の場合では、タブレットに対してスタイラスで入力するときの押圧力に基づいて、軌跡の太さを変化させている。また、スタイラスによる入力点の所定時間間隔毎の座標を検出し、隣り合う入力点の距離に応じて、軌跡の濃淡を調整している。
Conventionally, in a game apparatus including a tablet (or touch panel) and a pointing device such as a stylus, a movement locus of an input point on the tablet or touch panel by the stylus is not drawn in a simple solid line but according to an input operation. Some of them draw with different line types. For example, in the case of
また、特許文献2の場合では、スタイラスによるタッチパネルの入力点の移動速度に応じて、軌跡の太さ及び掠れ具合を変更するようにしている。具体的には、入力点の移動速度に応じて、軌跡を描画するための描画パターンの大きさを変更することにより、軌跡の太さを変更させている。また、描画パターンを構成するドットのうち、水平又は垂直方向に沿って位置する一部のドットに設定する色情報を、入力点の移動速度に応じて、背景色と同一色又は類似色にするようにしている。
In the case of
ところで、プレイヤによるスタイラスの操作は様々であり、入力点を比較的高速で移動させる場合もある。従って、軌跡をより速く描画できるようにすることが好ましい。しかしながら、上記特許文献1,2は何れも二次元のビットマップ画像自身を、押圧力又は移動速度に応じて加工し、加工後の画像を用いて描画するものであるため、より高速に描画しようとすると、コンピュータの演算部の処理負担が比較的大きくなってしまう。また、このような傾向は、近年の表示デバイスの画面解像度の向上に伴ってより顕著になってきている。
By the way, there are various stylus operations by the player, and the input point may be moved at a relatively high speed. Therefore, it is preferable that the trajectory can be drawn more quickly. However, since both of
また、上記の描画速度の点に加えて特許文献1,2には、次のような課題も存在する。即ち、特許文献1の場合、軌跡の太さを変化させるためには、スタイラスによる押圧力を検知することが必要であるため、その発明は圧力センサを備えるデバイスに限定されるという課題がある。また、特許文献2の場合、水平又は垂直方向への軌跡でしか掠れ具合を表現できず、斜め方向の軌跡について十分な掠れ具合を表現できないという課題がある。
In addition to the above drawing speed,
そこで本発明は、ポインティングデバイスによる画面上の入力点の移動軌跡を、高速で描画することができる画像処理プログラム、及び画像処理装置を提供することを目的とする。また、圧力センサを必要とせずに軌跡の太さ(幅寸法)を変化させることができ、また、軌跡の方向にかかわらず掠れ具合を表現することができる画像処理プログラム、及び画像処理装置を提供することを目的とする。 SUMMARY An advantage of some aspects of the invention is that it provides an image processing program and an image processing apparatus capable of drawing a moving locus of an input point on a screen by a pointing device at high speed. Also provided are an image processing program and an image processing apparatus that can change the thickness (width dimension) of a trajectory without the need for a pressure sensor and can express the degree of drowning regardless of the direction of the trajectory. The purpose is to do.
本発明に係る画像処理プログラムは、コンピュータを、表示部の画面に表示される仮想の三次元空間を生成する仮想空間生成手段、ポインティングデバイスによる前記画面上の入力点の位置情報を取得する入力位置取得手段、及び前記入力点が画面上を移動した場合に、移動経路上の前記入力点の前記位置情報に基づき、前記三次元空間内に前記移動経路を示す軌跡線を描画する軌跡線描画手段、として機能させ、該軌跡線描画手段は、前記入力点の移動速度に応じて前記軌跡線の線種を変化させる。 An image processing program according to the present invention includes a computer, a virtual space generation unit that generates a virtual three-dimensional space displayed on a screen of a display unit, and an input position that acquires position information of an input point on the screen by a pointing device An acquisition unit and a locus line drawing unit that draws a locus line indicating the movement path in the three-dimensional space based on the position information of the input point on the movement path when the input point moves on the screen. The trajectory line drawing means changes the line type of the trajectory line according to the moving speed of the input point.
また、前記軌跡線描画手段は、前記軌跡線の線種として、前記軌跡線の幅寸法、模様、及び色彩のうち少なくとも1つを、前記入力点の移動速度に応じて変化させるように構成されていてもよい。 The locus line drawing means is configured to change at least one of a width dimension, a pattern, and a color of the locus line according to a moving speed of the input point as a line type of the locus line. It may be.
また、前記軌跡線描画手段は、前記三次元空間内にて前記軌跡線をポリゴンで形成し、該ポリゴンを形成する頂点の位置を前記入力点の移動速度に応じて設定することにより、前記軌跡線の幅寸法を変化させるように構成されていてもよい。 The trajectory line drawing means forms the trajectory line with a polygon in the three-dimensional space, and sets the position of the vertex that forms the polygon according to the moving speed of the input point. You may be comprised so that the width dimension of a line may be changed.
また、前記軌跡線描画手段は、前記入力点の移動速度が相対的に大きい場合は、前記軌跡線の幅寸法を相対的に小さくするように構成されていてもよい。 The locus line drawing means may be configured to relatively reduce the width dimension of the locus line when the moving speed of the input point is relatively large.
また、前記軌跡線描画手段は、前記三次元空間内にて前記軌跡線をポリゴンで形成し、模様及び色彩のうち少なくとも1つに変化を有するイメージ画像から、前記入力点の移動速度に応じて選択した部分画像であるテクスチャを前記ポリゴンに貼り付けることにより、前記軌跡線の模様及び色彩のうち少なくとも1つを変化させるように構成されていてもよい。 The trajectory line drawing means forms the trajectory line as a polygon in the three-dimensional space, and changes an at least one of a pattern and a color according to the moving speed of the input point. The texture which is the selected partial image may be pasted on the polygon to change at least one of the pattern and color of the locus line.
また、前記イメージ画像は、高明度色の部分及び低明度色の部分がまだら状に混在する中間領域と、前記高明度色の部分の密度が相対的に大きい高明度領域と、前記低明度色の部分の密度が相対的に大きい低明度領域とを含む、模様に変化を有する画像であり、前記軌跡線描画手段は、前記入力点の移動速度が相対的に大きい場合は、前記低明度領域をより広く含むように前記テクスチャを選択し、前記入力点の移動速度が相対的に小さい場合は、前記高明度領域をより広く含むように前記テクスチャを選択するように構成されていてもよい。 Further, the image includes an intermediate region in which a high lightness color portion and a low lightness color portion are mixed in a mottled manner, a high lightness region in which the density of the high lightness color portion is relatively high, and the low lightness color. And a low-lightness area having a relatively high density, and the locus line drawing means has the low-lightness area when the moving speed of the input point is relatively high. When the texture is selected so as to include a wider area, and the moving speed of the input point is relatively small, the texture may be selected so as to include the high brightness area more widely.
本発明に係る画像処理装置は、上述した何れかに記載の画像処理プログラムを記録したプログラム記憶部、及び、該プログラム記憶部に記憶されたゲームプログラムを実行するコンピュータ、を備える画像処理装置である。 An image processing apparatus according to the present invention is an image processing apparatus including a program storage unit that records any one of the image processing programs described above and a computer that executes a game program stored in the program storage unit. .
本発明によれば、ポインティングデバイスによる画面上の入力点の移動軌跡を、より高速に描画することができる画像処理プログラム、及び画像処理装置を提供することができる。 ADVANTAGE OF THE INVENTION According to this invention, the image processing program and image processing apparatus which can draw the movement locus | trajectory of the input point on the screen by a pointing device at higher speed can be provided.
以下、本発明の実施の形態に係る画像処理プログラム、及び画像処理装置について、図面を参照しつつ説明する。なお、以下では、画像処理装置としてゲーム装置を例示するが、本発明はゲーム装置以外の画像処理装置にも適用することができる。また、本ゲーム装置にてプレイするゲームとして、プレイヤがプレイヤキャラクタを操作し、敵キャラクタとの戦闘や謎の解明を行いながらゲームを進めていくアドベンチャーゲームを例にして説明する。また、本ゲームでは、ゲーム装置が備えるタッチパネルに、プレイヤがタッチペンを使って線状の入力を行った場合に、ゲーム中で特殊効果を発動させることができるものである。但し、本発明はこのような種類のゲームへの適用に限定されるわけではなく、アクションゲーム及びロールプレイングゲームを含む他のゲームにも適用可能である。 Hereinafter, an image processing program and an image processing apparatus according to embodiments of the present invention will be described with reference to the drawings. In the following, a game device is exemplified as the image processing device, but the present invention can also be applied to an image processing device other than the game device. Further, as an example of a game to be played on this game apparatus, an adventure game in which a player operates a player character and advances the game while solving a battle with an enemy character and solving a mystery will be described as an example. In this game, a special effect can be activated in the game when the player performs a linear input using a touch pen on the touch panel provided in the game apparatus. However, the present invention is not limited to application to this kind of game, and can be applied to other games including action games and role-playing games.
[ハードウェアの構成]
図1は、本発明の実施の形態に係るゲーム装置1の外観構成を示す正面図である。図1に示すように、ゲーム装置1は携帯型であって、横長の薄型直方体形状を成す下側本体2と、同様の直方体形状を成す上側本体3とを備えている。下側本体2の上辺部分と上側本体3の下辺部分との間にはヒンジ4が架設されており、下側本体2及び上側本体3は、このヒンジ4を通る左右方向の軸回りに相対的に回動可能になっている。従って、下側本体2の前面と上側本体3の前面とが対向するように閉じたり、その状態から図1に示す状態に開いたりすることができる。
[Hardware configuration]
FIG. 1 is a front view showing an external configuration of
各本体2,3に設けられたデバイスについて概説すると、まず下側本体2の前面中央部には、例えば半透過型カラー液晶ディスプレイで構成された長方形状の第1ディスプレイ(表示部の画面)6が設けられている。この第1ディスプレイ6の左側には、電源ボタン7と十字キー8とが上下に配設され、右側には、2つのボタンを含む操作ボタン9と、A,B,X,Yの4つのボタンを含む操作ボタン10とが上下に配設されている。また、操作ボタン10の下方には電源のオン/オフ状態を示す表示灯11が設けられている。更に、下側本体2の左上角部分にはLボタン12が配設され、右上角部分にはRボタン13が配設されている。一方、上側本体3の前面中央部には、例えば半透過型カラー液晶ディスプレイで構成された長方形状の第2ディスプレイ15が設けられ、その左右には、スピーカ16が配設されている。
The device provided in each of the
なお、図1には図示しないが、下側本体2の上辺部分であって、ゲーム装置1を開いたときの上側本体3の背面側の部分には、本実施の形態に係るゲームプログラム(画像処理プログラム)50a等を記録したゲームメディア50を挿脱可能なメディアインタフェース(図3のメディアインタフェース44参照)が設けられている。また、上述した下側本体2に設けられたデバイスと上側本体3に設けられたデバイスとは、ヒンジ4の近傍に設けられた多導線の帯状ケーブル5を介して電気的に接続されている。
Although not shown in FIG. 1, a game program (image) according to the present embodiment is provided on the upper side portion of the lower
また、ゲーム装置1はポインティングデバイス20を備えている。具体的には、下側本体2に設けられた第1ディスプレイ6の表面には、透明のタッチパネル14が設けられており、これとゲーム装置1に付属するタッチペン17とで、ポインティングデバイス20が構成されている。タッチパネル14は、第1ディスプレイ6の画面(表示面)の全面と略同一の形状及び寸法を有する横長の長方形状を成しており、周知のように、プレイヤがタッチペン17を操作し、そのペン先がタッチパネル14の表面に接触すると、接触点(入力点)の位置情報(座標)を、後述のCPU(図3のCPU31参照)へ出力するものである。
In addition, the
より具体的に説明すると、図2に示すように、タッチパネル14には、左下隅を原点として上方向へ延びるu軸と右方向へ延びるv軸とを有するuv座標系が設定されており、第1ディスプレイ6上の各ドットの位置に対応する座標(u,v)が定義されている。また、タッチパネル14にはセンサが備えられており、タッチペン17のペン先をタッチパネル14に接触させる入力操作を行うと、その入力点(接触点)Pに対応する座標(u,v)を示す情報(位置情報)がセンサによって取得され、CPU31へ出力されるようになっている。
More specifically, as shown in FIG. 2, the
図3は、ゲーム装置1の内部構成を示すブロック図である。ここに示すように、ゲーム装置1は制御部30を備えており、該制御部30は、CPU31、描画処理プロセッサ32、音声処理プロセッサ33、入力信号処理部34、RAM(Random Access Memory)35、及びROM(Read Only Memory)36を含んでいる。更にゲーム装置1は、この他にもVRAM(Video-RAM)40、D/A(Digital- Analog)変換器41、上記第1ディスプレイ6及び第2ディスプレイ15、アンプ42、上記スピーカ16、上記タッチパネル14、操作部43(上記電源ボタン7、十字キー8、操作ボタン9,10、Lボタン12、Rボタン13を含む)、メディアインタフェース44、及びバス45を備えている。そして、これらのうちCPU31、描画処理プロセッサ32、音声処理プロセッサ33、入力信号処理部34、RAM35、ROM36、操作部43、及びメディアインタフェース44は、バス45によって相互にデータ伝送可能に接続されている。
FIG. 3 is a block diagram showing an internal configuration of the
このうち操作部43は、図1に示した十字キー8、操作ボタン9,10、Lボタン12、及びRボタン13を含む操作子であり、プレイヤの操作を受け付けて、その操作内容(押圧入力の有無)に応じた操作信号をCPU31へ入力する。また、操作部43には操作子以外に電源ボタン7も含まれており、該電源ボタン7が操作されると、各部に電力が供給されてゲーム装置1が起動し、各操作子への操作入力が有効になる。
Of these, the
メディアインタフェース44は、ゲーム装置1の外部から接続された記録媒体であるゲームメディア50にアクセスして、これに記憶されたゲームプログラム50a及びゲームデータ50bを読み出す。ゲームプログラム50aは、ゲーム装置1にてプレイするアクションゲームを実行させるプログラムであり、ゲームデータ50bは、上記ゲームを実行する上で必要なデータであって、例えば各登場キャラクタや背景の画像データ、ステータスなどの情報表示用の画像データ、効果音やBGMなどの音声データ、文字や記号によるメッセージデータ等が含まれる。なお、ゲームメディア50は、半導体メモリや、光ディスクの一種であるUMD(Universal Media Disc)(登録商標)などを採用することができる。
The
RAM35には、ゲームの進行に応じてゲームメディア50から読み込まれたゲームプログラム50a及びゲームデータ50bを格納するロードエリア、並びに、CPU31がゲームプログラム50aを処理する際に使用するためのワークエリアが設定されている。ROM36には、ゲームメディア50に記憶されているゲームプログラム50a及びゲームデータ50bの読み出し処理を制御するプログラムなど、ゲーム装置1を動作させるための基本プログラムが記憶されている。
In the
入力信号処理部34は、プレイヤがタッチパネル14に対してタッチペン17のペン先を接触させる入力操作を行った場合に、その入力点(接触点)Pのタッチパネル14上の座標(u,v)に基づいて入力点Pの位置情報を検出し、該位置情報を示す信号をCPU31へ出力する。また、入力点Pの位置情報の検出は、所定のサンプリング周期(例えば、1/60秒間に4回など)で実行しており、各回で検出した位置情報を示す信号を逐次CPU31へ出力するようになっている。
When the player performs an input operation for bringing the pen tip of the
CPU31は、ゲームメディア50に記録されているゲームプログラム50a及びゲームデータ50bの全部または一部を、メディアインタフェース44を通じてRAM35に読み込み、プレイヤによるタッチパネル14又は操作部43に対する操作入力に応じてこれを実行し、ゲーム進行を制御する。より具体的には、プレイヤに操作されることによってタッチパネル14又は操作部43から信号が入力されると、CPU31は、ゲームプログラム50aに従ってその操作信号に対応する所定のゲーム進行処理を行い、その処理結果を、ゲーム進行を示す画像(以下、「ゲーム画像」とも称する)として第1ディスプレイ6又は第2ディスプレイ15に表示すると共に、ゲーム進行を示す音声信号(以下、「ゲーム音声」とも称する)をスピーカ16に出力する。
The
上記ゲーム画像の描画は、CPU31の指示により、描画処理プロセッサ32が行う。即ち、CPU31は、タッチパネル14又は操作部43から入力された信号に基づき、第1ディスプレイ6又は第2ディスプレイ15に表示すべきゲーム画像の内容を決定し、その内容に対して必要な描画データを描画処理プロセッサ32に生成させる。描画処理プロセッサ32は、生成した描画データに基づいて更にゲーム画像を生成し、このゲーム画像をVRAM40に書き込む。D/A変換器41は、VRAM40から出力されたゲーム画像を順次アナログ信号に変換し、第1ディスプレイ6又は第2ディスプレイ15へ出力(表示)する。
Drawing of the game image is performed by the drawing
また、CPU31は、ゲームの進行に応じて、スピーカ16から出力すべき効果音やBGM等の音声を決定し、その音声を発音するための音声データをRAM35から読み出して音声処理プロセッサ32に入力する。即ち、CPU31は、ゲームの進行に伴って発音イベントが発生すると、その発音イベントに応じた音声データ(ゲームメディア50からロードされた音声データ)をRAM35から読み出して音声処理プロセッサ32に入力する。音声処理プロセッサ32は、DSP(Digital Signal Processor)で構成されており、CPU31によって入力された音声データに対して所定の効果(例えば、リバーブ、コーラスなど)を付与したのちアナログ信号に変換して、アンプ42に出力する。アンプ42は、音声処理プロセッサ32から入力された音声信号を増幅したのちスピーカ16に出力する。
Further, the
[制御部の機能的構成]
図4は、ゲーム装置1が備える制御部30の機能的な構成を示すブロック図である。ゲーム装置1の制御部30は、ゲームメディア50から読み込んだゲームプログラム50a及びゲームデータ50bを実行することにより、ゲーム進行制御手段30a、仮想空間生成手段30b、入力位置取得手段30c、及び軌跡線描画手段30dなどの機能を発揮する。
[Functional configuration of control unit]
FIG. 4 is a block diagram illustrating a functional configuration of the
このうちゲーム進行制御手段30aは、プレイヤによるタッチパネル14又は操作部43の操作等に応じて本ゲームを進行させるものであり、プレイヤキャラクタC(図5参照)や敵キャラクタの行動も制御している。仮想空間生成手段30bは、プレイヤが操作するプレイヤキャラクタや敵キャラクタが行動する仮想の三次元空間である仮想ゲーム空間51(図5参照)を生成するものである。
Among these, the game progress control means 30a advances this game according to the operation of the
図5は、仮想ゲーム空間51を説明するための模式図である。図5に示すように、仮想ゲーム空間51は、例えば平坦な地面上の空間として設定されているが、この他にも水中や空中の空間を含んでいてもよい。プレイヤキャラクタCは、このような仮想ゲーム空間51内にてプレイヤの操作に応じて行動する。また、仮想ゲーム空間51内には仮想カメラを成す仮想視点52が設定されており、該仮想視点52から仮想ゲーム空間51を撮影したときのゲーム画像が、第1ディスプレイ6又は第2ディスプレイ15に表示される。
FIG. 5 is a schematic diagram for explaining the
即ち、図5に示すように、プレイヤキャラクタCが存在している仮想ゲーム空間51には、所定の位置に仮想視点52が設定されており、該仮想視点52は、ゲーム進行に応じて適宜移動し、プレイヤキャラクタCを画像内に含むように向けられている。更に、この仮想視点52とプレイヤキャラクタCとの間の所定位置には、タッチパネル14と相似形状を成すスクリーン53が設定されている。そして、仮想視点52から撮影した三次元の仮想ゲーム空間51を、スクリーン53に透視投影することにより、二次元画像が得られる。
That is, as shown in FIG. 5, a
また、スクリーン53には、タッチパネル14と同様に、左下隅を原点として上方向へ延びるu軸と右方向へ延びるv軸とを有するuv座標系が設定されており、スクリーン53上の任意の点に対応する座標(u,v)が定義されている。従って、スクリーン53に透視投影された二次元画像は、そのまま、第1ディスプレイ6又は第2ディスプレイ15に表示するゲーム画像とされる。図5では、スクリーン53に透視投影された二次元画像から生成したゲーム画像を第1ディスプレイ6に表示した様子を示している。なお、説明の便宜上、以下ではゲーム画像を第1ディスプレイ6に表示するものとして説明するが、もちろん、第2ディスプレイ15に表示させることも可能である。
Similarly to the
一方、図4の入力位置取得手段30cは、プレイヤによるタッチペン17の操作によりタッチパネル14上の任意の点に入力があった場合に、その入力点Pの座標(u,v)に基づいて該入力点Pの位置情報を取得するものである。また、軌跡線描画手段30dは、プレイヤがタッチペン17のペン先でタッチパネル14の表面をなぞるように入力操作した場合に、ペン先の移動経路上の各入力点Pの位置情報に基づき、該移動経路を表現する軌跡線を仮想ゲーム空間51内に生成し、更にこの軌跡線を第1ディスプレイ6等にて描画させるものである。
On the other hand, the input position acquisition means 30c shown in FIG. 4 performs input based on the coordinates (u, v) of the input point P when an input is made at an arbitrary point on the
より具体的に説明すると、タッチパネル14上にタッチペン17のペン先を接触させる入力操作があると、その入力点Pについて、タッチパネル14上の座標(u,v)が検出される。ここで、上述したように、タッチパネル14及びスクリーン53の双方には、互いに対応するuv座標系が設定されているため、タッチパネル14上の入力点Pの座標(u,v)に基づいて、スクリーン53上にて前記入力点Pに対応する座標(u,v)を取得することができる。
More specifically, when there is an input operation for bringing the tip of the
更に、図5に示すように、仮想ゲーム空間51には、スクリーン53のuv座標系とは別に三次元のxyz座標系が設定されており、仮想ゲーム空間51内の任意の位置が座標(x,y,z)により定義されている。そして、上述したようにして取得したスクリーン53上の入力点Pに対応する座標(u,v)は、制御部30の入力位置取得手段30cにより三次元の座標(x,y,z)に変換される。このようにして、タッチパネル14上の入力点Pの位置情報は、仮想ゲーム空間51内の三次元の位置情報を示す座標(x,y,z)として取得される。
Further, as shown in FIG. 5, a three-dimensional xyz coordinate system is set in the
ここで、タッチパネル14の表面を、ペン先でなぞるようにタッチペン17を操作すると、ペン先によるタッチパネル14上の入力点Pが移動する。制御部30の入力位置取得手段30cは、この移動経路上の各入力点Pの座標(u,v)を上記のように座標(x,y,z)に変換して三次元の位置情報を取得する。軌跡線描画手段30dは、この三次元の位置情報に基づき、タッチパネル14上のペン先の移動経路Rを表現する軌跡線Tを三次元の仮想ゲーム空間51内に生成すると共に、この軌跡線Tを第1ディスプレイ6等に描画させる。
Here, when the
ところで、本ゲームの軌跡線描画手段30dは、上述したように軌跡線Tを描画するに際して、入力点Pの移動速度に応じて軌跡線Tの線種を変化させる。以下、軌跡線描画手段30dによって実行される、軌跡線Tの線種の変更処理を含む軌跡線描画処理の詳細を説明する。
By the way, the trajectory line drawing means 30d of this game changes the line type of the trajectory line T according to the moving speed of the input point P when drawing the trajectory line T as described above. Hereinafter, the details of the trajectory line drawing process including the process of changing the line type of the trajectory line T, which is executed by the trajectory
[軌跡線描画処理]
図6は、軌跡線描画手段30dによって実行される軌跡線描画処理の動作を示すフローチャートである。また、図7及び図8は、軌跡線描画処理において軌跡線Tの線種の設定手順を説明するための模式図であり、このうち図7は2つの入力点があった場合を示し、図8は3つの入力点があった場合を示している。また、これらの図6〜図8では、入力点Pに添え字N−2,N−1,Nなどを付して表示するが、この添え字は、各入力点Pの相対的な検出順序を示すものである。例えば、入力点PN−2,PN−1,PNは、この順番で検出されたものであることを示している。
[Track line drawing processing]
FIG. 6 is a flowchart showing the operation of the locus line drawing process executed by the locus line drawing means 30d. 7 and 8 are schematic diagrams for explaining the procedure for setting the line type of the trajectory line T in the trajectory line drawing process. Of these, FIG. 7 shows a case where there are two input points. 8 indicates a case where there are three input points. 6 to 8, the input points P are displayed with suffixes N-2, N-1, N, etc., and the suffixes indicate the relative detection order of the input points P. Is shown. For example, the input points P N−2 , P N−1 , and P N indicate that they are detected in this order.
なお、図6に示す軌跡線描画処理は毎フレーム実行されており、タッチペン17のペン先がタッチパネル14に接触すると、その後、ペン先が離れるまでの間(以下、「線入力操作期間」という)、この軌跡線描画処理によって軌跡線Tが描画される。また、以下では、軌跡線Tを毛筆風に描画する場合を例にして説明する。
The trajectory line drawing process shown in FIG. 6 is executed for each frame. When the pen tip of the
図6に示すように、軌跡線描画処理では、新たな入力点PNを取得した場合(ステップS1)に、その1つ前に取得した入力点PN−1が存在するか否かを判定する(ステップS2)。即ち、タッチペン17のペン先がタッチパネル14に接触していない状態からはじめて接触した場合、又は、既に接触している状態でペン先が移動され、先の入力点PN−1とは異なる位置にペン先がある場合に、「新たな入力点PN」を取得する(ステップS1)。この入力点PNについては、入力位置情報取得手段30cにより、そのタッチパネル14上の座標(u,v)が仮想ゲーム空間51内の三次元座標(x,y,z)を示す位置情報に変換されたものである。
As shown in FIG. 6, in the locus line drawing process, when a new input point PN is acquired (step S1), it is determined whether or not the input point PN-1 acquired immediately before is present. (Step S2). That is, when the pen tip of the
次に、1つ前の入力点PN−1が存在しない場合(ステップS2:NO)、即ち、タッチペン17のペン先がタッチパネル14に接触していない状態からはじめて接触した場合は、ステップS1の新たな入力点PNを、軌跡線Tの開始点として設定する(ステップS3)。一方、1つ前の入力点PN−1が存在する場合(ステップS2:YES)、即ち、既にペン先がタッチパネル14に接触している状態でペン先が移動され、先の入力点PN−1とは異なる位置にペン先がある場合は、入力点PNに対して2つ前の入力点PN−2が存在するか否かを判定する(ステップS4)。そして、入力点PN−2が存在しない場合には、ステップS5〜S7の処理が実行される。
Next, when the previous input point P N-1 does not exist (step S2: NO), that is, when the pen tip of the
なお、既にタッチパネル14にタッチペン17のペン先が接触している状態でペン先が移動された場合には、移動距離が所定の閾値以上である場合にのみ、移動先のペン先の接触点を新たな入力点PNとして取得するようにしてもよい。即ち、入力位置情報取得手段30cは、所定の周期で入力点PNの三次元座標を示す位置情報を逐次取得し、これを画像処理プロセッサ32に入力する。画像処理プロセッサ32は、この位置情報と過去に入力された位置情報とを比較し、各位置情報が示す三次元座標間の距離が所定の閾値以上のときのみ、新たに入力された位置情報に係る入力点PNを正式な入力点とし、閾値未満のときには、新たに入力された位置情報を破棄するようにしてもよい。これにより、ペン先の移動距離がごく短い場合には、その間のペン先の移動経路を表す軌跡線の描画を省略することができる。
In addition, when the pen tip is moved while the pen tip of the
ステップS5〜S7の処理について、図7も参照しつつ説明する。まず、入力点PN−2が存在しない状態では(ステップS4:NO)、2つの入力点PN−1,PNのみが存在しており、このうち先の入力点PN−1は、既にステップS1〜S3が実行されることによって軌跡線Tの開始点として設定されている。従って、入力点PN−2が存在しない状態(ステップS4:NO)とは、図7の工程100に示すように、開始点である入力点PN−1からペン先が移動した結果、次に新たな入力点PNが検出された状態である。そして、この場合、工程101に示すように、先の入力点PN−1の近傍に、ポリゴンを形成するための2つの頂点a,bのxyz座標を設定し、頂点a,bと終端点である入力点PNとにより画定される三角形状のポリゴンA1を生成する(図6のステップS5)。 The processing of steps S5 to S7 will be described with reference to FIG. First, in a state where the input point P N-2 does not exist (step S4: NO), only two input points P N-1 and P N exist, and the previous input point P N-1 is: The starting point of the locus line T is already set by executing steps S1 to S3. Therefore, the state where the input point PN-2 does not exist (step S4: NO) means that the pen point moves from the input point PN-1 as the start point as shown in step 100 of FIG. In this state, a new input point PN is detected. In this case, as shown in Step 101, the xyz coordinates of the two vertices a and b for forming the polygon are set in the vicinity of the previous input point PN-1 , and the vertices a and b and the end point are set. A triangular polygon A 1 defined by the input point P N is generated (step S5 in FIG. 6).
より具体的には、入力点PN,PN−1を結ぶ線分(即ち、移動経路R)に直交し、且つ、入力点PN−1を中間点とする所定の長さLを有する線分Labの両端位置に、頂点a,bを設定する。そして、頂点a,bに加えて入力点PNを1つの頂点とし、これら3つの頂点の座標により画定されるポリゴンA1を生成する(ステップS5)。そして、次に説明するようにして所定のイメージ画像からテクスチャを選択する(ステップS6)。その後、図7の工程102に示すように、ステップS5で生成したポリゴンA1の表面にステップS6で選択したテクスチャを貼り付ける(ステップS7)。 More specifically, it has a predetermined length L that is orthogonal to the line segment connecting the input points P N and P N-1 (that is, the movement route R) and has the input point P N-1 as an intermediate point. Vertices a and b are set at both end positions of the line segment Lab. Then, in addition to the vertices a and b, the input point PN is set as one vertex, and a polygon A 1 defined by the coordinates of these three vertices is generated (step S5). Then, as described below, a texture is selected from a predetermined image (step S6). Thereafter, as shown in step 102 of FIG. 7, pasting a texture selected in step S6 on the generated surface of the polygon A 1 in step S5 (step S7).
このテクスチャは、予め用意されたイメージ画像から選択された部分的な画像として取得される。図9(a)は、このイメージ画像を例示する模式図であり、特に、軌跡線Tを毛筆風に描画するために用いられる。また、図9(b)は、このイメージ画像からテクスチャを選択するステップS6の説明用の図面であり、図9(c)は、同じイメージ画像からテクスチャを選択する後述のステップS11の説明用の図面である。 This texture is acquired as a partial image selected from previously prepared image images. FIG. 9A is a schematic view illustrating this image image, and is particularly used for drawing the locus line T in a brush-like style. FIG. 9B is a diagram for explaining step S6 for selecting a texture from this image image, and FIG. 9C is a diagram for explaining step S11 described later for selecting a texture from the same image image. It is a drawing.
図9(a)に示すイメージ画像は、縦横夫々に例えば64ピクセルを有する正方形状の画像であって、左上隅を原点0として横方向のs軸(0<s<63)と、縦方向のt軸(0<t<63)とが設定されている。また、このイメージ画像は、模様に変化を有する画像となっている。具体的には、高明度色(例えば、黒色)の部分及び低明度色(例えば、白色)の部分がまだら状に混在する中間領域62と、低明度色の部分の密度が相対的に大きい(即ち、全体的に白っぽい)低明度領域61と、高明度色の部分の密度が相対的に大きい(即ち、全体的に黒っぽい)高明度領域63とを含んでいる。
The image shown in FIG. 9A is a square image having, for example, 64 pixels in each of the vertical and horizontal directions. The upper left corner is the
更に詳説すると、低明度領域61は、全体のほとんどが白色であり、部分的に黒色の斑点模様が形成された画像となっている。逆に、高明度領域63は、全体のほとんどが黒色であり、部分的に白色の斑点模様が形成された画像となっている。そして中間領域62は、s軸方向に沿って延びる白色の帯状模様と黒色の帯状模様とにより、全体的に略縞模様が形成された画像となっている。
More specifically, the
このうち中間領域62は、イメージ画像のs軸方向の略中央付近において、t軸方向の全体にわたる縦長の長方形状に形成されている。また、低明度領域61は、中間領域62よりもs軸方向の原点寄りの領域に、縦長の長方形状に形成され、高明度領域63は、中間領域62に対して低明度領域61とは反対側の領域に、縦長の長方形状に形成されている。換言すると、イメージ画像はt軸方向に沿う2本の線分によって左側、中央、及び右側の3つの領域に区画されており、夫々に対応するようにして、上述した低明度領域61、中間領域62、及び高明度領域63が設定されている。
Among these, the
上述したステップS6の処理では、軌跡線Tの開始点となる入力点PN−1に対応して設定された頂点a,bに関し、図9(b)に示すように、右下隅の座標(s=63,t=63)の点(ピクセル)60aが頂点aに対応付けられ、イメージ画像の右上隅の座標(s=63,t=0)の点60bが頂点bに対応付けられる。また、入力点PNには、低明度領域61内の所定の座標(s=sN,t=tN)の点60PNが対応付けられる。そして、頂点a,b及び入力点PNに対応付けられた各点60a,60b,60PNを結んで形成された三角形状のテクスチャ(図9(b)において太線で囲んだ部分画像)を、イメージ画像から選択する(ステップS6)。次に、図7の工程102に示すように、頂点a,b及び入力点PNにより画定されるポリゴンA1の表面に、ステップS6で選択したテクスチャを貼り付ける(ステップS7)。その結果、入力点Pの移動経路Rを表現する軌跡線Tが、三次元の仮想ゲーム空間51内に描画されることとなる。なお、ポリゴンA1の表面形状とテクスチャの形状とは必ずしも一致しないが、一致しない場合には公知の補間処理を適宜施せばよい。
In the process of step S6 described above, as shown in FIG. 9B, the coordinates (in the lower right corner) of the vertices a and b set corresponding to the input point PN-1 that is the starting point of the locus line T are shown. The point (pixel) 60a at s = 63, t = 63) is associated with the vertex a, and the
このように、入力点がPN−1,PNの2点のみである場合、仮に終端点である入力点PNにてタッチペン17のペン先がタッチパネル14から離されたとしても、三角形状のポリゴンA1に対して上述したようなテクスチャが貼り付けられるため、筆を紙面に対して水平方向へ移動させながら、筆先を徐々に紙面から離していったときの書体に類似する軌跡線Tを描画することができる。なお、図7の工程100〜102に示す移動経路Rを示す線やポリゴンA1の輪郭を示す線などは実際に描画する必要はなく、入力点PNを検出した場合には工程102に示すテクスチャを直接貼り付けて軌跡線Tを描画すればよい。また、次に説明する図8の工程103〜106を経て軌跡線Tを描画する場合も同様である。
Thus, if the input point is only two points P N-1, P N, even nib of the
次に、図6のステップS4にて、入力点PNに対して2つ前の入力点PN−2が存在すると判定した場合(ステップS4:YES)について、図8も参照しつつ説明する。なお、2つ前の入力点PN−2が存在するということは、少なくとも3つの入力点Pが存在するということであり、ここでは最小限の3つの入力点PN−2,PN−1,PNが存在する場合について説明する。また、2つの入力点PN−2,PN−1に加えて新たな入力点PNを検出する直前は、これら2つの入力点PN−2,PN−1のみが存在する状態であり、これは、図7に示したように入力点PN−1,PNのみが存在する状態と同じである。従って、図7の工程102に示す状態から新たな入力点Pを検出した結果、図8では、この入力点Pを入力点PN、その1つ前の入力点(図7の入力点PN)を入力点PN−1、更に1つ前の入力点(図7の入力点PN−1)を入力点PN−2として示している。即ち、図8は、図7の工程102に示す状態から、新たな入力点Pが検出されたとき以降の工程を示している。 Next, in step S4 of FIG. 6, if the input point P N-2 of the two previous to the input point P N is determined to exist (Step S4: YES) will be described with reference also to FIG 8 . The presence of the two previous input points P N-2 means that there are at least three input points P. Here, the minimum three input points P N-2 and P N− are present. 1 and PN are described. Also, just prior to detecting the two input points P N-2, P N-1 in addition to new input point P N, in a state where only two input points P N-2, P N-1 is present Yes, this is the same as the state in which only the input points P N-1 and P N exist as shown in FIG. Thus, a result of detection of new input point P from the state shown in step 102 of FIG. 7, FIG. 8, the input point P N of the input point P, the input point P N of the preceding input points (Figure 7 ) As an input point P N-1 , and the previous input point (input point P N-1 in FIG. 7) as an input point P N-2 . That is, FIG. 8 shows the subsequent steps when a new input point P is detected from the state shown in step 102 of FIG.
図8の工程103に示すように、入力点PN−1の次に入力点PNを検出することで、該入力点PNに対して2つ前の入力点PN−2が存在すると判定すると(ステップS4:YES)、入力点PN−1の近傍に、入力点PN−2,PN−1間の移動速度に基づき、2つの頂点c,dのxyz座標を設定する(ステップS8)。この移動速度は、入力点PN−2から入力点PN−1までの距離を、入力点Pを検出する周期で除算することによって得られるが、周期が一定であれば、単に入力点PN−2から入力点PN−1までの距離(移動距離)に基づいて2つの頂点c,dのxyz座標を設定することもできる。
As shown in step 103 of FIG. 8, by detecting the input point P N to the next input point P N-1, the input point P N-2 before the two exists for said input force point P N If it is determined (step S4: YES), in the vicinity of the input point P N-1, based on the moving speed between the
頂点c,dの設定手順をより具体的に説明すると、図8の工程104に示すように、入力点PN−2及び入力点PNを結ぶ線分を想定し、該線分に直交すると共に入力点PN−1を中間点とする線分Lcdを想定する。また、この線分Lcdの長さは、図7の工程101にて説明した開始点に対応する頂点a,bを設定する際に用いた長さLに対し、入力点PN−2,PN−1間の移動速度に基づいて決定される係数kを乗じた長さkLに設定する。このようにして想定した線分Lcdの両端位置に、移動経路Rを挟むようにして頂点c,dを設定している(ステップS8)。ここで、上述した係数kは、例えば7ドット〜17ドットの範囲内で、入力点PN−2,PN−1間の移動速度に対して略反比例するように設定されており、移動速度が大きければ係数kは小さくなり、線分Lcdの長さkL(即ち、頂点c,d間の距離)は短くなる。また、移動速度が小さければ係数kは大きくなり、線分Lcdの長さkLは長くなる。なお、係数kと移動速度との関係は線型性を有している必要はなく、移動速度が大きくなるに従って係数kが小さくなるのであれば、非線型や離散的な関係であってもよい。 Vertex c, when instructions for configuring the d More specifically, as shown in step 104 of FIG. 8, assuming the line segment connecting the input point P N-2 and the input point P N, perpendicular to line segment In addition, a line segment Lcd having the input point P N-1 as an intermediate point is assumed. Further, the length of the line segment Lcd is equal to the input point P N−2 , P with respect to the length L used when setting the vertices a and b corresponding to the start points described in Step 101 of FIG. It is set to a length kL multiplied by a coefficient k determined based on the moving speed between N-1 . Vertices c and d are set at both end positions of the line segment Lcd assumed in this way so as to sandwich the movement route R (step S8). Here, the coefficient k described above is set to be approximately inversely proportional to the moving speed between the input points P N−2 and P N−1 , for example, within a range of 7 dots to 17 dots. Is larger, the coefficient k becomes smaller and the length kL of the line segment Lcd (that is, the distance between the vertices c and d) becomes shorter. Further, if the moving speed is low, the coefficient k increases, and the length kL of the line segment Lcd increases. The relationship between the coefficient k and the moving speed does not have to be linear, and may be nonlinear or discrete as long as the coefficient k decreases as the moving speed increases.
次に、入力点PN−1と頂点a,bとによって画定された三角形状のポリゴン(入力点がPN−2,PN−1の2点のみのときに生成されたポリゴン)に換えて、入力点PN−2,PN−1間に新たな2つの三角形状のポリゴンを生成する(ステップS9)。即ち、図8の工程105に示すように、頂点a,b,cにより画定されるポリゴンA2と、頂点b,c,dにより画定されるポリゴンA3とを生成する。更に、ステップS5と同様にして、入力点PNを終端点とするポリゴンA4、即ち、頂点c,d及び入力点PNにより画定される三角形状のポリゴンA4を生成する(ステップS10)。 Next, change to a triangular polygon defined by the input point P N-1 and the vertices a and b (polygons generated when the input points are only two points P N-2 and P N-1 ). Thus, two new triangular polygons are generated between the input points P N-2 and P N-1 (step S9). That is, as shown in step 105 of FIG. 8, a polygon A 2 defined by vertices a, b, and c and a polygon A 3 defined by vertices b, c, and d are generated. Further, as in step S5, the polygon A 4 and end point of the input point P N, i.e., vertex c, and generates a triangular polygons A 4 defined by d and the input point P N (step S10) .
続いて、入力点PN−2,PN−1間の移動速度に基づいて、図9(a)のイメージ画像から、ポリゴンA2,A3,A4に貼り付けるテクスチャを選択する(ステップS11)。具体的に説明すると、本実施の形態では、開始点及び終端点を除く移動経路R上の入力点P(例えば、図8の入力点PN−1)に対応して、移動経路Rを挟んで設定される一対の頂点(例えば、図8の頂点c,d)は、テクスチャを選択する際にイメージ画像に対応付けられる点(ピクセル)のt座標が固定されており、一方の頂点(例えば、頂点c)はt=63、他方の頂点(例えば、頂点d)はt=0とされている。 Subsequently, based on the moving speed between the input points P N−2 and P N−1 , textures to be pasted on the polygons A 2 , A 3 , and A 4 are selected from the image in FIG. S11). More specifically, in the present embodiment, the movement path R is sandwiched in correspondence with the input points P on the movement path R excluding the start point and the end point (for example, the input point P N-1 in FIG. 8). In the pair of vertices (for example, vertices c and d in FIG. 8), the t-coordinate of a point (pixel) associated with the image image when selecting a texture is fixed, and one vertex (for example, , Vertex c) is t = 63, and the other vertex (for example, vertex d) is t = 0.
また、イメージ画像において、この一対の頂点に対応付けられる点のs座標は、所定の範囲内で入力点PN−2,PN−1間の移動速度に基づいて決定される。図9(a)に示すように、イメージ画像には所定のs座標であるs=sF,sLが設定されている。そして、一対の頂点に対応する点のs座標は、s=sF〜sLの範囲内で、入力点PN−2,PN−1間の移動速度が大きくなる従ってsFに近づき、移動速度が小さくなるに従ってsLに近づくように、同一の値に設定される。より具体的には、入力点Pの移動速度について、予め上限値(最も速い速度)及び下限値(最も遅い速度)が設定されており、実際の入力点Pの移動速度がこの上限値以上の場合にはs=sFとし、下限値以下の場合にはs=sLとする。そして、移動速度が上限値と下限値との間の値の場合には、線形補間によりsF〜sL間のs座標を求めるようにしている。なお、本実施の形態では、sFを中間領域62に含まれるs座標とし、sLを高明度領域63に含まれるs座標としているが、これに限られず、s=sF〜sL間に中間領域62の少なくとも一部が含まれるように設定すればよい。
In the image, the s-coordinates of the points associated with the pair of vertices are determined based on the moving speed between the input points P N-2 and P N-1 within a predetermined range. As shown in FIG. 9A, s = s F and s L which are predetermined s coordinates are set in the image. Then, the s coordinate of the point corresponding to the pair of vertices approaches s F because the moving speed between the input points P N−2 and P N−1 increases within the range of s = s F to s L , The same value is set so as to approach s L as the moving speed decreases. More specifically, an upper limit value (fastest speed) and a lower limit value (slowest speed) are set in advance for the moving speed of the input point P, and the actual moving speed of the input point P is greater than or equal to this upper limit value. and s = s F when, in the case of less than the lower limit value is set to s = s L. When the moving speed is a value between the upper limit value and the lower limit value, the s coordinate between s F and s L is obtained by linear interpolation. In the present embodiment, s F is the s coordinate included in the
これを図8の工程105の頂点c,dに当てはめて説明すると、頂点cには、イメージ画像における座標(sF≦s≦sL,t=63)の点60cが対応付けられ、頂点dには、座標(sF≦s≦sL,t=0)の点60dが対応付けられる。そして、点60c,60dのs座標は、入力点PN−2,PN−1間の移動速度に基づき、sF≦s≦sLの範囲内で同一の値に設定される。一方、入力点PNに対応するイメージ画像上の点60PNの座標は、図7の工程102に示す入力点PNに対応する点60PN(図9(b)参照)の座標と同一である。
This will be explained by applying to the vertices c and d in step 105 in FIG. 8. The vertex c is associated with a
このようにして、ポリゴンA2,A3,A4を画定する頂点a,b,c,d及び入力点PNに対応する、イメージ画像上の点60a,60b,60c,60d,60PNを決定する。そして、ポリゴンA2に対しては、点60a,60b,60cを結んで形成される三角形状のテクスチャを選択し(ステップS11)、これを貼り付ける(ステップS12)。また、ポリゴンA3に対しては、点60b,60c,60dを結んで形成される三角形状のテクスチャを選択し(ステップS11)、これを貼り付ける(ステップS12)。また、ポリゴンA4に対しては、点60c,60d,60PNを結んで形成される三角形状のテクスチャを選択し(ステップS11)、これを貼り付ける(ステップS12)。なお、本実施の形態では、実際には、ポリゴンA2,A3に対して点60a,60b,60d,60cを順に結んで形成される四角形状のテクスチャを貼り付けることとしているが、その結果は、上述したようにポリゴンA2,A3に対して個別に対応する三角形状のテクスチャを貼り付ける場合と実質的に同じである。
In this way, the vertices defining polygons A 2, A 3, A 4 a, b, c, corresponding to the d and the input point P N, the
以上のように、各A2,A3,A4に対して夫々対応するテクスチャを貼り付けることにより、入力点Pの移動軌跡Rを表現する軌跡線Tが、三次元の仮想ゲーム空間51内に描画されることとなる(図8の工程106参照)。なお、ここでも、ポリゴンA2,A3,A4の表面形状とこれらに対応するテクスチャの形状とは必ずしも一致しないが、一致しない場合には公知の補間処理を適宜施せばよい。また、上述した説明では入力点Pが3つの場合を例にしたが、4つ以上の入力点Pを検出した場合も同様に、ステップS1(YES),ステップS2(YES),ステップS4(YES)の処理後、ステップS8〜S12の処理を行う。
As described above, by pasting the corresponding texture to each of A 2 , A 3 , and A 4 , the trajectory line T that represents the movement trajectory R of the input point P is generated in the three-dimensional
例えば、4つ目の入力点Pを検出した場合は、3つ目の入力点P(図8の入力点PN)に対応する頂点e,fのxyz座標を、直前の入力点の移動速度(2つ目と3つ目の入力点間の移動速度)に基づいて設定する(ステップS8)。次に、頂点c,d及び3つ目の入力点P(図8の入力点PN)で画定されるポリゴン(図8のポリゴンA4)に換えて、頂点c,d,eで画定されるポリゴンと、頂点d,e,fで画定されるポリゴンとを生成し(ステップS9)、更に、頂点e,f及び4つ目の入力点Pで画定されるポリゴンを生成する(ステップS10)。また、イメージ画像において頂点e,fに対応付ける点60e,60fを、上記頂点c,dに対する点60c,60dの場合と同様にして決定し、これにより、各ポリゴンに対応させるテクスチャを選択する(ステップS11)。そして、選択した各テクスチャを、対応する各ポリゴンに貼り付けることで(ステップS12)、入力点Pが4つの場合の移動軌跡Rを表現する軌跡線Tを、三次元の仮想ゲーム空間51内に描画することができる。以上からも分かるように、5つ目以上の入力点Pを検出した場合も同様の手順により、軌跡線Tを描画することができる。
For example, when the fourth input point P is detected, the xyz coordinates of the vertices e and f corresponding to the third input point P (input point P N in FIG. 8) are used as the moving speed of the immediately preceding input point. A setting is made based on (the moving speed between the second and third input points) (step S8). Next, instead of the polygon (polygon A 4 in FIG. 8) defined by the vertices c and d and the third input point P (input point P N in FIG. 8), the polygon is defined by vertices c, d, and e. And a polygon defined by the vertices d, e, and f (step S9), and further a polygon defined by the vertices e, f and the fourth input point P is generated (step S10). . Further, the points 60e and 60f to be associated with the vertices e and f in the image are determined in the same manner as the
ところで、上述した説明から分かるように、ポリゴンを画定する頂点の座標は入力点Pの移動速度に応じて設定され、移動軌跡Rを挟む一対の頂点間の距離は、入力点Pの移動速度が大きい(速い)ほど小さく(頂点間が狭く)なるようになっている。そのため、プレイヤが、タッチペン17のペン先をタッチパネル14に接触させた状態で速く移動させると、生成されるポリゴンの幅寸法(移動軌跡Rに直交する方向の寸法)は小さくなり、より細線の軌跡線Tを描画することができる。逆に、ペン先をゆっくり移動させると、生成されるポリゴンの幅寸法は大きくなって太線の軌跡線Tを描画することができる。また、このような軌跡線Tの幅寸法の広狭は、各入力点間の移動速度に応じて決定されるため、軌跡線Tは、ペン先の移動速度に応じて途中で太くなったり細くなったりする。従って、紙面に対して筆をゆっくりと移動させると、筆先が広がって太い線となり、筆を速く移動させると、筆先がまとまって細い線となるような、毛筆風の書体に類似する軌跡線Tを描画することができる。
As can be seen from the above description, the coordinates of the vertices defining the polygon are set according to the moving speed of the input point P, and the distance between the pair of vertices across the moving locus R is the moving speed of the input point P. The larger (faster), the smaller (between vertices). For this reason, when the player moves the pen tip of the
また、図9を用いて説明したように、入力点Pの移動速度が大きいほど、ポリゴンを画定する頂点に対応付けられる点は、そのs座標は小さくなり、黒色の斑点模様が少しだけしか存在しない低明度領域61に近い側の点となる。そして、このような点を用いて画定されるテクスチャは、黒色の模様が少なく、相対的に明度が低くなる。従って、このテクスチャを対応するポリゴンに貼り付けることにより、紙面に対して筆を速く移動させた場合の掠れた書体を表現することができる。また、ポリゴンを画定する頂点に対応付けられる点のs座標は、入力点Pの移動方向にかかわらず、その移動速度に基づいて決定される。そのため、タッチペン17のペン先を前後、左右、斜め方向の何れの方向に移動した場合であっても、また、移動方向を途中で変えていった場合であっても、同様の掠れた書体を表現する軌跡線Tを描画することができる。
Further, as described with reference to FIG. 9, as the moving speed of the input point P increases, the point associated with the vertex defining the polygon has a smaller s-coordinate and only a few black spot patterns exist. It becomes a point on the side closer to the
図10は、上述した軌跡線描画処理により、仮想ゲーム空間51に描画した曲線状の軌跡線Tの一例を示す模式図である。図10では、本実施の形態に係る軌跡線描画処理によって描画される軌跡線Tがより分かりやすくなるように、70個の入力点Pが存在する場合を例示している。即ち、タッチペン17を移動させた結果、移動経路Rに沿って70個の入力点P1〜P70が検出され、最後の入力点P70が終端点となっている。なお、図10では一部の入力点Pのみを表示しており、また、視認性をよくするため、表示する各入力点Pは「点」で描画せず、各入力点Pを通り軌跡線Tに略直交する線分によって各入力点Pのおよその位置を示している。
FIG. 10 is a schematic diagram illustrating an example of a curved locus line T drawn in the
この軌跡線Tを描画する場合のペン先の移動態様を説明すると、およそ入力点P1〜P10間では移動速度が比較的速い略一定速度であるが、その後に減速し、入力点P20〜P40間では比較的遅い略一定速度になっている。また、入力点P40を過ぎて一時的に速くなった後、入力点P50からは再び遅くなり、入力点P60以降は徐々に速度を上げて終端点の入力点P70に至っている。そして、この入力点P70においてペン先がタッチパネル14から離されている。
The movement of the pen tip when drawing the locus line T will be described. The movement speed is relatively constant between the input points P 1 to P 10 , but it is decelerated after that and the input point P 20 is decelerated. is between to P 40 have become relatively slow substantially constant speed. In addition, after becoming faster temporarily past the input point P 40, slows down again from the input point P 50, the input point P 60 and later gradually increase the speed has led to the input point P 70 of the termination point. The nib is separated from the
この場合の軌跡線Tは、ペン先の移動速度が比較的速い入力点P1〜P10間では掠れが比較的多い(低明度色のドットの占める割合が比較的大きい)細線となっている。ペン先の移動が遅くなる次の入力点P10〜P20間では、入力点P20に近づくに従って線幅が大きくなって太線になると共に、掠れが少なくなっていくように描画され、続く入力点P20〜P40間では、太線と掠れが少ない状態とが維持された線で描画される。更に、入力点P40〜P50間では、ペン先の移動が速くなるに従って細線になると共に掠れが多くなり、次の入力点P50〜P60間では逆に、ペン先の移動が遅くなるに従って太線になると共に掠れが減っていく。そして、入力点P60〜P70間では、徐々に細線になっていくと共に、掠れが多くなり、終端点の入力点P70では先細りするように描画されている。 In this case, the trajectory line T is a thin line that has a relatively large amount of blurring between the input points P 1 to P 10 where the pen tip moving speed is relatively fast (the proportion of the low-light color dots is relatively large). . The between next input point P 10 to P 20 to the pen tip movement is slow, the line width becomes thick line increases as the distance from the input point P 20, is drawn as blur it goes low, followed by the input Between the points P 20 to P 40 , the line is drawn with a line in which a thick line and a state with little blur are maintained. Furthermore, between the input point P 40 to P 50, fading is increased with become thin line according to the movement of the pen tip is increased, conversely between the next input point P 50 to P 60, the movement of the pen tip is slow As the line gets thicker, drowning decreases. The input points P 60 to P 70 are gradually drawn as a thin line, and the amount of curling increases, and the input point P 70 at the end point is drawn to be tapered.
このように、図9に示すイメージ画像を用いて、図6のフローチャートに示す手順に従って軌跡線描画処理を実行することにより、入力点Pの移動速度に応じて線の太さや掠れ具合等の線種を逐次変化させることができ、毛筆風の書体に類似する軌跡線Tを、三次元の仮想ゲーム空間51内に描画することができる。
In this way, by using the image shown in FIG. 9 and executing the locus line drawing process according to the procedure shown in the flowchart of FIG. 6, lines such as the thickness of the line and the degree of twisting according to the moving speed of the input point P are obtained. The seeds can be sequentially changed, and a trajectory line T similar to a brush-style typeface can be drawn in the three-dimensional
なお、本実施の形態に係る軌跡線描画処理において使用できるイメージ画像は、図9に示すような、模様に変化を有する(即ち、模様の異なる部分を有する)イメージ画像に限られない。例えば、色彩に変化を有するイメージ画像でもよく、座標s=0から座標s=63へ向かうに従って赤色から青色へと色彩が変化するグラデーション画像を採用してもよい。この場合、タッチペン17のペン先の移動速度に応じて色彩が変化する軌跡線Tを描画することができる。更に、模様及び色彩の両方に変化を有するイメージ画像を採用してもよい。
Note that the image image that can be used in the locus line drawing processing according to the present embodiment is not limited to an image image having a change in pattern (that is, having a different pattern) as shown in FIG. For example, an image image having a change in color may be used, and a gradation image in which the color changes from red to blue as it goes from the coordinate s = 0 to the coordinate s = 63 may be adopted. In this case, the locus line T whose color changes according to the moving speed of the pen tip of the
また、本実施の形態では、入力点Pの移動速度に応じて軌跡線Tの太さ及び掠れ具合を共に変化させるものを例示したが、線幅(線の太さ)及び掠れ具合のうち、何れか一方のみを変化させるようにしてもよい。また、線幅、模様(掠れ具合を含む)、及び色彩のうち、何れか一又は二つだけを変化させるようにしてもよいし、全てを変化させるようにしてもよい。また、図9に示すように、イメージ画像上の点のt座標を固定とし、s座標を入力点Pの移動速度に応じて変化させるのに換えて、s座標を固定とし、t座標を変化させるようにしてもよい。また、図9のイメージ画像は、低明度領域61,中間領域62,高明度領域63の3領域に区分けしたものを例示したが、これに限られず、例えば、低明度領域及び高明度領域の2領域に区分けしたものを用いてもよい。
Further, in the present embodiment, an example of changing both the thickness of the trajectory line T and the degree of curling according to the moving speed of the input point P is illustrated, but among the line width (line thickness) and the degree of curling, Only one of them may be changed. Further, only one or two of the line width, the pattern (including the blurring condition), and the color may be changed, or all may be changed. Also, as shown in FIG. 9, instead of changing the t-coordinate of the point on the image image and changing the s-coordinate according to the moving speed of the input point P, the s-coordinate is fixed and the t-coordinate is changed. You may make it make it. 9 illustrates the image divided into three areas of the
本実施の形態では、軌跡線Tを仮想ゲーム空間51内のスクリーン53上の位置に描画するものを例示したが、これに限られず、仮想ゲーム空間51内であれば他の位置であってもよい。例えば、仮想ゲーム空間51内における、スクリーン53とプレイヤキャラクタCとの中間位置に描画するようにしてもよい。更に、ポインティングデバイス20として、タッチパネル14及びタッチペン17を例示したが、これに限られない。例えば、画面に表示されたカーソルの動作を指示すべく、プレイヤに操作されるマウスなども、本発明に係るポインティングデバイスに含まれる。
In the present embodiment, the locus line T is drawn at a position on the
本発明は、ポインティングデバイスによる画面上の入力点の移動軌跡を、より高速に描画することができる画像処理プログラム、及び画像処理装置を提供することができる。 The present invention can provide an image processing program and an image processing apparatus that can draw a moving locus of an input point on a screen by a pointing device at higher speed.
1 ゲーム装置(画像処理装置)
6 第1ディスプレイ(表示部の画面)
14 タッチパネル
17 タッチペン
20 ポインティングデバイス
30 制御部
30a ゲーム進行制御手段
30b 仮想空間生成手段
30c 入力位置取得手段
30d 軌跡線描画手段
50a ゲームプログラム(画像処理プログラム)
51 仮想ゲーム空間
A1,A2,A3,A4 ポリゴン
P 入力点
R 移動経路
T 軌跡線
1 Game device (image processing device)
6 First display (screen of display unit)
14
51 Virtual Game Space A 1 , A 2 , A 3 , A 4 Polygon P Input Point R Movement Path T Trajectory Line
Claims (7)
表示部の画面に表示される仮想の三次元空間を生成する仮想空間生成手段、
ポインティングデバイスによる前記画面上の入力点の位置情報を取得する入力位置取得手段、及び
前記入力点が画面上を移動した場合に、移動経路上の前記入力点の前記位置情報に基づき、前記三次元空間内に前記移動経路を示す軌跡線を描画する軌跡線描画手段、として機能させ、
該軌跡線描画手段は、前記入力点の移動速度に応じて前記軌跡線の線種を変化させることを特徴とする画像処理プログラム。 Computer
Virtual space generation means for generating a virtual three-dimensional space displayed on the screen of the display unit;
Input position acquisition means for acquiring position information of the input point on the screen by a pointing device, and when the input point moves on the screen, based on the position information of the input point on the movement path, the three-dimensional Function as trajectory line drawing means for drawing a trajectory line indicating the movement path in space,
The trajectory line drawing means changes the line type of the trajectory line according to the moving speed of the input point.
前記軌跡線描画手段は、前記入力点の移動速度が相対的に大きい場合は、前記低明度領域をより広く含むように前記テクスチャを選択し、前記入力点の移動速度が相対的に小さい場合は、前記高明度領域をより広く含むように前記テクスチャを選択するように構成されていることを特徴とする請求項5に記載の画像処理プログラム。 The image includes an intermediate region in which high lightness color portions and low lightness color portions are mixed in a mottled manner, a high lightness region in which the density of the high lightness color portions is relatively high, and the low lightness color portion. An image having a change in pattern, including a low-lightness region having a relatively large density of
When the moving speed of the input point is relatively high, the trajectory line drawing unit selects the texture so as to include the low brightness region more widely, and when the moving speed of the input point is relatively low The image processing program according to claim 5, wherein the image processing program is configured to select the texture so as to include the high brightness area more widely.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010218666A JP5623853B2 (en) | 2010-09-29 | 2010-09-29 | Image processing program and image processing apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010218666A JP5623853B2 (en) | 2010-09-29 | 2010-09-29 | Image processing program and image processing apparatus |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2012073857A true JP2012073857A (en) | 2012-04-12 |
JP5623853B2 JP5623853B2 (en) | 2014-11-12 |
Family
ID=46169950
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2010218666A Active JP5623853B2 (en) | 2010-09-29 | 2010-09-29 | Image processing program and image processing apparatus |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5623853B2 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2016189735A1 (en) * | 2015-05-28 | 2016-12-01 | 三菱電機株式会社 | Input display device and input display method |
JP2018022528A (en) * | 2017-10-26 | 2018-02-08 | 三菱電機株式会社 | Input display device, input display method, and input display program |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP0901065A2 (en) * | 1997-09-02 | 1999-03-10 | Fujitsu Limited | Information displaying apparatus |
JP2001084404A (en) * | 1999-09-14 | 2001-03-30 | Square Co Ltd | Method and device for rendering, game machine, and computer readable recording medium for storing program for rendering three-dimensional model |
JP2003085590A (en) * | 2001-09-13 | 2003-03-20 | Nippon Telegr & Teleph Corp <Ntt> | Method and device for operating 3d information operating program, and recording medium therefor |
JP2003210837A (en) * | 2002-01-25 | 2003-07-29 | Namco Ltd | Image-generating system, program, and information- storage medium |
JP2006119774A (en) * | 2004-10-19 | 2006-05-11 | Nintendo Co Ltd | Input processing program and input processing device |
JP3865681B2 (en) * | 2002-10-18 | 2007-01-10 | 株式会社 ワコムアイティ | Brush writing device, brush writing program, and brush writing method |
JP4119436B2 (en) * | 2005-03-10 | 2008-07-16 | 株式会社コナミデジタルエンタテインメント | Information input conversion program and information input conversion device |
-
2010
- 2010-09-29 JP JP2010218666A patent/JP5623853B2/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP0901065A2 (en) * | 1997-09-02 | 1999-03-10 | Fujitsu Limited | Information displaying apparatus |
JP2001084404A (en) * | 1999-09-14 | 2001-03-30 | Square Co Ltd | Method and device for rendering, game machine, and computer readable recording medium for storing program for rendering three-dimensional model |
JP2003085590A (en) * | 2001-09-13 | 2003-03-20 | Nippon Telegr & Teleph Corp <Ntt> | Method and device for operating 3d information operating program, and recording medium therefor |
JP2003210837A (en) * | 2002-01-25 | 2003-07-29 | Namco Ltd | Image-generating system, program, and information- storage medium |
JP3865681B2 (en) * | 2002-10-18 | 2007-01-10 | 株式会社 ワコムアイティ | Brush writing device, brush writing program, and brush writing method |
JP2006119774A (en) * | 2004-10-19 | 2006-05-11 | Nintendo Co Ltd | Input processing program and input processing device |
JP4119436B2 (en) * | 2005-03-10 | 2008-07-16 | 株式会社コナミデジタルエンタテインメント | Information input conversion program and information input conversion device |
Non-Patent Citations (2)
Title |
---|
CSNG201000570005; 鈴木宣也, 外1名: '"多人数参加型の共有お絵描きシステムの開発とインタラクションデザイン"' 日本バーチャルリアリティ学会論文誌 第15巻, 第2号, 20100630, p.139-146, 特定非営利活動法人日本バーチャルリアリティ学会 * |
JPN6014025288; 鈴木宣也, 外1名: '"多人数参加型の共有お絵描きシステムの開発とインタラクションデザイン"' 日本バーチャルリアリティ学会論文誌 第15巻, 第2号, 20100630, p.139-146, 特定非営利活動法人日本バーチャルリアリティ学会 * |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2016189735A1 (en) * | 2015-05-28 | 2016-12-01 | 三菱電機株式会社 | Input display device and input display method |
JPWO2016189735A1 (en) * | 2015-05-28 | 2017-07-13 | 三菱電機株式会社 | Input display device, input display method, and input display program |
US10510322B2 (en) | 2015-05-28 | 2019-12-17 | Mitsubishi Electric Corporation | Input display device, input display method, and computer-readable medium |
US10748506B2 (en) | 2015-05-28 | 2020-08-18 | Mitsubishi Electric Corporation | Input display device and input display method |
CN113268186A (en) * | 2015-05-28 | 2021-08-17 | 三菱电机株式会社 | Input display device and display method |
JP2018022528A (en) * | 2017-10-26 | 2018-02-08 | 三菱電機株式会社 | Input display device, input display method, and input display program |
Also Published As
Publication number | Publication date |
---|---|
JP5623853B2 (en) | 2014-11-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7658675B2 (en) | Game apparatus utilizing touch panel and storage medium storing game program | |
US20080192043A1 (en) | Display, Displaying Method, Information Recording Medium, and Program | |
US6580430B1 (en) | Method and apparatus for providing improved fog effects in a graphics system | |
US7470192B2 (en) | Game apparatus and storage medium storing game program | |
KR100932592B1 (en) | Computer-readable information recording medium recording object selection apparatus, object selection method and program | |
US20060109259A1 (en) | Storage medium storing image display program, image display processing apparatus and image display method | |
US9612710B2 (en) | Storage medium having stored thereon image processing program and image processing apparatus | |
JP4851504B2 (en) | How to generate assets for interactive entertainment using digital image capture | |
JP2012133481A (en) | Program, information storage medium and terminal device | |
JP2006068138A (en) | Game apparatus and image processing program | |
US8133117B2 (en) | Game apparatus, game message displaying method and storage medium storing game program | |
KR100898445B1 (en) | Image processing device, image processing method, and computer-readable information recording medium having a program recorded thereon | |
JP3352982B2 (en) | Rendering method and device, game device, and computer-readable recording medium for storing program for rendering three-dimensional model | |
US7212215B2 (en) | Apparatus and method for rendering an antialiased image | |
JP5030651B2 (en) | Drawing processing program and drawing processing apparatus | |
JP5623853B2 (en) | Image processing program and image processing apparatus | |
US7023434B2 (en) | Image processing apparatus and image processing program | |
JP2006195882A (en) | Program, information storage medium and image generation system | |
JP2004139411A (en) | Brush drawing device, brush drawing program and brush drawing method | |
JP3001538B1 (en) | VIDEO GAME DEVICE, MODEL DISPLAY METHOD FOR VIDEO GAME, AND READABLE RECORDING MEDIUM ON WHICH MODEL DISPLAY PROGRAM FOR VIDEO GAME IS RECORDED | |
JP3602835B2 (en) | VIDEO GAME DEVICE, ITS CONTROL METHOD, AND GAME PROGRAM | |
JP3527196B2 (en) | Texture drawing method, entertainment apparatus, and recording medium | |
US7245298B2 (en) | Game system, image drawing method for game system, and computer-readable storage medium storing game program | |
JP2001143100A (en) | Method and device for providing depth gradation effects in three-dimensional video graphic system | |
WO2021218448A1 (en) | Handwriting forming method and apparatus, and electronic device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20130913 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20140603 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20140617 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20140808 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20140902 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20140925 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5623853 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |