JP2016177384A - Color table creation device and drawing device - Google Patents

Color table creation device and drawing device Download PDF

Info

Publication number
JP2016177384A
JP2016177384A JP2015055432A JP2015055432A JP2016177384A JP 2016177384 A JP2016177384 A JP 2016177384A JP 2015055432 A JP2015055432 A JP 2015055432A JP 2015055432 A JP2015055432 A JP 2015055432A JP 2016177384 A JP2016177384 A JP 2016177384A
Authority
JP
Japan
Prior art keywords
edge
color
color table
light source
angle
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2015055432A
Other languages
Japanese (ja)
Other versions
JP6293081B2 (en
Inventor
前川 拓也
Takuya Maekawa
拓也 前川
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2015055432A priority Critical patent/JP6293081B2/en
Publication of JP2016177384A publication Critical patent/JP2016177384A/en
Application granted granted Critical
Publication of JP6293081B2 publication Critical patent/JP6293081B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Instrument Panels (AREA)
  • Image Generation (AREA)

Abstract

PROBLEM TO BE SOLVED: To enable edge drawing by vector data with less memory consumption.SOLUTION: A color table creation unit 1105 extracts color values for each angle of an edge from a circular light source model, where the color value for each position on a spherical body when light is applied from a light source in a specific direction to the spherical body, is defined, and creates a color table representing the color values extracted for each angle of the edge. A display list output unit 1109 outputs the color table to a drawing device.SELECTED DRAWING: Figure 2

Description

本発明は、エッジを描画する技術に関する。   The present invention relates to a technique for drawing an edge.

特許文献1では、BMPデータで、複数のエッジを有するメータ針を描画する技術が開示されている。
特許文献1によれば、メータ針の表示角度ごとに、立体感のあるBMP画像データを用意すれば、デザイン通りのメータ針の描画が可能である。
Patent Document 1 discloses a technique for drawing a meter needle having a plurality of edges using BMP data.
According to Patent Literature 1, if BMP image data with a stereoscopic effect is prepared for each display angle of the meter needle, the meter needle can be drawn as designed.

特開2009−255638号公報JP 2009-255638 A

しかし、特許文献1の方法では、メータ針の表示分解能を高めた際に多くのBMPデータが必要となり、必要メモリ容量が大きくなるという課題がある。   However, the method of Patent Document 1 has a problem that a large amount of BMP data is required when the display resolution of the meter hand is increased, and the required memory capacity increases.

本発明は、このような課題を解決することを主な目的としており、エッジの角度に応じてエッジの色合いを変化させてエッジを描画することを、少ないメモリ消費量で可能にする構成を実現することを主な目的とする。   The main object of the present invention is to solve such a problem, and realizes a configuration that enables drawing of an edge by changing the hue of the edge according to the angle of the edge with a small amount of memory consumption. The main purpose is to do.

本発明に係るカラーテーブル生成装置は、
ベクタデータによるエッジを描画する描画装置が、前記エッジの角度に応じて前記エッジのカラー値を決定するために参照するカラーテーブルを生成するカラーテーブル生成部と、
前記カラーテーブル生成部により生成されたカラーテーブルを前記描画装置に出力するカラーテーブル出力部とを有し、
前記カラーテーブル生成部は、
特定の方向の光源から球体に光をあてた場合の前記球体上の位置ごとのカラー値が線形グラデーションにて定義されている円形の光源モデルから、前記エッジの角度ごとにカラー値を抽出し、前記エッジの角度ごとに、抽出したカラー値が記述されるカラーテーブルを生成する。
The color table generating apparatus according to the present invention is:
A drawing device that draws an edge based on vector data; a color table generating unit that generates a color table to be referred to in order to determine a color value of the edge according to the angle of the edge;
A color table output unit that outputs the color table generated by the color table generation unit to the drawing device;
The color table generator is
Extract a color value for each angle of the edge from a circular light source model in which the color value for each position on the sphere when light is applied to the sphere from a light source in a specific direction is defined by a linear gradation, A color table in which the extracted color values are described for each edge angle is generated.

本発明では、ベクタデータを用いることでメモリ消費量を抑える。
また、特定の方向の光源から球体に光をあてた場合の球体上の位置ごとのカラー値が線形グラデーションにて定義されている円形の光源モデルから、エッジの角度ごとにカラー値を抽出し、エッジの角度ごとに、抽出したカラー値が記述されるカラーリストを生成するため、ベクタデータを用いて、エッジの角度に応じてエッジの色合いを変化させてエッジを描画することが可能である。
In the present invention, memory consumption is reduced by using vector data.
In addition, the color value for each edge angle is extracted from the circular light source model in which the color value for each position on the sphere when light is applied to the sphere from a light source in a specific direction is defined by a linear gradation, Since a color list in which the extracted color values are described is generated for each angle of the edge, it is possible to draw the edge by changing the hue of the edge according to the angle of the edge using vector data.

実施の形態1に係るメータ描画装置の構成例を示す図。FIG. 3 is a diagram illustrating a configuration example of a meter drawing apparatus according to the first embodiment. 実施の形態1に係るディスプレイリスト生成装置の機能モジュール構成例を示す図。FIG. 3 is a diagram illustrating a functional module configuration example of the display list generation device according to the first embodiment. 実施の形態1に係るメータ針の例を示す図。FIG. 3 shows an example of a meter needle according to the first embodiment. 実施の形態1に係るメータ針の回転軌道上の位置ごとの描画例を示す図。The figure which shows the example of drawing for every position on the rotation track | orbit of the meter needle which concerns on Embodiment 1. FIG. 実施の形態1に係る光源モデルの例を示す図。FIG. 3 shows an example of a light source model according to Embodiment 1. 実施の形態1に係る光源モデルからカラー値を抽出する手順を示す図。FIG. 4 is a diagram showing a procedure for extracting a color value from a light source model according to Embodiment 1; 実施の形態1に係るメータ針のベクタデータの分解例を示す図。The figure which shows the example of decomposition | disassembly of the vector data of the meter needle which concerns on Embodiment 1. FIG. 実施の形態1に係るディスプレイリストの例を示す図。FIG. 4 shows an example of a display list according to the first embodiment. 実施の形態1に係るカラーテーブルの例を示す図。FIG. 3 shows an example of a color table according to Embodiment 1. 実施の形態2に係る描画装置の機能モジュール構成例を示す図。FIG. 4 is a diagram illustrating a functional module configuration example of a drawing apparatus according to a second embodiment.

実施の形態1.
本実施の形態では、指針として、車両のスピードメータのメータ針を、2Dベクタデータを用いて描画する例を示す。
なお、指針は、スピードメータのメータ針に限らず、タコメータ、燃料メータ等のメータ針でもよい。
また、指針は、メータ針に限らず、時計の針、コンパスの針等であってもよい。
***構成の説明***
図1は、本実施の形態に係るメータ描画装置10の構成例を示す。
メータ描画装置10は、ディスプレイリスト生成装置11と描画装置12で構成される。
ディスプレイリスト生成装置11は、カラーテーブル生成装置の例に相当する。
Embodiment 1 FIG.
In the present embodiment, an example in which a meter hand of a speedometer of a vehicle is drawn using 2D vector data as a guide is shown.
The pointer is not limited to the meter needle of the speedometer, and may be a meter needle such as a tachometer or a fuel meter.
The hands are not limited to meter hands, but may be clock hands, compass hands, or the like.
*** Explanation of configuration ***
FIG. 1 shows a configuration example of a meter drawing apparatus 10 according to the present embodiment.
The meter drawing device 10 includes a display list generation device 11 and a drawing device 12.
The display list generation device 11 corresponds to an example of a color table generation device.

描画装置12は、図3に示すような、2Dベクタデータによる、特定の方向から光があたっている状態が表現された、複数のエッジが含まれる立体形状のメータ針を描画する。
そして、描画装置12は、車両のスピードの変化に合わせて、図4のように、指針盤であるメータ盤上でメータ針が回転する描画を行う。
つまり、描画装置12は、メータ針の回転に合わせて光があたっているエッジ(図4の「明」の矢印が指すエッジ)と影になっているエッジ(図4の「暗」の矢印が指すエッジ)とを動的に変化させる描画を行う。
描画装置12は、メータ針のエッジごとに、各エッジの角度に応じて、ディスプレイリスト生成装置11により生成されたディスプレイリスト50に含まれるカラーテーブルで定義されているカラー値を適用してメータ針の回転を描画する。
The drawing device 12 draws a three-dimensional meter needle including a plurality of edges, which represents a state in which light is applied from a specific direction, based on 2D vector data as shown in FIG.
Then, the drawing device 12 performs drawing in which the meter needle rotates on the meter board, which is a pointer board, as shown in FIG. 4 in accordance with changes in the speed of the vehicle.
That is, the drawing device 12 has an edge (the edge indicated by the “bright” arrow in FIG. 4) and a shadowed edge (the “dark” arrow in FIG. 4) in accordance with the rotation of the meter needle. Drawing that dynamically changes the pointing edge).
The drawing device 12 applies the color value defined in the color table included in the display list 50 generated by the display list generation device 11 according to the angle of each edge for each edge of the meter needle. Draw the rotation.

