Syntax:
Hyperbole (x, y, a_axis, b_axis, type, ModeStop, optional LineColour=GLCDForeground)
Explanation:
Draws on a GLCD an hyperbole with equation (x/(a)2-(y/(b)2=1, centered at pixel positions (x, y) with axis a and b.
The hyperbole can be aligned either along the x axis or along the y axis.
Both cases a_axis>=b:axis and a_axis<b_axis are accepted.
The hyperbole is an unbounded curve made by four branches
Drawing hyperbole on the screen can be stopped by following two different criteria: - a branch has reached a border of the display - all branches have reached the display border
For an hyperbole centered on the display these criteria are equivalent.
Input parameters:
Parameter | Controls |
---|---|
|
X coordinates of hyperbole center (in pixel positions) |
|
Y coordinates of hyperbole center (in pixel positions) The x or y coordinates are Word value. |
|
The a axis of the hyperbole |
|
The b axis of the hyperbole |
|
type=1 the hyperbole is aligned along x axis
|
|
modestop=1 drawing stops when a display border is encountered by a hyperbole branch.
|
|
Color of the hyperbole |
Example:
'Example for a 240x320 pixels GLCD #include <glcd.h> Hyperbole(120, 160, 40,20, 1, 2, GLCDForeground) ; centered, a=40, b=20, x_axis alined, stops when all branches have reached a a border Hyperbole(120, 160, 40,20, 1, 1, GLCDForeground) ; centered, a=40, b=20, x_axis alined, stops when a border is reached Hyperbole(120, 160, 40,20, 2, 1, GLCDForeground) ; centered, a=40, b=20, y_axis alined, stops when a border is reached, Hyperbole(180, 80, 40,20, 1, 1, GLCDForeground) ; upper right, a=40, b=20, x_axis alined, stops when a border is reached, Hyperbole(60, 240, 40,20, 1, 2, GLCDForeground) ; lower left, a=40, b=20, x_axis alined, stops when all branches have reached a border Hyperbole(180, 80, 40,20, 2, 1, GLCDForeground) ; upper right, a=40, b=20, y_axis alined, stops when a border is reached, Hyperbole(60, 240, 40,20, 2, 2, GLCDForeground) ; lower left, a=40, b=20, y_axis alined, stops when all branches have reached a border