JP7315042B2 - Graph drawing method, graph drawing device and computer program - Google Patents

Graph drawing method, graph drawing device and computer program Download PDF

Info

Publication number
JP7315042B2
JP7315042B2 JP2022006436A JP2022006436A JP7315042B2 JP 7315042 B2 JP7315042 B2 JP 7315042B2 JP 2022006436 A JP2022006436 A JP 2022006436A JP 2022006436 A JP2022006436 A JP 2022006436A JP 7315042 B2 JP7315042 B2 JP 7315042B2
Authority
JP
Japan
Prior art keywords
axis
graph
value
drawing area
coordinate
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.)
Active
Application number
JP2022006436A
Other languages
Japanese (ja)
Other versions
JP2022048217A (en
Inventor
直樹 赤江
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Casio Computer Co Ltd
Original Assignee
Casio Computer Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from JP2018079445A external-priority patent/JP7014024B2/en
Application filed by Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP2022006436A priority Critical patent/JP7315042B2/en
Publication of JP2022048217A publication Critical patent/JP2022048217A/en
Application granted granted Critical
Publication of JP7315042B2 publication Critical patent/JP7315042B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Calculators And Similar Devices (AREA)
  • Image Generation (AREA)

Description

本発明は、グラフ描画方法、グラフ描画装置及びコンピュータプログラムに関する。 The present invention relates to a graph drawing method , a graph drawing apparatus and a computer program.

関数に基づくグラフ描画が可能なグラフ関数電卓が知られている。 Graph scientific calculators capable of drawing graphs based on functions are known.

カシオ計算機,fx-CG50 取扱説明書[online],[平成30年4月16日検索]、インターネット<URL:http://support.casio.jp/storage/pdf/004/fx-CG50_Soft_v311_JA.pdf>Casio Computer, fx-CG50 instruction manual [online], [searched on April 16, 2018], Internet <URL: http://support.casio.jp/storage/pdf/004/fx-CG50_Soft_v311_EN.pdf>

例えば、関数y=(-1)のような負の整数のx乗は、xが整数のときのみ値を持つ。グラフ関数電卓やグラフ描画アプリケーションにおいて、このような関数のグラフが正しく表示されるためには、グラフが描画される座標範囲内においてxが任意の整数について、yの値が演算される必要がある。本発明は、グラフが描画される座標範囲内において、関数の第1の変数が任意の整数値を取るように座標値を決定することを目的とする。 For example, a negative integer raised to the power of x, such as the function y=(-1) x , has value only when x is an integer. In order for graphs of such functions to be displayed correctly in graphing calculators and graphing applications, the value of y must be calculated for any integer x within the coordinate range in which the graph is drawn. An object of the present invention is to determine coordinate values such that the first variable of the function takes any integer value within the coordinate range in which the graph is drawn.

本発明の一実施形態は、制御装置によって実行されるグラフ描画方法である。本方法は、表示装置の画面内の少なくとも第1軸を含む座標系が設定された描画エリアに、数式に基づくグラフを、該表示装置により描画させる場合に、前記描画エリアの第1軸に沿う座標幅、及び、前記表示装置の前記描画エリアの前記第1軸に沿う表示ピクセルに基づいて、前記第1軸の数値の刻み幅を決定し、
決定した前記第1軸の数値の刻み幅と、前記描画エリアの第1軸の最小値又は最大値とに基づいて、前記グラフのプロット点の前記第1軸の座標の第2の最小値又は第2の最大値を決定し、
決定した前記グラフのプロット点の前記第1軸の座標の前記第2の最小値又は前記第2の最大値、前記刻み幅、並びに、前記数式に少なくとも基づいて、前記グラフの複数のプロット点の各座標値を決定し、
前記第2の最小値又は前記第2の最大値を決定することは、
前記第2の最小値に、前記第1軸の数値の刻み幅の倍数を加算する、或いは、前記第2の最大値から、前記第1軸の数値の刻み幅の倍数を減算することにより、前記描画エリア内において、任意の整数値をとるように、前記第2の最小値又は前記第2の最大値を決定することを含む
One embodiment of the present invention is a graph drawing method executed by a control device. In this method, when a graph based on a mathematical expression is drawn by the display device in a drawing area in which a coordinate system including at least a first axis in the screen of the display device is set, the step width of the numerical value of the first axis is determined based on the coordinate width along the first axis of the drawing area and the number of display pixels along the first axis of the drawing area of the display device,
Determining a second minimum value or a second maximum value of the coordinates of the plot points of the graph on the first axis based on the determined step size of the numerical value on the first axis and the minimum value or maximum value on the first axis of the drawing area;
each coordinate value of a plurality of plot points of the graph is determined based on at least the second minimum value or the second maximum value of the determined coordinates of the plot points on the first axis of the graph, the step size, and the formula;
Determining the second minimum value or the second maximum value comprises:
Determining the second minimum value or the second maximum value so as to take an arbitrary integer value in the drawing area by adding a multiple of the step size of the numerical value of the first axis to the second minimum value or subtracting a multiple of the step size of the numerical value of the first axis from the second maximum value.

図1は、本発明の一実施形態に係るシステムの一例を示す図である。FIG. 1 is a diagram showing an example of a system according to an embodiment of the invention. 図2は、本発明の一実施形態に係るシステムにおける端末の画面表示の一例を示す図である。FIG. 2 is a diagram showing an example of screen display of a terminal in the system according to one embodiment of the present invention. 図3Aは、本発明の一実施形態に係るシステムの動作の一例を示す図である。FIG. 3A is a diagram illustrating an example of the operation of a system according to one embodiment of the invention. 図3Bは、本発明の一実施形態に係るシステムの動作の一例を示す図である。FIG. 3B is a diagram illustrating an example of the operation of a system according to one embodiment of the invention. 図4は、プロット点のx座標の第1の算出処理の一例を示す図である。FIG. 4 is a diagram showing an example of the first calculation process of the x-coordinate of the plotted point. 図5は、プロット点のx座標の第2の算出処理の一例を示す図である。FIG. 5 is a diagram showing an example of the second calculation process of the x-coordinate of the plotted point. 図6は、端末の画面表示の一例を示す図である。FIG. 6 is a diagram showing an example of screen display of a terminal. 図7は、グラフエリア並行移動後の画面表示の一例を示す図である。FIG. 7 is a diagram showing an example of screen display after the graph area is translated. 図8は、グラフエリアズーム後の画面表示の一例を示す図である。FIG. 8 is a diagram showing an example of screen display after graph area zooming. 図9は、グラフ付箋の大きさ変更後の画面表示の一例を示す図である。FIG. 9 is a diagram showing an example of a screen display after changing the size of the graph sticky note. 図10は、従来と本実施形態との手法を対比して例示した図である。FIG. 10 is a diagram exemplifying a comparison between the conventional technique and the technique of the present embodiment. 図11Aは、本発明の他の実施形態に係るシステムの動作の一例を示す図である。FIG. 11A is a diagram illustrating an example of the operation of a system according to another embodiment of the invention; 図11Bは、本発明の他の実施形態に係るシステムの動作の一例を示す図である。FIG. 11B is a diagram illustrating an example of the operation of a system according to another embodiment of the invention; 図12は、グラフ関数電卓の画面表示の一例を示す図である。FIG. 12 is a diagram showing an example of a screen display of the graph scientific calculator.

本発明の一実施形態について図面を参照して説明する。
図1は、本発明の一実施形態に係るシステム1の構成の一例を示す図である。システム1は、サーバ10と、端末20とを含む。サーバ10と端末20とは、ネットワーク30を介して通信可能に接続される。ネットワーク30は、例えばインターネットである。なお、図1には、1台の端末20のみが示されているが、ネットワーク30を介してサーバ10に接続可能な端末20の台数はこれに限定されない。1以上の端末20が接続可能である。
An embodiment of the present invention will be described with reference to the drawings.
FIG. 1 is a diagram showing an example of the configuration of a system 1 according to one embodiment of the invention. The system 1 includes a server 10 and terminals 20 . The server 10 and the terminal 20 are communicably connected via a network 30 . Network 30 is, for example, the Internet. Although only one terminal 20 is shown in FIG. 1, the number of terminals 20 that can be connected to the server 10 via the network 30 is not limited to this. One or more terminals 20 can be connected.

システム1は、ユーザーが入力した数式(関数)に基づく演算結果により関数のグラフを表示する。システム1では、端末20に入力されたデータ、グラフ描画に係わる設定値及び演算指示が、端末20からサーバ10に送信される。例えば、ユーザーが入力した関数と、グラフエリアの両端の座標と、プロット点の刻み幅との情報がサーバ10に送信される。サーバ10は、当該データ及び演算指示に基づいて演算を実行し、演算結果(プロット点(x,y)のデータ)を端末20に送信する。端末20は、当該演算結果を受信して、これに基づいたグラフを表示する。 The system 1 displays a graph of the function based on the calculation result based on the formula (function) input by the user. In the system 1 , data input to the terminal 20 , setting values and calculation instructions relating to graph drawing are transmitted from the terminal 20 to the server 10 . For example, the function input by the user, the coordinates of both ends of the graph area, and the step size of the plot points are transmitted to the server 10 . The server 10 executes the calculation based on the data and the calculation instruction, and transmits the calculation result (data of plot points (x, y)) to the terminal 20 . The terminal 20 receives the calculation result and displays a graph based thereon.

サーバ10は、プロセッサ11と、ROM12と、RAM13と、ストレージ14と、通信装置15とを有している。これらの各々は、システムバス19を介して互いに接続されている。 The server 10 has a processor 11 , a ROM 12 , a RAM 13 , a storage 14 and a communication device 15 . Each of these is connected to each other via a system bus 19 .

プロセッサ11は、CPU(Central Processing Unit)などの集積回路であってよい。ROM12は、プロセッサ11の動作に用いられる情報を記録している。RAM13は、プロセッサ11の主記憶装置として機能する。ストレージ14には、プロセッサ11で用いられるサーバ制御プログラム、各種演算を実行するための演算プログラム等の各種プログラム、パラメータ等が記憶されている。プロセッサ11は、ストレージ14に記憶されたプログラムに従ってサーバ10の動作を制御する。プロセッサ11として、CPU以外のプロセッサ、例えば、ASIC(Application Specific Integrated Circuit)、FPGA(Field Programmable Gate Array)等が用いられてもよい。通信装置15は、ネットワーク30等の外部の通信ネットワークと通信可能である。 The processor 11 may be an integrated circuit such as a CPU (Central Processing Unit). The ROM 12 records information used for the operation of the processor 11 . RAM 13 functions as a main storage device of processor 11 . The storage 14 stores a server control program used by the processor 11, various programs such as a calculation program for executing various calculations, parameters, and the like. The processor 11 controls operations of the server 10 according to programs stored in the storage 14 . As the processor 11, a processor other than the CPU, such as an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or the like may be used. Communication device 15 can communicate with an external communication network such as network 30 .

端末20は、CPU21と、ROM22と、RAM23と、ストレージ24と、入力装置25と、表示装置26と、通信装置27とを有している。これらの各々は、システムバス29を介して互いに接続されている。端末20は、パーソナルコンピュータ(PC)、タブレット端末、スマートフォンなどの電子機器であってよい。 The terminal 20 has a CPU 21 , a ROM 22 , a RAM 23 , a storage 24 , an input device 25 , a display device 26 and a communication device 27 . Each of these are connected to each other via a system bus 29 . The terminal 20 may be an electronic device such as a personal computer (PC), tablet terminal, or smart phone.

CPU21は、端末20の各種動作を制御するプロセッサである。ROM22は、起動プログラム等を記録している。RAM23は、プロセッサ11の主記憶装置として機能する。ストレージ24には、CPU21で用いられる端末制御プログラム等の各種プログラム、パラメータ等が記憶されている。CPU21は、入力装置25からの入力信号や通信装置27による受信信号に応じて各種プログラムを実行することで端末20の動作を制御する。各種プログラムは、不図示のウェブサーバからネットワーク30、通信装置27を介してストレージ24にダウンロードされてもよい。通信装置27は、ネットワーク30等の外部の通信ネットワークと通信可能である。 The CPU 21 is a processor that controls various operations of the terminal 20 . The ROM 22 records a boot program and the like. RAM 23 functions as a main storage device of processor 11 . The storage 24 stores various programs such as a terminal control program used by the CPU 21, parameters, and the like. The CPU 21 controls the operation of the terminal 20 by executing various programs according to input signals from the input device 25 and signals received by the communication device 27 . Various programs may be downloaded from a web server (not shown) to the storage 24 via the network 30 and the communication device 27 . Communication device 27 can communicate with an external communication network such as network 30 .

入力装置25は、キーボード、マウスなどの外部入力装置、あるいは端末20の表示装置26に表示される入力ボードを含む。入力装置25の操作により、入力インターフェース(I/F)からシステムバス29を介してCPU21に入力信号が入力される。 The input device 25 includes an external input device such as a keyboard and mouse, or an input board displayed on the display device 26 of the terminal 20 . An input signal is input to the CPU 21 via the system bus 29 from the input interface (I/F) by operating the input device 25 .

表示装置26は、液晶ディスプレイなどの外部表示装置、あるいは端末20の液晶ディスプレイなどの表示部を含む。表示装置26には、CPU21からシステムバス29、出力インターフェース(I/F)を介して出力信号が伝送される。 The display device 26 includes an external display device such as a liquid crystal display, or a display unit such as a liquid crystal display of the terminal 20 . An output signal is transmitted from the CPU 21 to the display device 26 via the system bus 29 and an output interface (I/F).

本実施形態では、ユーザーは、端末20で動作するウェブブラウザにおいてサーバ10のアドレスを指定する。端末20のウェブブラウザは、数式の入力受付に応じてサーバ10へのリクエストを発行し、サーバ10が演算プログラムにしたがって実行した演算の結果をサーバ10からのレスポンスとして受信する。言い換えれば、サーバ10は、端末2からの演算のリクエストに応答して、演算プログラムにしたがってプロセッサ11で演算を実行し、実行した演算結果をレスポンスとして端末20に送信する。さらに、端末20は、受信した演算結果を用いて、ウェブブラウザ上で動作するプログラムにしたがってグラフの描画をする。このように、システム1では、端末20のウェブブラウザ上で動作するプログラムとサーバ10の演算プログラムとにより、グラフ描画のためのウェブアプリケーションとしての機能が実現される。 In this embodiment, the user specifies the address of the server 10 in the web browser running on the terminal 20. FIG. The web browser of the terminal 20 issues a request to the server 10 in response to the acceptance of the input of the mathematical expression, and receives the result of the calculation executed by the server 10 according to the calculation program as a response from the server 10 . In other words, the server 10 responds to a calculation request from the terminal 2, executes the calculation by the processor 11 according to the calculation program, and transmits the executed calculation result to the terminal 20 as a response. Furthermore, the terminal 20 draws a graph according to a program running on the web browser using the received calculation result. Thus, in the system 1, a function as a web application for graph drawing is realized by the program operating on the web browser of the terminal 20 and the computing program of the server 10. FIG.

このようなウェブアプリケーションは、例えば、ICT(Information and Communication Technology)化が進む学校教育の現場において、数学の授業等で活用されうる。 Such web applications can be used, for example, in mathematics classes in school education, where ICT (Information and Communication Technology) is advancing.

図2は、表示装置26の画面表示の一例を示す図である。図2において、ウインドウ100には、数式付箋101とグラフ付箋102とが表示されている。数式付箋101は、ユーザーが入力した数式(関数)を表示する付箋である。数式付箋101は、入力装置25からの入力及び当該入力の表示が可能な付箋である。グラフ付箋102は、そのグラフエリア103に、数式付箋101に入力された数式(関数)のグラフが表示される付箋である。グラフエリア103は、最小値xminから最大値xmaxまでのx座標範囲と、最小値yminから最大値ymaxまでのy座標範囲とによって規定される領域である。グラフエリア103は、ユーザーが適宜設定可能である。また、ユーザーの入力により、グラフエリア103の並行移動、拡大、縮小等が可能である。数式付箋101とグラフ付箋102とは互いに紐付けられているため、紐104で結び付けて表示されている。数式付箋101及びグラフ付箋102は、ウインドウ100中で自由に移動可能なフローティングオブジェクトである。 FIG. 2 is a diagram showing an example of a screen display of the display device 26. As shown in FIG. In FIG. 2, a window 100 displays a mathematical sticky note 101 and a graph sticky note 102 . The mathematical sticky note 101 is a sticky note that displays a mathematical formula (function) input by the user. The mathematical sticky note 101 is a sticky note that allows input from the input device 25 and display of the input. The graph sticky note 102 is a sticky note whose graph area 103 displays a graph of the formula (function) input to the formula sticky note 101 . The graph area 103 is defined by an x-coordinate range from the minimum value xmin to the maximum value xmax and a y-coordinate range from the minimum value ymin to the maximum value ymax. The graph area 103 can be appropriately set by the user. In addition, the graph area 103 can be moved in parallel, enlarged, or reduced by user input. Since the mathematical sticky note 101 and the graph sticky note 102 are linked to each other, they are linked by a string 104 and displayed. The formula sticky note 101 and the graph sticky note 102 are floating objects that can be freely moved within the window 100 .

以下、数式付箋101に関数y=f(x)=(-1)が入力されたときのシステム1におけるグラフ描画動作の一例を説明する。 An example of the graph drawing operation in the system 1 when the function y=f(x)=(−1) x is input to the mathematical sticky note 101 will be described below.

端末20は、表示装置26に空の数式付箋101を含むウインドウ100を表示する。空の数式付箋101とは、文字や数字、数式などが何も表示されていない状態の数式付箋である。端末20は、入力装置25を用いて数式付箋101へのユーザーの入力を受け付ける。ユーザーは、入力装置25のキーボードを用いて数式付箋101に数式を入力してもよいし、表示装置26に表示されるソフトウェアキーボードを用いて数式付箋101に数式を入力してもよい。端末20は、入力に応じて、数式付箋101の表示を更新する。ユーザーは、所望の数式を、ここでは関数y=(-1)を入力し終えると、数式を確定させる入力を行う。当該入力が、グラフ描画指示となる。 The terminal 20 displays a window 100 containing an empty mathematical sticky note 101 on the display device 26 . The blank mathematical sticky note 101 is a mathematical sticky note on which no characters, numbers, or mathematical formulas are displayed. The terminal 20 uses the input device 25 to accept user input to the mathematical sticky note 101 . The user may use the keyboard of the input device 25 to input the mathematical formula to the mathematical sticky note 101 , or may use the software keyboard displayed on the display device 26 to input the mathematical formula to the mathematical sticky note 101 . The terminal 20 updates the display of the mathematical sticky note 101 according to the input. When the user finishes inputting the desired formula, in this case the function y=(-1) x , the user performs an input to confirm the formula. The input becomes a graph drawing instruction.

図3A及び図3Bは、本実施形態におけるシステム1のグラフ描画動作の一例を示す図である。 3A and 3B are diagrams showing an example of the graph drawing operation of the system 1 in this embodiment.

ステップS11において、CPU21は、グラフ描画指示を受け付けたか否かを判定する。受け付けたと判定されるまで待機し、受け付けたと判定された場合には(Yes)、処理はステップS12に進む。 In step S11, the CPU 21 determines whether or not a graph drawing instruction has been received. It waits until it is determined that it has been accepted, and if it is determined that it has been accepted (Yes), the process proceeds to step S12.

ステップS12において、CPU21は、プロット点のx座標の第1の算出処理を実行する。以下、図4及び図6を参照して、プロット点のx座標の第1の算出処理について説明する。 In step S12, the CPU 21 executes a first calculation process of the x-coordinate of the plotted point. The first calculation process of the x-coordinate of the plot point will be described below with reference to FIGS. 4 and 6. FIG.

プロット点のx座標の第1の算出処理では、ステップS121において、CPU21は、グラフエリア103のx座標の最小値xmin及び最大値xmaxを特定する。ここでは、図6に示されるように、x座標の最小値xmin=-7.28であり、x座標の最大値xmax=7.28であるとする。 In the first calculation process of the x-coordinate of the plotted point, the CPU 21 specifies the minimum value xmin and the maximum value xmax of the x-coordinate of the graph area 103 in step S121. Here, as shown in FIG. 6, it is assumed that the minimum x-coordinate value xmin=-7.28 and the maximum x-coordinate value xmax=7.28.

ステップS122において、CPU21は、x座標のステップ値であるxstepを特定する。x座標のステップ値xstepとは、プロット点を算出するx座標の刻み値である。x座標のステップ値xstepは、グラフエリア103のx座標の最小値xminからx座標の最大値xmaxまでの幅Δx=xmax-xminの表示ピクセル数に応じて、例えばストレージ24に予め記憶されているステップ値{…,0.01,0.02,0.05,0.1,0.2,0.5,1,2,5,10,20,50,…}のいずれかに設定される。x座標のステップ値は、xstep=n×10m(mは整数、nは10の約数)で表されてよい。これに限らず、xstepが1未満であるときにはn-1×10m、xstepが1以上であるときにはn×10m、(nは自然数、mは整数)を満たすものを独自に設定してもよい。表示ピクセル数は、表示装置26のスペックとグラフエリア103の実寸とで決まる値である。ピクセル単位で、1ピクセル以上で最小になるxstepの値が選択される。例えば、表示ピクセル数が300ピクセルであるとき、Δx/表示ピクセル数={7.28-(-7.28)}/300=0.0485333・・・であるから、xstepの値として上に列記したステップ値の中から0.05が選択される。 In step S122, the CPU 21 identifies xstep, which is the step value of the x-coordinate. The x-coordinate step value xstep is an x-coordinate step value for calculating plot points. The step value XSTEP of the X coordinates is the step value in advance in advance in storage 24, for example, according to the number of pixels of the XMIN of the xmin of the x coordinates of the graph area 103 to the maximum XMAX of the x coordinates. . 05, 0.1, 0.2, 0.5, 2, 5, 10, 20, 50,. The x-coordinate step value may be expressed as xstep=n×10m (where m is an integer and n is a divisor of 10). However, if xstep is less than 1, n−1×10m, and if xstep is 1 or more, n×10m, where n is a natural number and m is an integer, may be independently set. The number of display pixels is a value determined by the specs of the display device 26 and the actual size of the graph area 103 . In pixels, the value of xstep that is the smallest over 1 pixel is chosen. For example, when the number of display pixels is 300 pixels, Δx/the number of display pixels={7.28−(−7.28)}/300=0.0485333 .

このように、前記描画エリアの第1軸に沿う座標幅、及び、前記表示装置の前記描画エリアの前記第1軸に沿う表示ピクセル幅に基づいて、前記第1軸の数値の刻み幅を決定してよい。このとき、前記第1軸の刻み幅は、該刻み幅の前記表示装置の画面上での長さが、前記表示装置の前記第1軸に沿う単位ピクセルの前記表示装置の画面上での長さよりも長くなるように、決定してよい。また、n×10m(mは整数、nは10の約数)で表される数値のうち、前記描画エリアの第1軸に沿う数値幅を前記表示装置の前記描画エリアの前記第1軸に沿う表示ピクセル数で除したときの商以上の最小値を、前記第1軸の刻み幅として決定すればよい。 Thus, the step size of the numerical value of the first axis may be determined based on the coordinate width along the first axis of the drawing area and the display pixel width along the first axis of the drawing area of the display device. At this time, the step width of the first axis may be determined such that the length of the step width on the screen of the display device is longer than the length of the unit pixel along the first axis of the display device on the screen of the display device. Further, among numerical values represented by n×10m (where m is an integer and n is a divisor of 10), the minimum value equal to or greater than the quotient obtained by dividing the numerical width of the drawing area along the first axis by the number of display pixels along the first axis of the drawing area of the display device may be determined as the step size of the first axis.

CPU21は、xstepの値をストレージ24に記憶させる。ここでは、CPU21は、xstepの値として0.05を選択したことをストレージ24に記憶させる。 The CPU 21 stores the value of xstep in the storage 24 . Here, the CPU 21 causes the storage 24 to store that 0.05 is selected as the value of xstep.

ステップS123において、CPU21は、プロットに関するx座標のスタート値xstartを設定する。ここで、xstart=n・xstep かつ xstart≦xminを満たし、最大となるものをxstartとする。つまり、x座標のスタート値xstartは、以下のように表される。
xstart=floor(xmin/xstep)・xstep
ここで、floorは、数値を最も近い整数に切り下げる関数(床関数)である。上述の例では、以下のように表される。
xstart=floor(-7.28/0.05)×0.05=-7.3
In step S123, the CPU 21 sets the x-coordinate start value xstart for plotting. Here, xstart=n·xstep and xstart≦xmin, and the maximum value is defined as xstart. That is, the x-coordinate start value xstart is expressed as follows.
xstart=floor(xmin/xstep) xstep
Here, floor is a function (floor function) that rounds down a numerical value to the nearest integer. In the above example, it is represented as follows.
xstart=floor(−7.28/0.05)×0.05=−7.3

ステップS123では、floor関数の代わりにround関数を用いて、xstartを求めてもよい。
xstart=round(xmin/xstep)・xstep
ここで、roundは、数値を四捨五入し指定した桁数にする関数である。
In step S123, xstart may be obtained using the round function instead of the floor function.
xstart=round(xmin/xstep) xstep
Here, round is a function that rounds off a numerical value to a specified number of digits.

このように、ステップS123では、ステップS122で決定したステップ値の倍数のうち、xminとの差が最も小さいか又は2番目に小さいものを、xstartの値として求めてよい。 Thus, in step S123, among the multiples of the step value determined in step S122, the one with the smallest or second smallest difference from xmin may be obtained as the value of xstart.

ステップS124において、CPU21は、プロットに関するx座標のエンド値xendを設定する。ここで、xend=n・xstep かつ xend≧xmaxを満たし、最小となるものをxendとする。つまり、x座標のエンド値xendは、以下のように表される。 In step S124, the CPU 21 sets the end value xend of the x-coordinate for plotting. Here, xend=n·xstep and xend≧xmax are satisfied, and xend is the minimum value. That is, the x-coordinate end value xend is expressed as follows.

xend=ceil(xmax/xstep)・xstep
ここで、ceilは、数値を最も近い整数に切り上げる関数(天井関数)である。上述の例では、以下のように表される。
xend=ceil(7.28/0.05)×0.05=7.3
xend=ceil(xmax/xstep) xstep
Here, ceil is a function (ceiling function) that rounds up a numerical value to the nearest integer. In the above example, it is represented as follows.
xend = ceil(7.28/0.05) x 0.05 = 7.3

ステップS124では、ceil関数の代わりにround関数を用いて、xendを求めてもよい。
xend=round(xmax/xstep)・xstep
このように、ステップS124では、ステップS122で決定したステップ値の倍数のうち、xmaxとの差が最も小さいか又は2番目に小さいものを、xendの値として求めてよい。
In step S124, xend may be obtained using the round function instead of the ceil function.
xend=round(xmax/xstep) xstep
Thus, in step S124, among the multiples of the step value determined in step S122, the one with the smallest or second smallest difference from xmax may be obtained as the value of xend.

ステップS124の後、処理はリターンする。 After step S124, the process returns.

ステップS13において、CPU21は、演算指示及びグラフ描画に必要な情報をサーバ10に送信する。グラフ描画に必要な情報は、入力された関数y=(-1)、ステップS12で算出したxstep、xstart及びxendの値を含む。 In step S<b>13 , the CPU 21 transmits to the server 10 information necessary for calculation instructions and graph drawing. Information necessary for graph drawing includes the input function y=(-1) x and the values of xstep, xstart and xend calculated in step S12.

ステップS14において、プロセッサ11は、必要な情報を受信し、演算プログラムにしたがって、受信した情報に基づいてグラフ描画のプロット点のy座標の演算を実行する。演算されるプロット点の座標(Xp,Yp)は、以下のように表される。
Xp=xstart+k・xstep
(kは0~(xend-xstart)/xstepの整数)
Yp=f(Xp)
ここでは、Xp=-7.3,-7.25,-7.2,-7.15,-7.1,-7.05,-7,-6.95,…,6.95,7,7.05,7.1,7.15,7.2,7.25,7.3に対してYp=f(Xp)が求められる。
In step S14, the processor 11 receives the necessary information and calculates the y-coordinates of the plotted points in the graph drawing based on the received information according to the calculation program. The coordinates (Xp, Yp) of the calculated plot points are expressed as follows.
Xp=xstart+k·xstep
(k is an integer from 0 to (xend-xstart)/xstep)
Yp=f(Xp)
Here, Yp=f(Xp) is obtained for Xp=−7.3, −7.25, −7.2, −7.15, −7.1, −7.05, −7, −6.95, .

このように、前述の通りxstep、xstart、xendの値を決定したことにより、Xpは、グラフエリア内の任意の整数値、すなわち、xmin≦Xp≦xmaxを満たすすべての整数値をもれなく含むことができる。 Thus, by determining the values of xstep, xstart, and xend as described above, Xp can include any integer value in the graph area, that is, all integer values that satisfy xmin≦Xp≦xmax.

また、関数y=f(x)=(-1)はxが整数のときのみ値を持つから、Yp=f(-7)=-1、Yp=f(-6)=1、…、Yp=f(6)=1、Yp(7)=-1の15個のプロット点の座標(Xp,Yp)が算出される。つまり、前述の通りxstep、xstart、xendの値を決定したことにより、グラフエリア内、すなわち、x座標範囲xmin≦x≦xmaxにおける関数y=(-1)のすべてのプロット点をもれなく描画することができる。このように、前記描画エリアの第1軸の最小値及び/又は最大値、決定した前記刻み幅、並びに、前記数式に少なくとも基づいて、前記グラフの複数のプロット点の各座標値を決定できる。 Also, since the function y=f(x)=(-1) x has a value only when x is an integer, the coordinates (Xp, Yp) of the 15 plot points Yp=f(-7)=-1, Yp=f(-6)=1, . That is, by determining the values of xstep, xstart, and xend as described above, all plot points of the function y=(-1) x in the x coordinate range xmin≦x≦xmax can be drawn without omission. Thus, each coordinate value of a plurality of plot points of the graph can be determined based on at least the minimum value and/or maximum value of the first axis of the drawing area, the determined step size, and the mathematical expression.

プロセッサ11は、演算結果(上述のプロット点の座標(Xp,Yp)の組)を端末20に送信する。 The processor 11 transmits the calculation result (the set of coordinates (Xp, Yp) of the plot points described above) to the terminal 20 .

ステップS15において、CPU21は、演算結果を受信する。CPU21は、受信した演算結果を用いてグラフを描画する。これにより、図6に示されるように、関数y=(-1)のグラフが表示される。これは、xが整数の値のときのみ値がプロットされた数学的に正しいグラフである。 In step S15, the CPU 21 receives the calculation result. The CPU 21 draws a graph using the received computation results. This will display a graph of the function y=(-1) x as shown in FIG. This is a mathematically correct graph where values are plotted only when x is an integer value.

ステップS16において、CPU21は、グラフエリア103のズーム(ズームイン(拡大)又はズームアウト(縮小))指示を受け付けたか否かを判定する。グラフエリア103のズームとは、例えば図8に示されるように、グラフエリア103の目盛を大きく、又は小さくすることを意味する。すなわち、グラフエリア103のズームでは、グラフエリア103のx座標の最小値xmin及び最大値xmaxが変更される。ここでは、グラフ付箋102及びグラフエリア103のサイズの変更は伴わない。 In step S16, the CPU 21 determines whether or not an instruction to zoom (zoom in (enlarge) or zoom out (reduce)) the graph area 103 has been received. Zooming the graph area 103 means increasing or decreasing the scale of the graph area 103 as shown in FIG. 8, for example. That is, when zooming the graph area 103, the minimum value xmin and the maximum value xmax of the x-coordinate of the graph area 103 are changed. Here, the sizes of the graph sticky note 102 and the graph area 103 are not changed.

ステップS16において、ズーム指示を受け付けていないと判定された場合には(No)、処理はステップS17に進む。受け付けたと判定された場合には(Yes)、処理はステップS18に進む。すなわち、ズーム指示を受け付けた場合には、ステップS18において、再び、ステップS12と同様にプロット点のx座標の第1の算出処理が行われる。 If it is determined in step S16 that no zoom instruction has been received (No), the process proceeds to step S17. If it is determined that the request has been received (Yes), the process proceeds to step S18. That is, when a zoom instruction is accepted, in step S18, the first calculation process of the x-coordinate of the plot point is performed again in the same manner as in step S12.

例えば、図8に示されるように、グラフエリア103のズームイン指示によりx座標の最小値xmin=-2.87,x座標の最大値xmax=2.87になったとする。グラフエリア103のサイズ(表示ピクセル数)は変更されていない。この場合、Δx/表示ピクセル数={2.87-(-2.87)}/300=0.0191333・・・であるから、CPU21は、xstepとして上に列記したステップ値の中から0.02を選択する。CPU21は、xstepの値として0.02を選択したことをストレージ24に記憶させる。次いで、CPU21は、xstart=floor(-2.87/0.02)×0.02=-2.88を設定する。さらに、CPU21は、xend=ceil(2.87/0.02)×0.02=2.88を設定する。 For example, as shown in FIG. 8, assume that the zoom-in instruction for the graph area 103 results in the minimum x-coordinate value xmin=-2.87 and the maximum x-coordinate value xmax=2.87. The size (number of display pixels) of the graph area 103 has not been changed. In this case, Δx/the number of display pixels={2.87−(−2.87)}/300=0.0191333 . The CPU 21 causes the storage 24 to store that 0.02 has been selected as the value of xstep. Next, the CPU 21 sets xstart=floor(−2.87/0.02)×0.02=−2.88. Furthermore, the CPU 21 sets xend=ceil(2.87/0.02)×0.02=2.88.

ステップS17において、CPU21は、ウインドウサイズの変更を受け付けたか否かを判定する。ウインドウサイズの変更とは、数式付箋101に対する直接操作ではなく、ウェブアプリケーションに対して、当該数式付箋101が表示されている画面、つまり、ウェブアプリケーションのウインドウサイズを変更するユーザー操作を行ったことに応じて、ウインドウ100の大きさを変更したことを意味している。これに伴い、グラフ付箋102及びグラフエリア103が拡大(又は縮小)されて、グラフエリア103の目盛の大きさが変わっている。 In step S17, the CPU 21 determines whether or not a window size change has been accepted. Changing the size of the window means that the size of the window 100 is changed in response to the user's operation to change the window size of the web application, that is, the screen on which the mathematical sticky note 101 is displayed. Along with this, the graph sticky note 102 and the graph area 103 are enlarged (or reduced), and the size of the scale of the graph area 103 is changed.

ステップS17において、変更を受け付けていないと判定された場合には(No)、処理はステップS22に進む。受け付けたと判定された場合には(Yes)、処理はステップS18に進む。すなわち、ウインドウサイズの変更を受け付けた場合には、ステップS18において、再び、ステップS12と同様にプロット点のx座標の第1の算出が行われる。 If it is determined in step S17 that the change has not been accepted (No), the process proceeds to step S22. If it is determined that the request has been received (Yes), the process proceeds to step S18. That is, when the window size change is accepted, the first calculation of the x-coordinate of the plot point is performed again in step S18 in the same manner as in step S12.

ステップS18の後、処理はステップS19に進む。ステップS19において、CPU21は、演算指示及びグラフ描画に必要な情報をサーバ10に送信する。ステップS20において、プロセッサ11は、必要な情報を受信し、演算プログラムにしたがって、受信した情報に基づいてグラフ描画のプロット点のy座標の演算を実行する。ステップS21において、CPU21は、演算結果を受信する。CPU21は、受信した演算結果を用いて、グラフを更新する。これにより、例えば、グラフエリア103がズームされた後であっても、図8に示されるように、xが整数の値のときのみ値がプロットされたy=(-1)の正しいグラフが表示される。つまり、xが整数の値をとるときのyの値がもれなく、一つもスキップされることなく演算されている。 After step S18, the process proceeds to step S19. In step S<b>19 , the CPU 21 transmits to the server 10 information necessary for calculation instructions and graph drawing. In step S20, the processor 11 receives the necessary information and calculates the y-coordinates of the plotted points in the graph drawing based on the received information according to the calculation program. In step S21, the CPU 21 receives the calculation result. The CPU 21 updates the graph using the received calculation result. This will, for example, display the correct graph of y=(−1) x with values plotted only when x is an integer value, as shown in FIG. 8, even after the graph area 103 has been zoomed. In other words, all the values of y when x takes an integer value are calculated without skipping any of them.

ステップS22において、CPU21は、グラフエリア103の並行移動を受け付けたか否かを判定する。グラフエリア103の並行移動とは、グラフエリア103のサイズを変えることなく、グラフエリア103のx座標の最小値xmin及び最大値xmaxを変えることを意味する。すなわち、グラフエリア103の並行移動では、Δx=xmax-xminは変化しない。受け付けていないと判定された場合には(No)、処理はステップS23に進む。受け付けたと判定された場合には(Yes)、処理はステップS24に進む。 In step S22, the CPU 21 determines whether or not parallel movement of the graph area 103 has been received. Translating the graph area 103 means changing the minimum value xmin and the maximum value xmax of the x-coordinate of the graph area 103 without changing the size of the graph area 103 . That is, Δx=xmax−xmin does not change when the graph area 103 is translated. If it is determined that the request has not been received (No), the process proceeds to step S23. If it is determined that the request has been received (Yes), the process proceeds to step S24.

ステップS23において、CPU21は、グラフ付箋102の大きさの変更を受け付けたか否かを判定する。グラフ付箋102の大きさの変更とは、グラフ付箋102を広げる又は狭める変更であって、グラフエリア103の目盛の大きさを変えずにグラフエリア103のx座標の最小値xmin及び最大値xmaxの少なくとも一方を変更することを意味する。受け付けていないと判定された場合には(No)、処理はステップS28に進む。受け付けたと判定された場合には(Yes)、処理はステップS24に進む。 In step S23, the CPU 21 determines whether or not a change in the size of the graph sticky note 102 has been accepted. Changing the size of the graph sticky 102 means widening or narrowing the graph sticky 102, and means changing at least one of the minimum value xmin and the maximum value xmax of the x-coordinate of the graph area 103 without changing the scale size of the graph area 103. If it is determined that the request has not been received (No), the process proceeds to step S28. If it is determined that the request has been received (Yes), the process proceeds to step S24.

ステップS24において、CPU21は、プロット点のx座標の第2の算出処理を実行する。以下、図5、図7及び図9を参照して、プロット点のx座標の第2の算出処理について説明する。 In step S24, the CPU 21 executes a second calculation process of the x-coordinate of the plotted point. The second calculation process of the x-coordinate of the plot point will be described below with reference to FIGS. 5, 7 and 9. FIG.

プロット点のx座標の第2の算出処理では、ステップS241において、CPU21は、グラフエリアを特定する。例えば、図7では、xmin=-4.23、xmax=10.29であるとする。例えば、図9では、xmin=-15.87、xmax=15.87であるとする。 In the second calculation process of the x-coordinate of the plotted point, in step S241, the CPU 21 identifies the graph area. For example, assume that xmin=−4.23 and xmax=10.29 in FIG. For example, assume that xmin=−15.87 and xmax=15.87 in FIG.

ステップS242において、CPU21は、プロットに関するx座標のスタート値xstartを設定する。ここで、x座標のスタート値xstartは、xstart=floor(xmin/xstep)・xstepで表される。図7に示される例では、以下のように表される。
xstart=floor(-4.23/0.05)×0.05=-4.3
また、図9に示される例では、以下のように表される。
xstart=floor(-15.87/0.05)×0.05=-15.9
In step S242, the CPU 21 sets the x-coordinate start value xstart for plotting. Here, the x-coordinate start value xstart is represented by xstart=floor(xmin/xstep)·xstep. The example shown in FIG. 7 is expressed as follows.
xstart=floor(−4.23/0.05)×0.05=−4.3
Moreover, in the example shown in FIG. 9, it is represented as follows.
xstart=floor(−15.87/0.05)×0.05=−15.9

ステップS243において、CPU21は、プロットに関するx座標のエンド値xendを設定する。ここで、x座標のエンド値xendは、xend=ceil(xmax/xstep)・xstepで表される。図7に示される例では、以下のように表される。
xend=ceil(10.29/0.05)×0.05=10.3
また、図9に示される例では、以下のように表される。
xend=ceil(15.87/0.05)×0.05=15.9
In step S243, the CPU 21 sets the end value xend of the x-coordinate for plotting. Here, the end value xend of the x-coordinate is represented by xend=ceil(xmax/xstep)·xstep. The example shown in FIG. 7 is expressed as follows.
xend=ceil(10.29/0.05)*0.05=10.3
Moreover, in the example shown in FIG. 9, it is represented as follows.
xend = ceil(15.87/0.05) x 0.05 = 15.9

ステップS243の後、処理はリターンする。このように、プロット点のx座標の第2の算出処理では、xstepの値は0.05のままであり、再設定されない。グラフエリア103の並行移動あるいはグラフ付箋102の大きさの変更がなされてもΔx/表示ピクセル数が変化しないため、xstepの値を再設定しなくてよいからである。したがって、以上説明したプロット点のx座標の第2の算出処理では、xstepの値を算出する処理は行われない。 After step S243, the process returns. Thus, in the second calculation process of the x-coordinate of the plotted point, the value of xstep remains 0.05 and is not reset. This is because Δx/the number of display pixels does not change even if the graph area 103 is moved in parallel or the size of the graph tag 102 is changed, so the value of xstep need not be reset. Therefore, in the second calculation process of the x-coordinate of the plot point described above, the process of calculating the value of xstep is not performed.

ステップS24の後、処理はステップS25に進む。ステップS25において、CPU21は、演算指示及びグラフ描画に必要な情報をサーバ10に送信する。グラフ描画に必要な情報は、入力された関数y=(-1)、ステップS24で算出したxstart及びxendの値、及びストレージ24に記憶されている現在のxstepの値を含む。ステップS26において、プロセッサ11は、必要な情報を受信し、演算プログラムにしたがって、受信した情報に基づいてグラフ描画のプロット点のy座標の演算を実行する。ステップS27において、CPU21は、演算結果を受信する。CPU21は、受信した演算結果を用いて、グラフを更新する。これにより、グラフエリア103が並行移動されてもグラフ付箋102の大きさが変更されても、図7及び図9に示されるように、xが整数の値のときのみ値がプロットされたy=(-1)の正しいグラフが表示される。つまり、xが整数の値をとるときのyの値がもれなく、一つもスキップされることなく演算されている。 After step S24, the process proceeds to step S25. In step S<b>25 , the CPU 21 transmits to the server 10 information necessary for calculation instructions and graph drawing. Information necessary for graph drawing includes the input function y=(−1) x , the xstart and xend values calculated in step S 24 , and the current xstep value stored in the storage 24 . In step S26, the processor 11 receives the necessary information and, according to the calculation program, calculates the y-coordinate of the plot point for drawing the graph based on the received information. In step S27, the CPU 21 receives the calculation result. The CPU 21 updates the graph using the received calculation result. As a result, even if the graph area 103 is moved in parallel or the size of the graph sticky note 102 is changed, the correct graph of y=(-1) x , in which values are plotted only when x is an integer value, is displayed as shown in FIGS. In other words, all the values of y when x takes an integer value are calculated without skipping any of them.

ステップS27の後、処理はステップS28に進む。ステップS28において、プロセッサ11は、処理を終了するか否かを判定する。終了すると判定されるまで、ステップS16以降の処理が繰り返される。終了すると判定された場合には(Yes)、処理は終了する。 After step S27, the process proceeds to step S28. At step S28, the processor 11 determines whether or not to end the process. The processing after step S16 is repeated until it is determined to end. If it is determined to end (Yes), the process ends.

例えば、入力された関数に基づくグラフ描画が可能な従来のグラフ関数電卓では、グラフを描画する際に、グラフエリアの設定値(xmin,xmax,xdot)を使ってプロット点のx座標を算出し、それらのx座標から各プロット点のy座標を計算している。ここで、xdotは、xstepに相当する刻み値である。具体的には、各プロット点のx座標は、x=xmin+k・xdot(kは整数)という計算式で表される。この計算式を使った場合、xminとxdotがキリのよい数値であれば、xが整数になるkが存在する(例えば、xmin=-5、xdot=0.2)。 For example, in a conventional graph calculator capable of drawing a graph based on an input function, when drawing a graph, the x-coordinates of the plotted points are calculated using the set values (xmin, xmax, xdot) of the graph area, and the y-coordinates of each plotted point are calculated from those x-coordinates. Here, xdot is a step value corresponding to xstep. Specifically, the x-coordinate of each plotted point is represented by the formula x=xmin+k·xdot (k is an integer). When this formula is used, if xmin and xdot are sharp numbers, there exists k where x is an integer (eg, xmin=-5, xdot=0.2).

しかしながら、上記の計算式の通りxの値を決定したときに、xminやxdotがキリの悪い数値であると、xが整数になるkが存在しない場合がある。つまり、上記の計算式の通りxの値を決定すると、グラフエリア内のすべての整数値、すなわち、xmin≦x≦xmaxを満たすすべての整数値をもれなく含まない場合がある。例えば、図6のように、x座標の最小値xmin=-7.28、最大値xmax=7.28である場合、xdot=0.2であれば、プロット点のx座標は、x=-7.28,-7.08,-6.88,…,6.88,7.08,7.28となり、xが整数となるkが存在しないこととなる。 However, when the value of x is determined according to the above formula, if xmin and xdot are poorly defined values, there may be no k where x is an integer. That is, when the value of x is determined according to the above formula, all integer values in the graph area, that is, all integer values satisfying xmin≦x≦xmax may not be included. For example, as shown in FIG. 6, when the minimum x-coordinate value xmin=-7.28 and the maximum value xmax=7.28, if xdot=0.2, the x-coordinates of the plotted points are x=-7.28, -7.08, -6.88, . . . , 6.88, 7.08, 7.28.

特に、y=(-1)のような負の整数のx乗のグラフは、xが整数のときのみ値を持つグラフである。このため、xが整数になるkが存在しないケースではグラフが正しく表示されない。特に、数学的に正しくないグラフが描画されたり、ズームしたグラフに点がプロットされなかったりしうる。 In particular, graphs of negative integers raised to the power of x, such as y=(-1) x , are graphs that have values only when x is an integer. Therefore, the graph will not be displayed correctly if there is no k where x is an integer. In particular, mathematically incorrect graphs may be drawn or points may not be plotted in zoomed graphs.

これに対して、本実施形態では、関数の第1の変数(例えばx)が任意の整数値を取るようにx座標の値が決定される。換言すれば、プロット点のx座標が整数となるように、x座標範囲の刻み値xstepとプロット点のx座標に係わるxstart及びxendとの値を設定している。これにより、xが整数の値をとるときのyの値が確実に演算される。例えば、y=f(x)=(-1)のような負のx乗のグラフをグラフエリアの設定にかかわらず正しく描画することができる。 In contrast, in this embodiment, the value of the x-coordinate is determined such that the first variable (eg, x) of the function takes any integer value. In other words, the step value xstep of the x-coordinate range and the values of xstart and xend related to the x-coordinate of the plotted point are set so that the x-coordinate of the plotted point is an integer. This reliably computes the value of y when x takes an integer value. For example, a negative x power graph such as y=f(x)=(-1) x can be drawn correctly regardless of the setting of the graph area.

図10は、上述したような従来のグラフ関数電卓での手法によるxmin/xmaxとxdotの設定、及び、本実施形態におけるxstart/xendとxstepの設定との対比を例示した図である。図10中の項目における「〇」は、その値を更新することを意味する。本実施形態では、xmin/xmaxに対して新たに導入した値であるxstart/xendが、グラフエリア並行移動、グラフエリアズーム、グラフ付箋の大きさ変更及びウインドウサイズ変更の操作時に更新される。また、刻み値であるxstepは、グラフエリアズーム及びウインドウサイズの変更の操作時に更新される。なお、従来のウインドウサイズの変更の項目における「-」は、従来のグラフ関数電卓においてウインドウサイズの変更が実装されていないことを意味する。 FIG. 10 is a diagram exemplifying a comparison between xmin/xmax and xdot settings according to the method of the conventional graphing calculator as described above and xstart/xend and xstep settings in this embodiment. “O” in the items in FIG. 10 means that the value is updated. In this embodiment, xstart/xend, which are newly introduced values for xmin/xmax, are updated during graph area translation, graph area zoom, graph sticky resize, and window resize operations. Also, the step value xstep is updated when graph area zoom and window size change operations are performed. Note that "-" in the conventional window size change item means that window size change is not implemented in the conventional graph calculator.

負のx乗のグラフ以外にも、xが整数の値をとるときのyの値が確実に演算されることが役立つ場面がある。例えば、このようなグラフ描画アプリケーションを学校教育の現場で、例えば数学の授業で活用する場合、ユーザー(例えば生徒)は、グラフエリアの設定によらず、xが整数の値をとるときのyの値を取得可能である。これは、関数やグラフの性質の理解の助けとなる。 In addition to graphs of negative powers of x, there are situations where it is useful to reliably compute the value of y when x is an integer. For example, when such a graph drawing application is used in school education, for example, in mathematics classes, a user (for example, a student) can obtain the value of y when x is an integer regardless of the setting of the graph area. This helps us understand the properties of functions and graphs.

本実施形態では、数式(関数)の種類から場合分けした演算処理によりプロット点を算出するのではなく、全ての種類の数式に対して同じ処理を適用してグラフを描画することができる。したがって、演算処理用プログラムのソースコードの量を大幅に増やさずに済むという利点を有する。 In this embodiment, plot points can be drawn by applying the same processing to all types of mathematical formulas instead of calculating plot points by arithmetic processing classified according to the types of formulas (functions). Therefore, there is an advantage that the amount of source code for the arithmetic processing program does not have to be greatly increased.

なお、x座標の刻み値xstepとして1/3などを設定してもよいが、この場合、1/3=0.333・・・となる。本システムには、グラフエリア103上の座標を表示する機能が備わっているが、この場合、小数表示設定における座標表示が長くなりうる。xstepとして1/2、1/4、1/5、1/10などを設定すれば、座標表示が短くてよい。また、グラフエリア103のグリッドの太線が1、2、5刻みであれば、xstepが1未満であるときにはn-1×10m、xstepが1以上であるときにはn×10m、(mは整数、nは10の約数)を設定すると太線グリッド上の座標点が必ず表示される。 Although 1/3 or the like may be set as the step value xstep of the x-coordinate, in this case, 1/3=0.333 . . . This system has a function to display the coordinates on the graph area 103, but in this case, the coordinate display in the decimal display setting can be long. If xstep is set to 1/2, 1/4, 1/5, 1/10, etc., the coordinate display can be shortened. Also, if the thick lines of the grid in the graph area 103 are increments of 1, 2, and 5, n−1×10 m when xstep is less than 1, n×10 m when xstep is 1 or more, and (m is an integer and n is a divisor of 10), coordinate points on the thick grid are always displayed.

以上の説明では、サーバ10からの演算結果であるプロット点のデータ(x,y)がグラフエリア103にプロットされるグラフ描画を例示したが、プロット点のデータ(x,y)が端末20の表示装置26に数表として表示されてもよい。例えば、ウインドウ100に当該数表を表示する数表付箋が表示されてよい。 In the above description, the plot point data (x, y), which is the calculation result from the server 10, is plotted in the graph area 103, but the plot point data (x, y) may be displayed as a numerical table on the display device 26 of the terminal 20. For example, a numerical table tag displaying the numerical table may be displayed in the window 100 .

ここまで、プロット点のx座標の算出処理が端末20で実行される一実施形態を説明してきたが、当該処理はサーバ10で実行されてもよい。図11A及び図11Bは、そのような実施形態におけるシステム1のグラフ描画動作の一例を示す図である。 So far, an embodiment has been described in which the process of calculating the x-coordinate of the plot point is executed by the terminal 20 , but the process may be executed by the server 10 . 11A and 11B are diagrams showing an example of the graph drawing operation of system 1 in such an embodiment.

ステップS31において、CPU21は、グラフ描画指示を受け付けたか否かを判定する。受け付けたと判定されるまで待機し、受け付けたと判定された場合には(Yes)、処理はステップS32に進む。 In step S31, the CPU 21 determines whether or not a graph drawing instruction has been received. It waits until it is determined that it has been accepted, and if it is determined that it has been accepted (Yes), the process proceeds to step S32.

ステップS32において、CPU21は、演算指示及び演算に必要な情報をサーバ10に送信する。演算に必要な情報は、入力された関数及びグラフエリアの情報を含む。 In step S<b>32 , the CPU 21 transmits to the server 10 a computation instruction and information necessary for computation. The information required for the calculation includes the input function and graph area information.

ステップS33において、プロセッサ11は、必要な情報を受信する。ステップS34において、プロセッサ11は、プロット点のx座標の第1の算出処理を実行する。つまり、図4に示されるのと同様の処理が実行される。ステップS35において、プロセッサ11は、演算プログラム、入力された関数及びステップS34で算出したxstep、xstart及びxendの値に基づいてグラフ描画のプロット点のy座標の演算を実行する。プロセッサ11は、演算結果を端末20に送信する。 At step S33, processor 11 receives the necessary information. At step S34, the processor 11 executes a first calculation process of the x-coordinate of the plotted point. That is, processing similar to that shown in FIG. 4 is executed. In step S35, the processor 11 calculates the y-coordinates of the plotted points in the graph drawing based on the calculation program, the input function, and the xstep, xstart, and xend values calculated in step S34. Processor 11 transmits the calculation result to terminal 20 .

ステップS36において、CPU21は、演算結果を受信する。CPU21は、受信した演算結果を用いて、グラフを描画する。 In step S36, the CPU 21 receives the calculation result. The CPU 21 draws a graph using the received calculation results.

ステップS37において、CPU21は、グラフエリア103のズーム指示を受け付けたか否かを判定する。受け付けていないと判定された場合には(No)、処理はステップS38に進む。受け付けたと判定された場合には(Yes)、処理はステップS39に進む。 In step S37, the CPU 21 determines whether or not an instruction to zoom the graph area 103 has been received. If it is determined that the request has not been received (No), the process proceeds to step S38. If it is determined that the request has been received (Yes), the process proceeds to step S39.

ステップS38において、CPU21は、ウインドウサイズの変更を受け付けたか否かを判定する。受け付けていないと判定された場合には(No)、処理はステップS44に進む。受け付けたと判定された場合には(Yes)、処理はステップS39に進む。 In step S38, the CPU 21 determines whether or not a window size change has been accepted. If it is determined that the request has not been received (No), the process proceeds to step S44. If it is determined that the request has been received (Yes), the process proceeds to step S39.

ステップS39において、CPU21は、演算指示及び演算に必要な情報をサーバ10に送信する。ステップS40において、プロセッサ11は、必要な情報を受信する。ステップS41において、プロセッサ11は、プロット点のx座標の第1の算出処理を実行する。つまり、図4に示されるのと同様の処理が実行される。ステップS42において、プロセッサ11は、演算プログラム、入力された関数及びステップS41で算出したxstep、xstart及びxendの値に基づいてグラフ描画のプロット点のy座標の演算を実行する。プロセッサ11は、演算結果を端末20に送信する。 In step S<b>39 , the CPU 21 transmits to the server 10 a computation instruction and information necessary for computation. At step S40, processor 11 receives the necessary information. At step S41, the processor 11 executes a first calculation process of the x-coordinate of the plotted point. That is, processing similar to that shown in FIG. 4 is executed. In step S42, the processor 11 calculates the y-coordinates of the plotted points in the graph drawing based on the calculation program, the input function, and the xstep, xstart, and xend values calculated in step S41. Processor 11 transmits the calculation result to terminal 20 .

ステップS43において、CPU21は、演算結果を受信する。CPU21は、受信した演算結果を用いて、グラフを更新する。 In step S43, the CPU 21 receives the calculation result. The CPU 21 updates the graph using the received calculation results.

ステップS44において、CPU21は、グラフエリア103の並行移動を受け付けたか否かを判定する。受け付けていないと判定された場合には(No)、処理はステップS45に進む。受け付けたと判定された場合には(Yes)、処理はステップS46に進む。 In step S44, the CPU 21 determines whether or not parallel movement of the graph area 103 has been received. If it is determined that the request has not been accepted (No), the process proceeds to step S45. If it is determined that the request has been received (Yes), the process proceeds to step S46.

ステップS45において、CPU21は、グラフ付箋102の大きさの変更を受け付けたか否かを判定する。受け付けていないと判定された場合には(No)、処理はステップS51に進む。受け付けたと判定された場合には(Yes)、処理はステップS46に進む。 In step S45, the CPU 21 determines whether or not a change in the size of the graph sticky note 102 has been accepted. If it is determined that the request has not been received (No), the process proceeds to step S51. If it is determined that the request has been received (Yes), the process proceeds to step S46.

ステップS46において、CPU21は、演算指示及び演算に必要な情報をサーバ10に送信する。ステップS47において、プロセッサ11は、必要な情報を受信する。ステップS48において、プロセッサ11は、プロット点のx座標の第2の算出処理を実行する。つまり、図5に示されるのと同様の処理が実行される。ステップS48において、プロセッサ11は、演算プログラム、入力された関数及びステップS48で算出したxstart及びxendの値、及びストレージ24に記憶されている現在のxstepの値に基づいてグラフ描画のプロット点のy座標の演算を実行する。プロセッサ11は、演算結果を端末20に送信する。 In step S<b>46 , the CPU 21 transmits to the server 10 a calculation instruction and information necessary for the calculation. At step S47, processor 11 receives the necessary information. At step S48, the processor 11 executes a second calculation process of the x-coordinate of the plotted point. That is, processing similar to that shown in FIG. 5 is executed. In step S48, the processor 11 calculates the y-coordinates of the plotted points in the graph drawing based on the calculation program, the input function, the xstart and xend values calculated in step S48, and the current xstep value stored in the storage 24. Processor 11 transmits the calculation result to terminal 20 .

ステップS50において、CPU21は、演算結果を受信する。CPU21は、受信した演算結果を用いて、グラフを更新する。 In step S50, the CPU 21 receives the calculation result. The CPU 21 updates the graph using the received calculation result.

ステップS50の後、処理はステップS51に進む。ステップS51において、プロセッサ11は、処理を終了するか否かを判定する。終了すると判定されるまで、ステップS37以降の処理が繰り返される。終了すると判定された場合には(Yes)、処理は終了する。 After step S50, the process proceeds to step S51. In step S51, the processor 11 determines whether or not to end the process. The processes after step S37 are repeated until it is determined to end. If it is determined to end (Yes), the process ends.

以上、端末20のウェブブラウザ上で動作するプログラムとサーバ10の演算プログラムとが協働するウェブアプリケーションについて説明してきたが、上述したようなグラフ描画の概念は、ウェブアプリケーション以外にも適用可能である。例えば、グラフ関数電卓などの電子機器におけるグラフ描画アルゴリズムにも適用可能である。図12は、グラフ関数電卓50の表示画面の一例を示す図である。グラフ関数電卓50には、数式付箋101に相当する数式入力領域51と、グラフ付箋102のグラフエリア103に相当するグラフ描画領域52とが表示される。このようなグラフ関数電卓50では、上述の端末20とサーバ10との通信を必要とすることなく、グラフ関数電卓50の不図示のCPU等による内部処理で図3A及び図3B、あるいは図11A及び図11Bに示されるような動作が実現されてよい。 The web application in which the program operating on the web browser of the terminal 20 and the computing program of the server 10 work together has been described above, but the concept of graph drawing as described above can be applied to other than web applications. For example, it can also be applied to graph drawing algorithms in electronic devices such as graph scientific calculators. FIG. 12 is a diagram showing an example of the display screen of the graphical scientific calculator 50. As shown in FIG. The graph function calculator 50 displays a formula input area 51 corresponding to the formula tag 101 and a graph drawing area 52 corresponding to the graph area 103 of the graph tag 102 . In such a graphing calculator 50, the operations shown in FIGS. 3A and 3B, or FIGS.

なお、本願発明は、上記実施形態に限定されるものではなく、実施段階ではその要旨を逸脱しない範囲で種々に変形することが可能である。また、各実施形態は可能な限り適宜組み合わせて実施してもよく、その場合組み合わせた効果が得られる。更に、上記実施形態には種々の段階の発明が含まれており、開示される複数の構成要件における適当な組み合わせにより種々の発明が抽出され得る。例えば、実施形態に示される全構成要件からいくつかの構成要件が削除されても、発明が解決しようとする課題の欄で述べた課題が解決でき、発明の効果の欄で述べられている効果が得られる場合には、この構成要件が削除された構成が発明として抽出され得る。 It should be noted that the present invention is not limited to the above-described embodiments, and can be variously modified in the implementation stage without departing from the gist of the invention. Moreover, each embodiment may be implemented in combination as much as possible, and in that case, the combined effect can be obtained. Furthermore, the above-described embodiments include inventions at various stages, and various inventions can be extracted by appropriately combining a plurality of disclosed constituent elements. For example, even if some constituent elements are deleted from all the constituent elements shown in the embodiment, if the problem described in the column of the problem to be solved by the invention can be solved and the effect described in the column of the effect of the invention can be obtained, a configuration in which these constituent elements are deleted can be extracted as an invention.

以下に、本願出願の当初の特許請求の範囲に記載された発明を付記する。
[1]制御装置によって実行されるグラフ描画方法であって、
表示装置の画面内の少なくとも第1軸を含む座標系が設定された描画エリアに、数式に基づくグラフを、該表示装置により描画させる場合に、
前記描画エリアの第1軸に沿う座標幅、及び、前記表示装置の前記描画エリアの前記第1軸に沿う表示ピクセル幅に基づいて、前記第1軸の数値の刻み幅を決定し、
前記第1軸の数値の刻み幅の倍数のうち、前記描画エリアの第1軸の最小値又は最大値との差が最も小さい又は2番目に小さい数値を、前記グラフのプロット点の前記第1軸の座標の最小値又は最大値とし、
前記グラフのプロット点の前記第1軸の座標の最小値又は最大値、前記刻み幅、並びに、前記数式に少なくとも基づいて、前記グラフの複数のプロット点の各座標値を決定し、
決定した前記グラフの複数のプロット点の各座標値に基づいて、前記グラフを、前記表示装置により前記描画エリアに描画させる、ことを含む方法。
[2]前記第1軸の刻み幅は、該刻み幅の前記表示装置の前記画面上での長さが、前記表示装置の前記第1軸に沿う単位ピクセルの前記表示装置の前記画面上での長さよりも長くなるように、決定される、ことを含む、[1]に記載の方法。
[3]n×10m(mは整数、nは10の約数)で表される数値のうち、前記描画エリアの第1軸に沿う数値幅を前記表示装置の前記描画エリアの前記第1軸に沿う表示ピクセル幅で除したときの商以上の最小値を、前記第1軸の刻み幅として決定する、ことを含む、[1]又は[2]に記載の方法。
[4]前記描画エリアに設定された座標範囲が拡がる或いは狭まるように変更したとき、前記方法が実行されるアプリケーションソフトウエアの前記描画エリアを含むウインドウのサイズが変更したとき、又は、前記描画エリアの第1軸に沿う座標幅と該描画エリアの前記第1軸に沿う表示ピクセル幅の比の変更を伴いながら、該描画エリアの前記第1軸に沿う座標幅が変更されたとき、
変更後の前記描画エリアの第1軸に沿う座標幅、及び、変更後の該描画エリアの前記第1軸に沿う表示ピクセル幅に基づいて、前記刻み幅を再計算して決定する、ことをさらに含む[1]乃至[3]のいずれか1に記載の方法。
[5]前記描画エリアに設定された座標範囲が並行移動するように変更したとき、前記描画エリアのサイズが変更したとき、又は、前記描画エリアの第1軸に沿う座標幅と該描画エリアの前記第1軸に沿う表示ピクセル幅の比の変更を伴わずに、該描画エリアの前記第1軸に沿う座標幅が変更されたとき、
前記前記刻み幅を再計算せずに、変更後の前記描画エリアの第1軸の最小値及び/又は最大値、変更前の前記刻み幅、並びに、前記数式に少なくとも基づいて、前記グラフの複数のプロット点の各座標値を決定する、
ことをさらに含む[1]乃至[4]のいずれか1に記載の方法。
[6]グラフ描画システムの制御装置により読み取り可能なコンピュータプログラムであって、
前記制御装置によって、
表示装置の画面内の少なくとも第1軸を含む座標系が設定された描画エリアに、数式に基づくグラフを、該表示装置により描画させる場合に、
前記描画エリアの第1軸に沿う座標幅、及び、前記表示装置の前記描画エリアの前記第1軸に沿う表示ピクセル幅に基づいて、前記第1軸の数値の刻み幅を決定させ、
前記第1軸の数値の刻み幅の倍数のうち、前記描画エリアの第1軸の最小値又は最大値との差が最も小さい又は2番目に小さい数値を、前記グラフのプロット点の前記第1軸の座標の最小値又は最大値とさせ、
前記グラフのプロット点の前記第1軸の座標の最小値又は最大値、前記刻み幅、並びに、前記数式に少なくとも基づいて、前記グラフの複数のプロット点の各座標値を決定させ、
決定した前記グラフの複数のプロット点の各座標値に基づいて、前記グラフを、前記表示装置により前記描画エリアに描画させる、コンピュータプログラム。
[7]表示装置の画面内の少なくとも第1軸を含む座標系が設定された描画エリアに、数式に基づくグラフを、該表示装置により描画させる場合に、
前記描画エリアの第1軸に沿う座標幅、及び、前記表示装置の前記描画エリアの前記第1軸に沿う表示ピクセル幅に基づいて、前記第1軸の数値の刻み幅を決定し、
前記第1軸の数値の刻み幅の倍数のうち、前記描画エリアの第1軸の最小値又は最大値との差が最も小さい又は2番目に小さい数値を、前記グラフのプロット点の前記第1軸の座標の最小値又は最大値とし、
前記グラフのプロット点の前記第1軸の座標の最小値又は最大値、前記刻み幅、並びに、前記数式に少なくとも基づいて、前記グラフの複数のプロット点の各座標値を決定し、
決定した前記グラフの複数のプロット点の各座標値に基づいて、前記グラフを、前記表示装置により前記描画エリアに描画させる、制御装置を備えるグラフ描画システム。
The invention described in the original claims of the present application is appended below.
[1] A graph drawing method executed by a control device,
When a graph based on a mathematical expression is drawn by the display device in a drawing area in which a coordinate system including at least the first axis in the screen of the display device is set,
Based on the coordinate width along the first axis of the drawing area and the display pixel width along the first axis of the drawing area of the display device, determining the step size of the numerical value of the first axis;
Among the multiples of the step size of the numerical value of the first axis, the numerical value with the smallest or second smallest difference from the minimum value or maximum value of the first axis of the drawing area is the minimum value or maximum value of the coordinate of the first axis of the plot point of the graph;
Determining each coordinate value of a plurality of plot points of the graph based on at least the minimum or maximum value of the coordinates of the first axis of the plot points of the graph, the step size, and the formula;
and causing the display device to draw the graph in the drawing area based on the determined coordinate values of the plurality of plot points of the graph.
[2] The method according to [1], wherein the step size of the first axis is determined so that the length of the step size on the screen of the display device is longer than the length of a unit pixel along the first axis of the display device on the screen of the display device.
[3] The method according to [1] or [2], including determining, as the step size of the first axis, the minimum value that is equal to or greater than the quotient of the numerical width along the first axis of the drawing area of the display device divided by the display pixel width along the first axis among the numerical values represented by n×10 m (where m is an integer and n is a divisor of 10).
[4] when the coordinate range set in the drawing area is changed to expand or narrow, when the size of the window containing the drawing area of the application software in which the method is executed is changed, or when the coordinate width of the drawing area along the first axis is changed accompanied by a change in the ratio of the coordinate width along the first axis of the drawing area to the display pixel width of the drawing area along the first axis;
The method according to any one of [1] to [3], further comprising recalculating and determining the step size based on the coordinate width along the first axis of the drawing area after the change and the display pixel width along the first axis of the drawing area after the change.
[5] when the coordinate range set in the drawing area is changed so as to move in parallel, when the size of the drawing area is changed, or when the coordinate width of the drawing area along the first axis is changed without changing the ratio of the coordinate width of the drawing area along the first axis and the display pixel width of the drawing area along the first axis;
Without recalculating the step size, each coordinate value of a plurality of plot points of the graph is determined based at least on the minimum and/or maximum value of the first axis of the drawing area after change, the step size before change, and the formula;
The method according to any one of [1] to [4], further comprising:
[6] A computer program readable by a control device of a graph drawing system,
By said controller,
When a graph based on a mathematical expression is drawn by the display device in a drawing area in which a coordinate system including at least the first axis in the screen of the display device is set,
determining the step size of the numerical value of the first axis based on the coordinate width along the first axis of the drawing area and the display pixel width along the first axis of the drawing area of the display device;
Among the multiples of the step size of the numerical value of the first axis, the numerical value with the smallest or second smallest difference from the minimum value or maximum value of the first axis of the drawing area is set as the minimum value or maximum value of the coordinate of the first axis of the plot point of the graph;
Determining each coordinate value of a plurality of plot points of the graph based on at least the minimum value or the maximum value of the coordinates of the first axis of the plot points of the graph, the step size, and the formula;
A computer program that causes the display device to draw the graph in the drawing area based on the determined coordinate values of the plurality of plot points of the graph.
[7] When a graph based on a formula is drawn by the display device in a drawing area in which a coordinate system including at least the first axis in the screen of the display device is set,
Based on the coordinate width along the first axis of the drawing area and the display pixel width along the first axis of the drawing area of the display device, determining the step size of the numerical value of the first axis;
Among the multiples of the step size of the numerical value of the first axis, the numerical value with the smallest or second smallest difference from the minimum value or maximum value of the first axis of the drawing area is the minimum value or maximum value of the coordinate of the first axis of the plot point of the graph;
Determining each coordinate value of a plurality of plot points of the graph based on at least the minimum or maximum value of the coordinates of the first axis of the plot points of the graph, the step size, and the formula;
A graph drawing system comprising a control device that causes the display device to draw the graph in the drawing area based on the determined coordinate values of the plurality of plot points of the graph.

1…システム、10…サーバ、11…プロセッサ、12…ROM、13…RAM、14…ストレージ、15…通信装置、19…システムバス、20…端末、21…CPU、22…ROM、23…RAM、24…ストレージ、25…入力装置、26…表示装置、27…通信装置、29…システムバス、30…ネットワーク、50…グラフ関数電卓、100…ウインドウ、101…数式付箋、102…グラフ付箋、103…グラフエリア、104…紐。 Reference Signs List 1 system 10 server 11 processor 12 ROM 13 RAM 14 storage 15 communication device 19 system bus 20 terminal 21 CPU 22 ROM 23 RAM 24 storage 25 input device 26 display device 27 communication device 29 system bus 30 network 50 graph scientific calculator 100 window 101 mathematical sticky note 102 Graph sticky notes, 103...Graph area, 104...String.

Claims (11)

制御装置によって実行されるグラフ描画方法であって、
表示装置の画面内の少なくとも第1軸を含む座標系が設定された描画エリアに、数式に基づくグラフを、該表示装置により描画させる場合に、前記描画エリアの第1軸に沿う座標幅、及び、前記表示装置の前記描画エリアの前記第1軸に沿う表示ピクセル数に基づいて、前記第1軸の数値の刻み幅を決定し、
決定した前記第1軸の数値の刻み幅と、前記描画エリアの第1軸の最小値又は最大値とに基づいて、前記グラフのプロット点の前記第1軸の座標の第2の最小値又は第2の最大値を決定し、
決定した前記グラフのプロット点の前記第1軸の座標の前記第2の最小値又は前記第2の最大値、前記刻み幅、並びに、前記数式に少なくとも基づいて、前記グラフの複数のプロット点の各座標値を決定し、
前記第2の最小値又は前記第2の最大値を決定することは、
前記第2の最小値に、前記第1軸の数値の刻み幅の倍数を加算する、或いは、前記第2の最大値から、前記第1軸の数値の刻み幅の倍数を減算することにより、前記描画エリア内において、任意の整数値をとるように、前記第2の最小値又は前記第2の最大値を決定することを含む、
グラフ描画方法。
A graph drawing method executed by a control device, comprising:
When a graph based on a mathematical expression is drawn by the display device in a drawing area in which a coordinate system including at least a first axis in the screen of the display device is set, the step width of the numerical value of the first axis is determined based on the coordinate width along the first axis of the drawing area and the number of display pixels along the first axis of the drawing area of the display device;
Determining a second minimum value or a second maximum value of the coordinates of the plot points of the graph on the first axis based on the determined step size of the numerical value on the first axis and the minimum value or maximum value on the first axis of the drawing area;
each coordinate value of a plurality of plot points of the graph is determined based on at least the second minimum value or the second maximum value of the determined coordinates of the plot points on the first axis of the graph, the step size, and the formula;
Determining the second minimum value or the second maximum value comprises:
Determining the second minimum value or the second maximum value so as to take any integer value in the drawing area by adding a multiple of the step size of the numerical value of the first axis to the second minimum value, or subtracting a multiple of the step size of the numerical value of the first axis from the second maximum value.
Graph drawing method.
前記第2の最小値又は前記第2の最大値を決定することは、
決定した前記第1軸の数値の刻み幅の倍数のうち、前記描画エリアの第1軸の最小値又は最大値との差が最も小さい数値及び前記描画エリアの第1軸の最小値又は最大値との差が2番目に小さい数値のうち何れかの数値を、前記第2の最小値又は前記第2の最大値とすることを含む、
請求項1に記載のグラフ描画方法。
Determining the second minimum value or the second maximum value comprises:
Among the determined multiples of the step size of the numerical value of the first axis, either the numerical value with the smallest difference from the minimum value or maximum value of the first axis of the drawing area or the numerical value with the second smallest difference from the minimum value or maximum value of the first axis of the drawing area is set as the second minimum value or the second maximum value.
The graph drawing method according to claim 1.
前記第1軸の刻み幅は、該刻み幅の前記表示装置の前記画面上での長さが、前記表示装置の前記第1軸に沿う単位ピクセルの前記表示装置の前記画面上での長さよりも長くなるように、決定される、
ことを含む、請求項1又は2に記載のグラフ描画方法。
The step width of the first axis is determined so that the length of the step width on the screen of the display device is longer than the length of a unit pixel along the first axis of the display device on the screen of the display device.
3. The graph drawing method according to claim 1, comprising:
n×10m(mは整数、nは10の約数)で表される数値のうち、前記描画エリアの第1軸に沿う数値幅を前記表示装置の前記描画エリアの前記第1軸に沿う表示ピクセル幅で除したときの商以上の最小値を、前記第1軸の刻み幅として決定する、
ことを含む、請求項1乃至3のいずれか1項に記載のグラフ描画方法。
Among numerical values represented by n × 10m (m is an integer, n is a divisor of 10), the quotient of the numerical width along the first axis of the drawing area divided by the display pixel width along the first axis of the drawing area of the display device.
4. The graph drawing method according to any one of claims 1 to 3, comprising:
受け付けた操作に基づいて、前記描画エリアの第1軸に沿う座標幅と前記第1軸に沿う表示ピクセル数との比が変更される場合、
変更後の前記描画エリアの第1軸に沿う座標幅、及び、変更後の該描画エリアの前記第1軸に沿う表示ピクセル幅に基づいて、前記刻み幅を再計算して決定する、
ことをさらに含む請求項1乃至4のいずれか1項に記載のグラフ描画方法。
When the ratio of the coordinate width along the first axis of the rendering area and the number of display pixels along the first axis is changed based on the accepted operation,
recalculating and determining the step size based on the coordinate width along the first axis of the changed drawing area and the display pixel width along the first axis of the changed drawing area;
5. The graph drawing method according to any one of claims 1 to 4, further comprising:
前記描画エリアに設定された座標範囲が拡がる或いは狭まるように変更したとき、前記グラフ描画方法が実行されるアプリケーションソフトウエアの前記描画エリアを含むウインドウのサイズが変更したとき、又は、前記描画エリアの第1軸に沿う座標幅と該描画エリアの前記第1軸に沿う表示ピクセル幅の比の変更を伴いながら、該描画エリアの前記第1軸に沿う座標幅が変更されたとき、
変更後の前記描画エリアの第1軸に沿う座標幅、及び、変更後の該描画エリアの前記第1軸に沿う表示ピクセル幅に基づいて、前記刻み幅を再計算して決定する、
ことをさらに含む請求項1乃至5のいずれか1項に記載のグラフ描画方法。
When the coordinate range set in the drawing area is changed to expand or narrow, when the size of the window containing the drawing area of the application software in which the graph drawing method is executed is changed, or when the coordinate width of the drawing area along the first axis is changed while the ratio of the coordinate width along the first axis of the drawing area and the display pixel width of the drawing area along the first axis is changed,
recalculating and determining the step size based on the coordinate width along the first axis of the changed drawing area and the display pixel width along the first axis of the changed drawing area;
6. The graph drawing method according to any one of claims 1 to 5, further comprising:
受け付けた操作に基づいて、前記描画エリアの第1軸に沿う座標幅と前記第1軸に沿う表示ピクセル数との比が変更されない場合、
変更後の前記描画エリアの第1軸に沿う座標幅、及び、変更後の該描画エリアの前記第1軸に沿う表示ピクセル幅に基づいて、前記刻み幅を再計算しない、
ことをさらに含む請求項1乃至6のいずれか1項に記載のグラフ描画方法。
If the ratio between the coordinate width along the first axis of the drawing area and the number of display pixels along the first axis is not changed based on the accepted operation,
not recalculating the step size based on the coordinate width along the first axis of the drawing area after the change and the display pixel width along the first axis of the drawing area after the change;
7. The graph drawing method according to any one of claims 1 to 6, further comprising:
前記描画エリアに設定された座標範囲が並行移動するように変更したとき、前記描画エリアのサイズが変更したとき、又は、前記描画エリアの第1軸に沿う座標幅と該描画エリアの前記第1軸に沿う表示ピクセル幅の比の変更を伴わずに、該描画エリアの前記第1軸に沿う座標幅が変更されたとき、
前記刻み幅を再計算せずに、変更後の前記描画エリアの第1軸の最小値及び/又は最大値、変更前の前記刻み幅、並びに、前記数式に少なくとも基づいて、前記グラフの複数のプロット点の各座標値を決定する、
ことをさらに含む請求項1乃至7のいずれか1項に記載のグラフ描画方法。
When the coordinate range set in the drawing area is changed so as to move in parallel, when the size of the drawing area is changed, or when the coordinate width of the drawing area along the first axis is changed without changing the ratio of the coordinate width along the first axis of the drawing area and the display pixel width of the drawing area along the first axis,
Without recalculating the step size, each coordinate value of a plurality of plot points of the graph is determined based at least on the minimum and/or maximum value of the first axis of the drawing area after change, the step size before change, and the formula;
8. The graph drawing method according to any one of claims 1 to 7, further comprising:
決定した前記グラフの複数のプロット点の各座標値に基づいて、前記グラフを、前記表示装置により前記描画エリアに描画させる、
ことをさらに含む請求項1乃至8のいずれか1項に記載のグラフ描画方法。
causing the display device to draw the graph in the drawing area based on the determined coordinate values of the plurality of plot points of the graph;
9. The graph drawing method according to any one of claims 1 to 8, further comprising:
グラフ描画装置の制御装置により読み取り可能なコンピュータプログラムであって、
前記制御装置によって、
表示装置の画面内の少なくとも第1軸を含む座標系が設定された描画エリアに、数式に基づくグラフを、該表示装置により描画させる場合に、前記描画エリアの第1軸に沿う座標幅、及び、前記表示装置の前記描画エリアの前記第1軸に沿う表示ピクセル数に基づいて、前記第1軸の数値の刻み幅を決定させ、
決定した前記第1軸の数値の刻み幅と、前記描画エリアの第1軸の最小値又は最大値とに基づいて、前記グラフのプロット点の前記第1軸の座標の第2の最小値又は第2の最大値を決定させ、
決定した前記グラフのプロット点の前記第1軸の座標の前記第2の最小値又は前記第2の最大値、前記刻み幅、並びに、前記数式に少なくとも基づいて、前記グラフの複数のプロット点の各座標値を決定させ、
前記第2の最小値又は前記第2の最大値を決定させることは、
前記第2の最小値に、前記第1軸の数値の刻み幅の倍数を加算する、或いは、前記第2の最大値から、前記第1軸の数値の刻み幅の倍数を減算することにより、前記描画エリア内において、任意の整数値をとるように、前記第2の最小値又は前記第2の最大値を決定させることを含む、
コンピュータプログラム。
A computer program readable by a control device of a graph drawing device,
By said controller,
When a graph based on a mathematical expression is drawn by the display device in a drawing area in which a coordinate system including at least a first axis is set in the screen of the display device, the coordinate width along the first axis of the drawing area and the number of display pixels along the first axis in the drawing area of the display device are used to determine the step size of the numerical value of the first axis,
determining a second minimum value or a second maximum value of the coordinates of the plot points of the graph on the first axis based on the determined step size of the numerical value on the first axis and the minimum value or maximum value on the first axis of the drawing area;
each coordinate value of a plurality of plot points of the graph is determined based on at least the second minimum value or the second maximum value of the determined coordinates of the plot points on the first axis of the graph, the step size, and the formula;
Determining the second minimum value or the second maximum value includes:
adding a multiple of the step size of the numerical value of the first axis to the second minimum value, or subtracting a multiple of the step size of the numerical value of the first axis from the second maximum value, thereby determining the second minimum value or the second maximum value so as to take an arbitrary integer value in the drawing area;
computer program.
表示装置の画面内の少なくとも第1軸を含む座標系が設定された描画エリアに、数式に基づくグラフを、該表示装置により描画させる場合に、前記描画エリアの第1軸に沿う座標幅、及び、前記表示装置の前記描画エリアの前記第1軸に沿う表示ピクセル数に基づいて、前記第1軸の数値の刻み幅を決定し、
決定した前記第1軸の数値の刻み幅と、前記描画エリアの第1軸の最小値又は最大値とに基づいて、前記グラフのプロット点の前記第1軸の座標の第2の最小値又は第2の最大値を決定し、
決定した前記グラフのプロット点の前記第1軸の座標の前記第2の最小値又は前記第2の最大値、前記刻み幅、並びに、前記数式に少なくとも基づいて、前記グラフの複数のプロット点の各座標値を決定する、制御装置を備え、
前記第2の最小値又は前記第2の最大値を決定することは、
前記第2の最小値に、前記第1軸の数値の刻み幅の倍数を加算する、或いは、前記第2の最大値から、前記第1軸の数値の刻み幅の倍数を減算することにより、前記描画エリア内において、任意の整数値をとるように、前記第2の最小値又は前記第2の最大値を決定することを含む、
グラフ描画装置。
When a graph based on a mathematical expression is drawn by the display device in a drawing area in which a coordinate system including at least a first axis in the screen of the display device is set, the step width of the numerical value of the first axis is determined based on the coordinate width along the first axis of the drawing area and the number of display pixels along the first axis of the drawing area of the display device;
Determining a second minimum value or a second maximum value of the coordinates of the plot points of the graph on the first axis based on the determined step size of the numerical value on the first axis and the minimum value or maximum value on the first axis of the drawing area;
Based on at least the second minimum value or the second maximum value of the determined coordinates of the plot points on the first axis of the graph, the step size, and the formula, a control device that determines each coordinate value of a plurality of plot points of the graph,
Determining the second minimum value or the second maximum value comprises:
Determining the second minimum value or the second maximum value so as to take any integer value in the drawing area by adding a multiple of the step size of the numerical value of the first axis to the second minimum value, or subtracting a multiple of the step size of the numerical value of the first axis from the second maximum value.
Graph drawing device.
JP2022006436A 2018-04-17 2022-01-19 Graph drawing method, graph drawing device and computer program Active JP7315042B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2022006436A JP7315042B2 (en) 2018-04-17 2022-01-19 Graph drawing method, graph drawing device and computer program

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2018079445A JP7014024B2 (en) 2018-04-17 2018-04-17 Graph drawing method, graph drawing system, server device, graph drawing device and computer program
JP2022006436A JP7315042B2 (en) 2018-04-17 2022-01-19 Graph drawing method, graph drawing device and computer program

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2018079445A Division JP7014024B2 (en) 2018-04-17 2018-04-17 Graph drawing method, graph drawing system, server device, graph drawing device and computer program

Publications (2)

Publication Number Publication Date
JP2022048217A JP2022048217A (en) 2022-03-25
JP7315042B2 true JP7315042B2 (en) 2023-07-26

Family

ID=87428014

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2022006436A Active JP7315042B2 (en) 2018-04-17 2022-01-19 Graph drawing method, graph drawing device and computer program

Country Status (1)

Country Link
JP (1) JP7315042B2 (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011210005A (en) 2010-03-30 2011-10-20 Casio Computer Co Ltd Graph display device and program

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0689347A (en) * 1992-09-09 1994-03-29 Tohoku Nippon Denki Software Kk Automatic generation system for axis scale
JP7014024B2 (en) * 2018-04-17 2022-02-01 カシオ計算機株式会社 Graph drawing method, graph drawing system, server device, graph drawing device and computer program

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011210005A (en) 2010-03-30 2011-10-20 Casio Computer Co Ltd Graph display device and program

Also Published As

Publication number Publication date
JP2022048217A (en) 2022-03-25

Similar Documents

Publication Publication Date Title
JP7014024B2 (en) Graph drawing method, graph drawing system, server device, graph drawing device and computer program
CN108073438B (en) Page display method and device and electronic terminal
US10061498B2 (en) Graph display device, graph display method and computer-readable medium recording control program
AU2014203137B2 (en) Electronic apparatus and graph display method
EP2237230B1 (en) Graph display control apparatus and graph display control method
US8576230B2 (en) Graph display apparatus, recording medium on which program is recorded, and graph display method
JP2019185686A5 (en) Graph drawing method, graph drawing system, server device, graph drawing device and computer program
JP2004118727A (en) Graphic display control device and program
JP7006081B2 (en) Graph drawing system, calculation server, graph drawing system control method, and program for calculation server
JP7315042B2 (en) Graph drawing method, graph drawing device and computer program
JP7501608B2 (en) Learning support device, learning support method and program
US20090058858A1 (en) Electronic apparatus having graph display function
CN111198997A (en) Digital display method and device based on webpage
US10319126B2 (en) Ribbon to quick access toolbar icon conversion
JP7047562B2 (en) Programs, information processing methods, information terminals and information processing systems
CN109710122B (en) Method and device for displaying information
JP7235138B2 (en) Information processing device, data generation device, graph drawing system, and program
JP7380087B2 (en) Image display area setting program, server, image display area setting device, image display area setting method, and image display system
JP5459015B2 (en) Graph display device and program
JP7294484B2 (en) Program, information processing method and information terminal
JP2016081187A (en) Information processing device, information processing system, method for controlling information processing device, and computer program
US11640491B2 (en) Automatic font value distribution for variable fonts
JP2023106630A (en) Program, information processing method, information terminal, and information processing system
JP7310980B2 (en) Information processing device, graph display method and program
JP2023045848A (en) Calculator and calculation program

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20220217

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20220217

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20230104

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20230116

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20230207

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20230405

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20230626

R150 Certificate of patent or registration of utility model

Ref document number: 7315042

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150