ディスプレイリスト生成装置11は、ディスプレイリスト50を生成し、生成したディスプレイリスト50を描画装置12に出力する。
ディスプレイリスト50は、描画装置12が、図4のような、メータ針が回転する描画を行うために参照する、ハードウェア(以下、H/Wという)描画命令を集約したデータである。
つまり、ディスプレイリスト50は、メータ針の描画に必要な描画命令を集約させたデータであり、メータ針の一連の描画処理を一回の描画指令により、実行することを可能とする。
ディスプレイリスト50には、カラーテーブルが含まれる。
カラーテーブルには、エッジの角度ごとに、エッジのカラー値が定義されている。
ディスプレイリスト生成装置11は、メータ針を構成するベクタデータ20や、背景のBMPデータ30、そして、描画位置を代表とする、描画に必要な情報をまとめたスクリプトデータ40を入力として、ディスプレイリスト50を生成する。
The display list generation device 11 generates a display list 50 and outputs the generated display list 50 to the drawing device 12.
The display list 50 is data in which hardware (hereinafter, referred to as “H / W”) drawing commands that the drawing device 12 refers to perform drawing in which the meter needle rotates as shown in FIG.
That is, the display list 50 is data in which drawing commands necessary for drawing the meter needle are collected, and a series of drawing processing of the meter needle can be executed by a single drawing command.
The display list 50 includes a color table.
In the color table, edge color values are defined for each edge angle.
The display list generation device 11 receives the vector data 20 constituting the meter hand, the background BMP data 30, and the script data 40, which is a collection of information necessary for drawing, represented by the drawing position, as input. Is generated.

