<p>The way I read it, you have a 2D cubic Bézier that defines the projections of the ridge line (or river bed, or whatever) onto the X/Y plane. In Figure 4, these are the dark purple lines.</p>

<p>So that gives you the direction that the ridge line moves. Now you have to define the height of the ridge line. This is done by picking some points along the 2D Bézier and setting the following values at each of the chosen points:</p>

<pre><code>h = height
r = radius (this appears more like a width at the ridge line than a curved radius)
</code></pre>

<p>You can then also set the angle of the terrain as it comes off the radius. These are:</p>

<pre><code>`phi` and `theta`
`a` and `b` are the lengths of the slopes
</code></pre>

<p>Keep in mind that you don't have to set every value for every control point you pick. I assume any you don't set are defaulted to 0, or some reasonable default.</p>

<p>So for a hill, you would set <code>h</code> to the height of the hill at a few point. You would then set <code>phi</code> and <code>theta</code> to be horizontal, so yes, <code>pi / 4</code>. The length of <code>a</code> and <code>b</code> will decide how quickly the hill falls off as you move away from the ridge line.</p>

<p>It looks like the above 6 values are turned into another cubic Bézier curve that is perpendicular to the first one for the rasterization step in section 4 of the paper. <code>h</code> doesn't factor into the shape of the perpendicular Bézier because it's also perpendicular to it. So <code>r</code>, <code>theta</code>, <code>phi</code>, <code>a</code> and <code>b</code> are used to make a cubic Bézier. I believe that you can think about like this: the point on the ridge line where you define one of these control points is the link between 2 cubic Bézier segments - one to the left of the point and the other to the right. The images they show only show a single point between 2 Bézier curves, but the way I'm reading it there are actually 2 curves that look something like this:</p>

<p><a href="https://i.sstatic.net/L6TPF.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/L6TPF.png" alt="Beziers"></a></p>

<p>So I think normally, you'd have 2 Béziers. One on each side of the control point they show in the paper. (Pardon my bad drawing.)  <code>a</code> would be the distance between control points 2 and 3 of the left curve. <code>Theta</code> would be the angle formed between the vertical and <code>a</code> of the left curve. <code>r</code> would be the distance between points 3 and 4 of the left curve. I'm unclear on how one would pick control point 1 in this scenario, though.</p>

<p><code>Ai</code> and <code>Ri</code> have to do with the noise parameters and don't appear to me to be related to the Bézier curves at all.</p>

CC BY-SA 3.0
2017-12-26T04:35:56.950Z
2017-12-26T04:35:56.950Z
user1118321
<p>I hope this is the right group to be able to expose my doubts about the implementation of the algorithm shown in this <a href="https://pdfs.semanticscholar.org/6a7e/8a731dc35fb6c9d740a9f43eb2e84672cad6.pdf" rel="nofollow noreferrer">article</a>. The question I have is how to do the feature curves, what I do not understand is how to use piecewise Bézier cubic spline to build them. I hope someone can help me with an example please to be able to advance with that algorithm. Any help is welcome, thanks in advance.</p>

CC BY-SA 3.0
2017-12-25T06:50:30.843Z
Can you clarify? Do you not understand how piecewise Bézier cubic splines work? Or do you understand that, but not how to use them in this particular application?
user1118321
CC BY-SA 3.0
2017-12-26T03:44:02.373Z
@ user1118321 If I understand how Bezier cubic splines works, what I do not understand is the following. I'm trying to make a hill, what I do not know if it should be if it must have some points to make a curve, for example Q (16,137), S (64,198), T (112,137) and later add the parameters theta = Pi/4 and Phi = Pi/4 to build a feature curve of the hill. Could you tell me how steps 3.1 and 3.2 work, please, since I am very confused
bullitohappy
CC BY-SA 3.0
2018-01-03T09:27:07.353Z
Could you [edit] your question to add the title and author of the paper you're linking? That'll make it easier for interested people to find your question, and it will help out anyone who can't access your link, or if the link dies.
Dan Hulme
<algorithm><vector-graphics>
how to build the feature curves of this algorithm?
bullitohappy
# how to build the feature curves of this algorithm?

(Asked by: username_0 on 2017-12-25)

I hope this is the right group to be able to expose my doubts about the implementation of the algorithm shown in this [article](https://pdfs.semanticscholar.org/6a7e/8a731dc35fb6c9d740a9f43eb2e84672cad6.pdf). The question I have is how to do the feature curves, what I do not understand is how to use piecewise Bézier cubic spline to build them. I hope someone can help me with an example please to be able to advance with that algorithm. Any help is welcome, thanks in advance.

**Tags:** algorithm, vector-graphics

> **Comments:**
> **username_1**: Can you clarify? Do you not understand how piecewise Bézier cubic splines work? Or do you understand that, but not how to use them in this particular application?  
> **username_0**: @ username_1 If I understand how Bezier cubic splines works, what I do not understand is the following. I'm trying to make a hill, what I do not know if it should be if it must have some points to make a curve, for example Q (16,137), S (64,198), T (112,137) and later add the parameters theta = Pi/4 and Phi = Pi/4 to build a feature curve of the hill. Could you tell me how steps 3.1 and 3.2 work, please, since I am very confused  
> **username_2**: Could you [edit] your question to add the title and author of the paper you're linking? That'll make it easier for interested people to find your question, and it will help out anyone who can't access your link, or if the link dies.  

---

## 1 answers

### Answer by username_1 on 2017-12-26. Score: 1

The way I read it, you have a 2D cubic Bézier that defines the projections of the ridge line (or river bed, or whatever) onto the X/Y plane. In Figure 4, these are the dark purple lines.

So that gives you the direction that the ridge line moves. Now you have to define the height of the ridge line. This is done by picking some points along the 2D Bézier and setting the following values at each of the chosen points:

```
h = height
r = radius (this appears more like a width at the ridge line than a curved radius)

```

You can then also set the angle of the terrain as it comes off the radius. These are:

```
`phi` and `theta`
`a` and `b` are the lengths of the slopes

```

Keep in mind that you don't have to set every value for every control point you pick. I assume any you don't set are defaulted to 0, or some reasonable default.

So for a hill, you would set `h` to the height of the hill at a few point. You would then set `phi` and `theta` to be horizontal, so yes, `pi / 4`. The length of `a` and `b` will decide how quickly the hill falls off as you move away from the ridge line.

It looks like the above 6 values are turned into another cubic Bézier curve that is perpendicular to the first one for the rasterization step in section 4 of the paper. `h` doesn't factor into the shape of the perpendicular Bézier because it's also perpendicular to it. So `r`, `theta`, `phi`, `a` and `b` are used to make a cubic Bézier. I believe that you can think about like this: the point on the ridge line where you define one of these control points is the link between 2 cubic Bézier segments - one to the left of the point and the other to the right. The images they show only show a single point between 2 Bézier curves, but the way I'm reading it there are actually 2 curves that look something like this:

[![Beziers](https://i.sstatic.net/L6TPF.png)](https://i.sstatic.net/L6TPF.png)

So I think normally, you'd have 2 Béziers. One on each side of the control point they show in the paper. (Pardon my bad drawing.) `a` would be the distance between control points 2 and 3 of the left curve. `Theta` would be the angle formed between the vertical and `a` of the left curve. `r` would be the distance between points 3 and 4 of the left curve. I'm unclear on how one would pick control point 1 in this scenario, though.

`Ai` and `Ri` have to do with the noise parameters and don't appear to me to be related to the Bézier curves at all.


---

