# CURVE (GraphRep) â€‹

*Curve :*

**CURVE** *varName* **from:** *realVal* **to:** *realVal***fx:** *realExpr* **fy:** *realExpr* .

The **CURVE** element enables you to draw two-dimensional function curves specified by parameters. The key-word **CURVE** is followed by the name of a variable, which runs through the interval specified by **from** and **to**. Since the width of a step is always exactly one pixel and thus depends on the output medium and the scaling factor chosen, in principle, a clear representation is guaranteed, particularly when enlarging objects.

For **fx** and **fy** LEO expressions have to be specified. These should not access variables other than the one specified after the keyword **CURVE** ("varName"; in the following examples "t"). Accessing other variables is possible, but terribly slow.

**Example:**

The symbol shown in the picture/image below is drawn by

```
GRAPHREP
CURVE "t" fx:(sin(.77\*t+sin(t))) fy:(.8\*cos(t))
from:-3.5 to:3.5
```

```
GRAPHREP
CURVE "t" fx:(sin(.77\*t+sin(t))) fy:(.8\*cos(t))
from:-3.5 to:3.5
```

You can also draw curved surfaces. To do this, use **CURVE** in a COMPOUND sequence. The sequence may even consist of only one element - the curve itself.

**Example:**

The symbol shown in the picture below is drawn by

```
GRAPHREP
COMPOUND 1
CURVE "t" fx:(sin(t)+.1\*sin(8\*t)) fy:(cos(t)-.1\*cos(8\*t))
from:0 to:6.28
```

```
GRAPHREP
COMPOUND 1
CURVE "t" fx:(sin(t)+.1\*sin(8\*t)) fy:(cos(t)-.1\*cos(8\*t))
from:0 to:6.28
```