ディスプレイリスト生成装置11は、CPU(Central Processing
Unit)111、メモリ112、HDD(Hard Disk Drive)113で構成される。
CPU111は、ディスプレイリスト50の生成のためのプログラムを実行して、ディスプレイリスト50を生成する。
CPU111が実行するプログラムの詳細は後述する。
HDD113には、CPU111が実行するプログラムが格納されている。
プログラムはHDD113からメモリ112にロードされ、CPU111がメモリ112にロードされたプログラムを実行する。
HDD113には、OS(Operating System)も記憶されており、OSの少なくとも一部がメモリ112にロードされ、CPU111はOSを実行しながら、ディスプレイリスト50の生成ためのプログラムを実行する。
The display list generation device 11 is a CPU (Central Processing).
(Unit) 111, memory 112, and HDD (Hard Disk Drive) 113.
The CPU 111 generates a display list 50 by executing a program for generating the display list 50.
Details of the program executed by the CPU 111 will be described later.
The HDD 113 stores a program executed by the CPU 111.
The program is loaded from the HDD 113 to the memory 112, and the CPU 111 executes the program loaded to the memory 112.
The HDD 113 also stores an OS (Operating System). At least a part of the OS is loaded into the memory 112, and the CPU 111 executes a program for generating the display list 50 while executing the OS.

描画装置は、CPU121、メモリ122、描画H/W123、そして、VRAM(Video RAM)124で構成される。
ディスプレイリスト50は、メモリ122内に配置され、描画H/W123がディスプレイリスト50を参照することでメータ針をVRAM124に描画する。
ディスプレイリスト50がH/Wの一連の描画命令の集約データであるため、描画装置12では、メータ針の数値を設定し、ディスプレイリスト50の先頭アドレスを描画H/W123に通知するだけでメータ針を描画することが可能である。
このように、ディスプレイリスト50の使用により、高速な描画や、CPUのリソース確保等のメリットを得ることができる。
The drawing apparatus includes a CPU 121, a memory 122, a drawing H / W 123, and a VRAM (Video RAM) 124.
The display list 50 is arranged in the memory 122, and the drawing H / W 123 draws the meter hand in the VRAM 124 by referring to the display list 50.
Since the display list 50 is aggregated data of a series of H / W drawing commands, the drawing device 12 sets the numerical value of the meter needle, and simply notifies the drawing H / W 123 of the leading address of the display list 50. Can be drawn.
As described above, by using the display list 50, it is possible to obtain merits such as high-speed drawing and securing CPU resources.

図2は、本実施の形態に係るディスプレイリスト生成装置11の機能モジュール構成例を示す。
図2に示す各要素は、プログラムとして実現することができ、図2の各要素のプログラムをCPU111が実行することにより、ディスプレイリスト50を生成することができる。
FIG. 2 shows a functional module configuration example of the display list generation device 11 according to the present embodiment.
Each element shown in FIG. 2 can be realized as a program, and the display list 50 can be generated by the CPU 111 executing the program of each element shown in FIG.

ディスプレイリスト生成装置11は、制御部1101、スクリプト解析部1102、ベクタデータ解析部1103、ディスプレイリスト生成部1104、ディスプレイリスト出力部1109で構成される。   The display list generation device 11 includes a control unit 1101, a script analysis unit 1102, a vector data analysis unit 1103, a display list generation unit 1104, and a display list output unit 1109.

制御部1101は、ディスプレイリスト生成装置11の全体の制御を行う。   The control unit 1101 performs overall control of the display list generation device 11.

スクリプト解析部1102は、スクリプトデータ40内の描画パラメータを取得する。
描画パラメータには、主に、ベクタデータやBMPデータのファイルパス情報、メータの表示位置、メータの最小値/最大値(速度メータの場合、0km/h、180km/h等)、メータ針の最小表示角度、最大表示角度、そして針のエッジ部分の陰影に適用するカラー値に関する情報などが含まれる。
The script analysis unit 1102 acquires drawing parameters in the script data 40.
The drawing parameters mainly include file path information of vector data and BMP data, meter display position, meter minimum / maximum values (for speed meters, 0 km / h, 180 km / h, etc.), meter needle minimum The display angle, the maximum display angle, and information on the color value applied to the shadow of the edge portion of the needle are included.

ベクタデータ解析部1103は、ベクタデータの描画情報を抽出する。
ベクタデータには、その形状を表すパスデータ(MOVETO、LINETO、CURVETOなどのコマンドにより定義され、直線や曲線などを表す)や、ベクタデータ内部のカラー値などの情報が含まれる。
The vector data analysis unit 1103 extracts vector data drawing information.
The vector data includes information such as path data representing the shape (defined by commands such as MOVETO, LINETO, CURVETO, etc., representing straight lines, curves, etc.) and color values inside the vector data.

ディスプレイリスト生成部1104は、描画パラメータ、ベクタデータの描画情報、BMP画像データを基に、ディスプレイリスト50を生成する。   The display list generation unit 1104 generates the display list 50 based on the drawing parameters, vector data drawing information, and BMP image data.

