Image_and_Cursor – Adding a Curve

The image above includes a red curve that has been added to the background picture. The html code behind this is shown below.

Most of this code is familiar. The new elements are the highlighted lines. These lines specify the following parameters.

**curve_sw**– this parameter can have several different values. The value 1 specifies a curve in the form y = f(x).-
**curve_n**– this parameter specifies the number of segments used to draw the curve. -
**curve_color**– this parameter specifies the color of the curve. It must be of the form RRRGGGBBB where each of RRR, GGG, and BBB is a three digit integer between 000 and 255. These integers specify the red, green, and blue components of the curve’s color. Leading zeros must be included. -
**curve_a**– this parameter specifies the left end point for the domain of the variable x. -
**curve_b**– this parameter specifies the right end point for the domain of the variable x. -
**curve_y_of_x**– this parameter is an algebraic expression defining the curve.

The **Image_and_Cursor** users manual describes additional options – for example, the curve may be written in polar coordinates or described as a parametric curve.