RATIO

statement


Appearance Standard Console

Syntax:
RATIO h,v

Description:
This statement affects the width and height of shapes subsequently drawn with the CIRCLE statement. By suitably setting the h and v parameters, you can draw ellipses with any aspect ratio.

Each of h and v can range in value from -128 to +127. The h parameter affects the width of the ellipse, and the v parameter affects its height. When you subsequently execute a CIRCLE statement with a radius parameter of radius, a circle or ellipse is drawn which has these dimensions:

Shape's width = 2 * radius * (1 + h /128)
Shape's height = 2 * radius * (1 + v /128)

We can notice a few consequences of these formulas:

After you execute a RATIO statement, the indicated h and v values remain in effect for all subsequent CIRCLE statements (in all windows), until another RATIO statement is executed.

See Also:
CIRCLE