ディスプレイリスト出力部1109は、ディスプレイリスト生成部1104により生成されたディスプレイリスト50を描画装置12に出力する。
前述したように、ディスプレイリストにはカラーテーブルが含まれているため、ディスプレイリスト出力部1109は、カラーテーブル出力部として機能する。
The display list output unit 1109 outputs the display list 50 generated by the display list generation unit 1104 to the drawing device 12.
As described above, since the display list includes a color table, the display list output unit 1109 functions as a color table output unit.

次に、ディスプレイリスト生成部1104の内部構成について説明する。   Next, the internal configuration of the display list generation unit 1104 will be described.

カラーテーブル生成部1105は、光源モデルとメータ針のエッジのカラー値との対応情報をカラーテーブルとして生成し、エッジの表示角度に対しカラー値を容易に取得できる仕組みを生成する。
光源モデルやカラーテーブルに関する詳細は後述する。
The color table generation unit 1105 generates correspondence information between the light source model and the color value of the edge of the meter needle as a color table, and generates a mechanism that can easily acquire the color value with respect to the display angle of the edge.
Details regarding the light source model and the color table will be described later.

2Dマトリクス生成部1106では、メータ針の回転・拡縮・平行移動を可能とするマトリクス情報を設定するデータを生成し、メータの表示位置の調整や、回転に使用する。   The 2D matrix generation unit 1106 generates data for setting matrix information that enables rotation, expansion / contraction, and parallel movement of the meter needle, and is used for adjustment of the display position of the meter and rotation.

パスデータ生成部1107は、描画対象とするベクタデータの描画情報を基に、描画H/W123で描画するための描画命令データを生成する。   The path data generation unit 1107 generates drawing command data for drawing by the drawing H / W 123 based on the drawing information of the vector data to be drawn.

サブルーチン生成部1108は、上記描画に必要な設定処理をサブルーチンとしてまとめ、描画H/Wの一連の描画処理命令として集約し、ディスプレイリスト50を生成する。   The subroutine generation unit 1108 collects the setting processing necessary for the drawing as a subroutine, aggregates the setting processing as a series of drawing H / W drawing processing commands, and generates the display list 50.

次に、カラーテーブル生成部1105がメータ針のエッジ部分に適用する光源モデルについて説明する。
図5は、本実施の形態に係る光源モデルの例を示す。
Next, a light source model applied to the edge portion of the meter needle by the color table generation unit 1105 will be described.
FIG. 5 shows an example of a light source model according to the present embodiment.

図5の光源モデルでは、特定の方向(図5では左上方向)に光源が存在することを仮定している。
また、光源モデルは、光源から球体に光をあてた場合の球体上の位置ごとのカラー値が線形グラデーションにて定義されている円形のモデルである。
より厳密には、光源モデルは、光源から球体に光をあてた場合の球体の光源に最も近い点に最も明るいカラー値が定義され、球体の光源に最も遠い点に最も暗いカラー値が定義され、光源に最も近い点から光源に最も遠い点にかけての線形グラデーションが設定されている円形のモデルである。
また、線形グラデーションは多段階の設定を許容し、光源に最も近い点からの距離の割合、およびカラー値を設定することにより定義する。
図5の例では、グラデーションを2段階指定しており、分岐点となるグラデーションの割合は35%、カラー値は最大値を255とし、(R,G,B)=(255,23,68)としている。
このように、多段階のグラデーションに対応することにより、光の当たり具合の調整が可能となる。
また、図3の断面図で示すエッジ部分の角度の表現や光の当たり方による陰影表現の差異は、光源モデルのカラー値のみを変更することにより容易に実現することが可能である。
In the light source model of FIG. 5, it is assumed that the light source exists in a specific direction (upper left direction in FIG. 5).
The light source model is a circular model in which color values for each position on the sphere when light is applied from the light source to the sphere are defined by linear gradation.
More precisely, the light source model defines the brightest color value at the point closest to the light source of the sphere when the light source shines on the sphere, and the darkest color value at the point farthest from the sphere light source. This is a circular model in which a linear gradation is set from a point closest to the light source to a point farthest from the light source.
Also, the linear gradation allows a multi-stage setting, and is defined by setting a ratio of a distance from a point closest to the light source and a color value.
In the example of FIG. 5, gradation is specified in two stages, the ratio of gradation as a branching point is 35%, the maximum color value is 255, and (R, G, B) = (255, 23, 68). It is said.
In this way, it is possible to adjust the degree of light hitting by supporting multi-step gradation.
Also, the difference in the expression of the angle of the edge portion shown in the cross-sectional view of FIG. 3 and the expression of the shadow depending on how the light hits can be easily realized by changing only the color value of the light source model.

