The constructor of hyperboloid in pbrt-v3 The book omitted the explanation of the constructor of hyperboloid.

Could someone give some explanations about:


Why the arguments are two points?
What are the meanings of ah and ch?
Why is there a while loop?
They must define it as a surface of revolution of a line segment.
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.
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.