<ol>
<li>They must define it as a surface of revolution of a line segment.</li>
<li>From the comments, they are probably the <em>a</em> and <em>c</em> coefficients of the canonical hyperboloid equation. With a surface of revolution, <em>a</em> == <em>b</em> so no need to store <em>b</em> separately.</li>
<li>It's clearly related to figuring out <em>ah</em> and <em>ch</em> from the line segment. I can't say more precisely without working out the math involved. I'll leave that to someone with more free time.</li>
</ol>

CC BY-SA 3.0
2017-05-23T15:13:40.263Z
A surface of revolution of a line segment would be a disk, cylinder, or cone, no? I can't see how you would get a hyperboloid; it should be a surface of revolution of a hyperbola. I'm guessing the hyperbola is fit to pass through the two points, or something like that.
Nathan Reed
CC BY-SA 3.0
2017-05-23T22:31:48.730Z
@NathanReed It's not intuitive at all but it is possible. Look at the diagrams on the right side of the [wikipedia entry](https://en.wikipedia.org/wiki/Hyperboloid#Parametric_representations).
Olivier
CC BY-SA 3.0
2017-03-23T17:18:39.640Z
2017-03-23T17:18:39.640Z
Olivier
<p>The <a href="http://pbrt.org/" rel="nofollow noreferrer">book</a> omitted the explanation of <a href="https://github.com/mmp/pbrt-v3/blob/master/src/shapes/hyperboloid.cpp#L43" rel="nofollow noreferrer">the constructor of hyperboloid</a>.</p>

<p>Could someone give some explanations about:</p>

<ol>
<li>Why the arguments are two points?</li>
<li>What are the meanings of <strong><em>ah</em></strong> and <strong><em>ch</em></strong>?</li>
<li>Why is there a while loop?</li>
</ol>

<rendering><computational-geometry><geometry>
The constructor of hyperboloid in pbrt-v3
chaosink
# The constructor of hyperboloid in pbrt-v3

(Asked by: username_0 on 2017-03-20)

The [book](http://pbrt.org/) omitted the explanation of [the constructor of hyperboloid](https://github.com/mmp/pbrt-v3/blob/master/src/shapes/hyperboloid.cpp#L43).

Could someone give some explanations about:

1. Why the arguments are two points?
2. What are the meanings of ***ah*** and ***ch***?
3. Why is there a while loop?

**Tags:** rendering, computational-geometry, geometry


---

## 1 answers

### Answer by username_1 on 2017-03-23. Score: 1

1. They must define it as a surface of revolution of a line segment.
2. From the comments, they are probably the *a* and *c* coefficients of the canonical hyperboloid equation. With a surface of revolution, *a* == *b* so no need to store *b* separately.
3. It's clearly related to figuring out *ah* and *ch* from the line segment. I can't say more precisely without working out the math involved. I'll leave that to someone with more free time.

> **Comments:**
> **username_2**: A surface of revolution of a line segment would be a disk, cylinder, or cone, no? I can't see how you would get a hyperboloid; it should be a surface of revolution of a hyperbola. I'm guessing the hyperbola is fit to pass through the two points, or something like that.  
> **username_1**: @username_2 It's not intuitive at all but it is possible. Look at the diagrams on the right side of the [wikipedia entry](https://en.wikipedia.org/wiki/Hyperboloid#Parametric_representations).  

---