***動作の説明***
続いて、上記で定義した光源モデルを、メータ針のエッジ部分のカラー値に割り当てる手法について述べる。
図6に示すように、カラーテーブル生成部1105は、メータ針のエッジ部分の法線方向の角度を取得し、光源モデルの円の中心から、法線方向に線をのばし(602)、円周と交差する点におけるカラー値を、メータ針のエッジ部分のカラー値として採用する(603)。
メータ針のエッジは、メータ針を構成する辺ごとに表示角度が異なるため、1つのメータ針を描画する場合、エッジの角度ごとに、エッジの法線方向を参照し、それぞれに対応するカラー値を抽出する。
図7は、メータ針を構成するベクタデータを分解した図であり、701の回転中心部に位置する天板データ、702の針本体データ、そして703〜707のエッジ部分のデータから構成される。
上記で述べた光源モデルの適用は、メータ針のエッジ部分のデータにのみ適用し、天板データおよび針本体データを描画する際のカラー値は、ベクタデータとして定義されたカラー値を採用し描画する。
こうすることで、回転時のメータ針のエッジにかかる陰影表現を動的に変えることが可能であり、自然で立体的なメータ針を再現できる。
実際に、上記の光源モデルのカラー値を選択するための計算は、図6の604に示すように、光源に最も近い位置からの距離の割合を計算し、表示色を決定する。
光源モデルにおいて、円の直径の長さを2、光の入射角度と針エッジの法線方向間の角度をθとした場合、選択した色のグラデーションの割合は、(1)式により求められる。
(1−cosθ)/2 ・・・(1)
*** Explanation of operation ***
Next, a method for assigning the light source model defined above to the color value of the edge portion of the meter needle will be described.
As shown in FIG. 6, the color table generating unit 1105 acquires the angle in the normal direction of the edge portion of the meter needle, extends the line from the center of the light source model circle in the normal direction (602), The color value at the point of crossing with is adopted as the color value of the edge portion of the meter needle (603).
Since the display angle of the edge of the meter needle is different for each side constituting the meter needle, when drawing one meter needle, the normal direction of the edge is referenced for each edge angle, and the corresponding color value To extract.
FIG. 7 is an exploded view of vector data constituting the meter needle, and is composed of top plate data located at the center of rotation 701, needle body data 702, and edge portion data 703-707.
The light source model described above is applied only to the edge data of the meter needle, and the color values defined as vector data are used for drawing the top plate data and needle body data. To do.
By doing so, it is possible to dynamically change the shadow expression applied to the edge of the meter needle during rotation, and a natural and three-dimensional meter needle can be reproduced.
Actually, the calculation for selecting the color value of the light source model calculates the ratio of the distance from the position closest to the light source and determines the display color, as indicated by reference numeral 604 in FIG.
In the light source model, when the length of the diameter of the circle is 2, and the angle between the light incident angle and the normal direction of the needle edge is θ, the ratio of the gradation of the selected color can be obtained by equation (1).
(1-cos θ) / 2 (1)

図8は、ディスプレイリスト50の例を示す。
描画装置12の描画H/W123が、サブルーチン参照部分の先頭アドレスから順に描画処理命令を実行することにより、メータ針を描画する。。
カラーテーブルでは、図9に示すように、(1−cosθ)/2の値に対応するカラー値が定義されている。
スピードメータを描画する場合は、描画H/W123は、車速の情報を取得し、車速に対応するメータ針の回転軌道上の位置を判別し、エッジごとの(1−cosθ)/2の値を特定し、特定した(1−cosθ)/2の値に対応するカラー値をディスプレイリスト50のカラーテーブルから取得する。
光源モデルとメータ針のエッジのカラー値の対応情報は、カラー値の設定処理命令で参照するデータに反映し、描画H/W123が、針のエッジのパスデータ描画前に毎回参照することにより、動的にメータ針の陰影を描画する。
FIG. 8 shows an example of the display list 50.
The drawing H / W 123 of the drawing device 12 draws the meter needle by executing drawing processing commands in order from the top address of the subroutine reference portion. .
In the color table, as shown in FIG. 9, a color value corresponding to a value of (1-cos θ) / 2 is defined.
When drawing the speedometer, the drawing H / W 123 obtains the vehicle speed information, determines the position of the meter needle on the rotation track corresponding to the vehicle speed, and calculates the value of (1-cos θ) / 2 for each edge. The color value corresponding to the specified (1-cos θ) / 2 is acquired from the color table of the display list 50.
The correspondence information between the light source model and the color value of the edge of the meter needle is reflected in the data referred to by the color value setting processing instruction, and the drawing H / W 123 refers to it every time before drawing the needle edge path data, Dynamically draw the shadow of the meter needle.

次に、カラーテーブルを説明する。
カラーテーブル生成部1105は、図9に示すように、グラデーションの割合に対する陰影部分のカラー値をカラーテーブルとして予め作成しておき、メータ針のエッジの表示角度を入力として、容易にカラー値を取得する仕組みを生成する。
ここで作成するカラーテーブルの階調数は任意であり、針の表示分解能に応じて調整することが望ましい。
ここで作成したカラーテーブルは、図8のカラー値に関するサブルーチンデータ内に格納し、描画H/W123がカラー値の設定処理時に参照することにより、光源モデルで定義した陰影色を動的に反映し、立体的な針を再現する。
このように、カラーテーブル生成部1105は、図6に示す方法にて、エッジの角度ごとにカラー値を抽出するとともに、抽出したカラー値と、光の入射方向とエッジの法線の方向との間の角度(θ)とを対応付け、カラー値とエッジの角度との対応付けが記述されるカラーテーブルを生成する。
Next, the color table will be described.
As shown in FIG. 9, the color table generation unit 1105 creates in advance the color value of the shaded portion with respect to the gradation ratio as a color table, and easily obtains the color value by inputting the display angle of the meter needle edge. Generate a mechanism to do.
The number of gradations of the color table created here is arbitrary, and it is desirable to adjust according to the display resolution of the needle.
The color table created here is stored in the subroutine data relating to the color values in FIG. 8, and the drawing H / W 123 dynamically refers to the shadow color defined in the light source model by referring to the color value setting process. Reproduce a three-dimensional needle.
As described above, the color table generation unit 1105 extracts the color value for each angle of the edge by the method illustrated in FIG. 6, and calculates the extracted color value, the light incident direction, and the edge normal direction. An angle (θ) is associated with each other, and a color table in which the association between the color value and the edge angle is described is generated.

***効果の説明***
以上のように、本実施の形態では、ベクタデータを用いることでメモリ消費量を抑える。
また、特定の方向の光源から球体に光をあてた場合の球体の線形グラデーションが設定されている円形の光源モデル上で、エッジの角度ごとにカラー値を抽出し、抽出したカラー値が示されるディスプレイリストを生成する。
このため、ベクタデータを用いて、エッジの角度に応じてエッジの色合いを変化させてエッジを描画すること可能である。
そして、このようにエッジの角度に応じてエッジの色合いを変化させてエッジを描画することが可能なので、メータ針の回転に合わせて光があたっているエッジと影になっているエッジとを変化させる描画を行うことが可能である。
*** Explanation of effects ***
As described above, in this embodiment, memory consumption is suppressed by using vector data.
In addition, a color value is extracted for each edge angle on a circular light source model in which a linear gradation of a sphere when light is applied from a light source in a specific direction to the sphere, and the extracted color value is indicated. Generate a display list.
For this reason, it is possible to draw an edge by changing the hue of the edge according to the angle of the edge using vector data.
And since it is possible to draw the edge by changing the color of the edge according to the angle of the edge in this way, the edge that is exposed to light and the edge that is shaded change according to the rotation of the meter needle It is possible to perform drawing.

実施の形態2.
実施の形態1では、描画装置12が、ディスプレイリスト生成装置11が生成したカラーテーブルに定義されているカラー値を各エッジに適用してメータ針の描画を行っている。
本実施の形態では、描画装置12が光源モデルを利用してカラーテーブルを生成する。
Embodiment 2. FIG.
In the first embodiment, the drawing device 12 applies a color value defined in the color table generated by the display list generation device 11 to each edge to draw the meter needle.
In the present embodiment, the drawing device 12 generates a color table using a light source model.

本実施の形態では、描画装置12は、図1に示す構成から描画H/W123を省略した構成となる。
そして、本実施の形態では、CPU121が、図10に示す機能モジュールを実現するプログラムを実行して、以下に示す処理が行われる。
プログラムは、メモリ122に格納されている。
また、本実施の形態でも、ディスプレイリスト生成装置11から描画装置12にディスプレイリスト50が出力されるが、本実施の形態に係るディスプレイリスト50は、図8の構成からカラー値の設定及びカラーテーブルが省略されたデータである。
In the present embodiment, the drawing apparatus 12 has a configuration in which the drawing H / W 123 is omitted from the configuration shown in FIG.
In this embodiment, the CPU 121 executes a program that implements the functional module shown in FIG. 10 and performs the following processing.
The program is stored in the memory 122.
Also in the present embodiment, the display list 50 is output from the display list generation device 11 to the drawing device 12, but the display list 50 according to the present embodiment has the color value setting and color table from the configuration of FIG. Is omitted data.

図2において、カラーテーブル生成部1201は、図6に示す光源モデルを用いてカラー値を抽出し、カラーテーブルを生成する。
カラーテーブル生成部1201のカラー値の抽出方法は、実施の形態1のカラーテーブル生成部1105と同じである。
つまり、カラーテーブル生成部1201は、エッジの角度ごとに、図6の光源モデルの中心点からエッジの法線の方向に線をのばし、光源モデルの円周と交差した点におけるカラー値を抽出する。
カラーテーブル生成部1201が生成するカラーテーブルも、図9に示すものと同様である。
In FIG. 2, a color table generation unit 1201 extracts color values using the light source model shown in FIG. 6, and generates a color table.
The color table extraction method of the color table generation unit 1201 is the same as that of the color table generation unit 1105 of the first embodiment.
That is, the color table generation unit 1201 extends the line from the center point of the light source model in FIG. 6 to the normal direction of the edge for each angle of the edge, and extracts a color value at a point intersecting the circumference of the light source model. .
The color table generated by the color table generation unit 1201 is the same as that shown in FIG.

光源モデル記憶部1202は、図6に示す光源モデルを記憶する。
カラーテーブル記憶部1203は、カラーテーブル生成部1201により生成されたカラーテーブルを記憶する。
描画処理部1204は、ディスプレイリスト50及びカラーテーブルを用いてメータ針の描画を行う。
描画処理部1204の描画方法は、実施の形態1の描画H/W123と同様である。
The light source model storage unit 1202 stores the light source model shown in FIG.
The color table storage unit 1203 stores the color table generated by the color table generation unit 1201.
The drawing processing unit 1204 draws the meter hand using the display list 50 and the color table.
The drawing method of the drawing processing unit 1204 is the same as the drawing H / W 123 of the first embodiment.

このように、本実施の形態によれば、専用の描画H/Wを用いなくても、描画用のソフトウェアを実行することにより、ベクタデータを用いて、メータ針の回転に合わせて光があたっているエッジと影になっているエッジとを変化させる描画を行うことが可能である。   As described above, according to the present embodiment, even if the dedicated drawing H / W is not used, the drawing software is executed, so that the vector data is used to illuminate with the rotation of the meter needle. It is possible to perform drawing by changing the edge that is in shadow and the edge that is in shadow.

以上、本発明の実施の形態について説明したが、これら2つの実施の形態を組み合わせて実施しても構わない。
あるいは、これら2つの実施の形態のうち、1つを部分的に実施しても構わない。
あるいは、これら2つの実施の形態を部分的に組み合わせて実施しても構わない。
なお、本発明は、これらの実施の形態に限定されるものではなく、必要に応じて種々の変更が可能である。
Although the embodiments of the present invention have been described above, these two embodiments may be combined and implemented.
Alternatively, one of these two embodiments may be partially implemented.
Alternatively, these two embodiments may be partially combined.
In addition, this invention is not limited to these embodiment, A various change is possible as needed.

10 メータ描画装置、11 ディスプレイリスト生成装置、12 描画装置、20 ベクタデータ、30 BMPデータ、40 スクリプトデータ、50 ディスプレイリスト、111 CPU、112 メモリ、113 HDD、121 CPU、122 メモリ、123 描画H/W、124 VRAM、1101 制御部、1102 スクリプト解析部、1103 ベクタデータ解析部、1104 ディスプレイリスト生成部、1105 カラーテーブル生成部、1106 2Dマトリクス生成部、1107 パスデータ生成部、1108 サブルーチン生成部、1109 ディスプレイリスト出力部、1201 カラーテーブル生成部、1202 光源モデル記憶部、1203 カラーテーブル記憶部、1204 描画処理部。   10 meter drawing device, 11 display list generating device, 12 drawing device, 20 vector data, 30 BMP data, 40 script data, 50 display list, 111 CPU, 112 memory, 113 HDD, 121 CPU, 122 memory, 123 drawing H / W, 124 VRAM, 1101 control unit, 1102 script analysis unit, 1103 vector data analysis unit, 1104 display list generation unit, 1105 color table generation unit, 1106 2D matrix generation unit, 1107 path data generation unit, 1108 subroutine generation unit, 1109 Display list output unit, 1201 color table generation unit, 1202 light source model storage unit, 1203 color table storage unit, 1204 drawing processing unit.

Claims (6)

ベクタデータによるエッジを描画する描画装置が、前記エッジの角度に応じて前記エッジのカラー値を決定するために参照するカラーテーブルを生成するカラーテーブル生成部と、
前記カラーテーブル生成部により生成されたカラーテーブルを前記描画装置に出力するカラーテーブル出力部とを有し、
前記カラーテーブル生成部は、
特定の方向の光源から球体に光をあてた場合の前記球体上の位置ごとのカラー値が線形グラデーションにて定義されている円形の光源モデルから、前記エッジの角度ごとにカラー値を抽出し、前記エッジの角度ごとに、抽出したカラー値が記述されるカラーテーブルを生成するカラーテーブル生成装置。
A drawing device that draws an edge based on vector data; a color table generating unit that generates a color table to be referred to in order to determine a color value of the edge according to the angle of the edge;
A color table output unit that outputs the color table generated by the color table generation unit to the drawing device;
The color table generator is
Extract a color value for each angle of the edge from a circular light source model in which the color value for each position on the sphere when light is applied to the sphere from a light source in a specific direction is defined by a linear gradation, A color table generation device that generates a color table in which extracted color values are described for each angle of the edge.
前記カラーテーブル生成部は、
前記光源モデルの中心点から、前記エッジの角度ごとに、前記エッジの法線の方向に線をのばし、
前記光源モデルの中心点から前記エッジの法線の方向にのばした線が前記光源モデルの円周と交差する点におけるカラー値を抽出し、
前記エッジの角度ごとに、抽出したカラー値が記述されるカラーテーブルを生成する請求項1に記載のカラーテーブル生成装置。
The color table generator is
From the center point of the light source model, for each angle of the edge, a line is extended in the direction of the normal of the edge,
Extracting a color value at a point where a line extending from the center point of the light source model in the direction of the normal of the edge intersects the circumference of the light source model;
The color table generating apparatus according to claim 1, wherein a color table in which the extracted color values are described is generated for each edge angle.
前記カラーテーブル生成部は、
前記エッジに前記特定の方向から光があたっている状態を描画する描画装置が、前記エッジの角度に応じて前記エッジのカラー値を決定するために参照するカラーテーブルを生成する請求項1に記載のカラーテーブル生成装置。
The color table generator is
The drawing apparatus that draws a state in which light is applied to the edge from the specific direction generates a color table that is referred to in order to determine a color value of the edge according to the angle of the edge. Color table generator.
ベクタデータによるエッジを描画する描画装置であって、
特定の方向の光源から球体に光をあてた場合の前記球体上の位置ごとのカラー値が線形グラデーションにて定義されている円形の光源モデルから、前記エッジの角度ごとにカラー値を抽出し、前記エッジの角度ごとに、抽出したカラー値が記述されるカラーテーブルを生成するカラーテーブル生成部と、
前記カラーテーブル生成部により生成されたカラーテーブルを用いて、前記エッジの角度に応じて前記エッジのカラー値を決定し、決定したカラー値で前記エッジを描画する描画処理部とを有する描画装置。
A drawing device for drawing an edge based on vector data,
Extract a color value for each angle of the edge from a circular light source model in which the color value for each position on the sphere when light is applied to the sphere from a light source in a specific direction is defined by a linear gradation, A color table generating unit that generates a color table in which the extracted color value is described for each angle of the edge;
A drawing apparatus comprising: a drawing processing unit that determines a color value of the edge according to an angle of the edge using the color table generated by the color table generation unit, and draws the edge with the determined color value.
前記カラーテーブル生成部は、
前記光源モデルの中心点から、前記エッジの角度ごとに、前記エッジの法線の方向に線をのばし、
前記光源モデルの中心点から前記エッジの法線の方向にのばした線が前記光源モデルの円周と交差する点におけるカラー値を抽出し、
前記エッジの角度ごとに、抽出したカラー値が記述されるカラーテーブルを生成する請求項4に記載の描画装置。
The color table generator is
From the center point of the light source model, for each angle of the edge, a line is extended in the direction of the normal of the edge,
Extracting a color value at a point where a line extending from the center point of the light source model in the direction of the normal of the edge intersects the circumference of the light source model;
The drawing apparatus according to claim 4, wherein a color table in which the extracted color values are described is generated for each edge angle.
前記カラーテーブル生成部は、
前記エッジに前記特定の方向から光があたっている状態を描画する描画処理部が、前記エッジの角度に応じて前記エッジのカラー値を決定するために参照するカラーテーブルを生成する請求項4に記載の描画装置。
The color table generator is
The drawing processing unit for drawing a state in which light is applied to the edge from the specific direction generates a color table to be referred to in order to determine a color value of the edge according to the angle of the edge. The drawing apparatus described.
JP2015055432A 2015-03-18 2015-03-18 Color table generating apparatus and drawing apparatus Expired - Fee Related JP6293081B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015055432A JP6293081B2 (en) 2015-03-18 2015-03-18 Color table generating apparatus and drawing apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015055432A JP6293081B2 (en) 2015-03-18 2015-03-18 Color table generating apparatus and drawing apparatus

Publications (2)

Publication Number Publication Date
JP2016177384A true JP2016177384A (en) 2016-10-06
JP6293081B2 JP6293081B2 (en) 2018-03-14

Family

ID=57071365

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015055432A Expired - Fee Related JP6293081B2 (en) 2015-03-18 2015-03-18 Color table generating apparatus and drawing apparatus

Country Status (1)

Country Link
JP (1) JP6293081B2 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0546076A (en) * 1991-08-13 1993-02-26 Furuno Electric Co Ltd Digital map generator
JPH096983A (en) * 1995-06-22 1997-01-10 Casio Comput Co Ltd Image processing method
JP2001175842A (en) * 1999-12-14 2001-06-29 Sony Corp Map database, plotting device, plotting method, map server, terminal, and map plotting system
JP2002319033A (en) * 2001-04-19 2002-10-31 Taito Corp Shading method in computer graphics
JP2003256864A (en) * 2002-03-06 2003-09-12 Konami Computer Entertainment Japan Inc Texture mapping program
JP2015004583A (en) * 2013-06-20 2015-01-08 矢崎総業株式会社 Display device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0546076A (en) * 1991-08-13 1993-02-26 Furuno Electric Co Ltd Digital map generator
JPH096983A (en) * 1995-06-22 1997-01-10 Casio Comput Co Ltd Image processing method
JP2001175842A (en) * 1999-12-14 2001-06-29 Sony Corp Map database, plotting device, plotting method, map server, terminal, and map plotting system
JP2002319033A (en) * 2001-04-19 2002-10-31 Taito Corp Shading method in computer graphics
JP2003256864A (en) * 2002-03-06 2003-09-12 Konami Computer Entertainment Japan Inc Texture mapping program
JP2015004583A (en) * 2013-06-20 2015-01-08 矢崎総業株式会社 Display device

Also Published As

Publication number Publication date
JP6293081B2 (en) 2018-03-14

Similar Documents

Publication Publication Date Title
CN108648269B (en) Method and system for singulating three-dimensional building models
JP6374982B2 (en) Improved graphics processing by tracking object and / or primitive identifiers
CN106575445B (en) Fur avatar animation
US20160328874A1 (en) Avatar facial expression animations with head rotation
US11663775B2 (en) Generating physically-based material maps
DE102010025310A1 (en) texture sampling
CN104574357B (en) The system and method for datum mark of the positioning with known figure
CN109816770B (en) Oil painting stroke simulation using neural networks
JP5873683B2 (en) How to estimate occlusion in a virtual environment
KR20150108241A (en) Apparatus and method of fast and natural terrain generation
CN115701305A (en) Shadow screening
KR20100053413A (en) A system for indirect lighting and multi-layered displacement mapping using map data and its method
Suárez et al. An open source virtual globe framework for iOS, Android and WebGL compliant browser
JP6293081B2 (en) Color table generating apparatus and drawing apparatus
US11170550B2 (en) Facial animation retargeting using an anatomical local model
Stemkoski et al. Developing graphics frameworks with Python and OpenGL
JP5864474B2 (en) Image processing apparatus and image processing method for processing graphics by dividing space
TWI616844B (en) Facilitating culling of composite objects in graphics processing units when such objects produce no visible change in graphics images
US20210294579A1 (en) Graphics pipeline optimizations
US10803654B2 (en) Three-dimensional human face reconstruction method
Mileff et al. Efficient 2D software rendering
KR20120138185A (en) Graphic image processing apparatus and method for realtime transforming low resolution image into high resolution image
Clayton Metal Programming Guide: Tutorial and Reference Via Swift
Peddie What is a GPU?
Elkin Porting your VR title to oculus quest

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20170123

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20180109

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: 20180116

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20180213

R150 Certificate of patent or registration of utility model

Ref document number: 6293081

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees