Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am implementing a conical filter for Gupta-Sproull anti-aliased line algorithm.

Given a cone with the total volume of 1 and a radius of 1. Find the subvolume of the intersection of a line. The line has a size of 1 as well. I need the formula so I can generate a table of values. I could find the total volume of the area under the cone. But then I need to cutout the subvolume of where the line intersects with the cone. I need a formula for this subvolume in terms of height so I can plug in the perpendicular distance from the center (this is what changes depending on where the line is drawn) and output the height. The height will determine the intensity of the pixel because the height decreases as the pixel moves farther away from the center.

So I guess I first need to find the area of that intersection of the line and the circle base....then I can find the volume. How do I find this area since the edges of the circle are arced shaped? I suppose I need to follow the edge of the circle and find out the change in slope of the line between the edges of the line but I do not know how to do it.

The line is flat and only intersects at the base. It marks or cuts out the subsection of the cone.

cone and plane

share|cite|improve this question
What is the volume of a line (segment)? The length? You talk about the (sub)volume of the intersection of a line and cone, and later about the area of the intersection of a line and the base-which will usually be at most a point. The dimensions of these seem confused. Also note that a line can intersect a cone without intersecting the base. – Ross Millikan Apr 10 '11 at 3:56
The line is flat and only intersects at the base. It marks or cuts out the subsection of the cone. The distance from the center of the line to the center of the cone is known. – juxstapose Apr 16 '11 at 8:41
I am still not understanding the geometry here. Maybe a picture would help. "The line is flat..." Maybe by line you mean plane? Those can be flat and cut off a section of a cone. – Ross Millikan Apr 17 '11 at 5:15
Yes by flat I mean a plane. Here is a link with a picture of the cone with the line.… – juxstapose Apr 19 '11 at 23:49
*sigh* a line is one-dimensional, while a plane is two-dimensional... you want to say "a plane cuts the cone" or something like that. I gather you want the volume of the cone cut off by the purple and gray planes? – J. M. Apr 20 '11 at 0:04
up vote 1 down vote accepted

It looks like you cut the base of the cone with a chord. Then you want to know what the volume of the portion of the cone that lies above one of the base partitions is (doesn't really matter which if you know the volume of the cone).

If the height of an arbitrary point on the upper surface of the cone is h and the maximum of the upper surface of the cone is $H$ then:


where a is the gradient at which the cone descends. When $\sqrt{x^{2}+y^{2}} = R$ , where $R$ is the radius of the base of the cone, h equals zero. So, $a = \frac{H}{R}$ , and:

$h = H\left(1 - \frac{\sqrt{x^{2}+y^{2}}}{R}\right)$

The problem should be isotropic so nothing about the line should matter except the minimum distance between the line and the center of the cone's base ($d$ in your second diagram above). To get the volume of the smaller partition integrate:

$\int\limits_{-\sqrt{R^{2}-d^{2}}}^\sqrt{R^{2}-d^{2}} \int\limits_d^\sqrt{R^{2}-x^{2}} H(1-\frac{\sqrt{x^{2}+y^{2}}}{R}) \,dy \,dx$

Sorry about the ugly notation. It's my first post and I don't know how to mark equations up here (figured my answer would get stale if I looked it up first).

Edit: AH! $\LaTeX$!

share|cite|improve this answer

The shape parallel to the base is a circular segment. Using the notation from the Wikipedia article, let the cone have radius $a$ at the base and overall height $H$. The radius at height $z$ above the base is $R=a(1-\frac{z}{H})$. If the distance from the center of the base to the plane cutting the cone is $d_0, d=d_0-a\frac{z}{H}$. The height of the top of the cut off piece is when $R=d_0,$ so $z(\text{top})=H(1-\frac{d_0}{a})$. The area of the segment at height $z$ is $\frac{a^2}{2}\left(1-\frac{z}{H}\right)^2(\theta-\sin \theta)$ with $\theta=2\arccos\frac{Hd_0-az}{Ha-az}$. Thus the volume is $$\int_0^{H(1-\frac{d_0}{a})}\frac{a^2}{2}\left(1-\frac{z}{H}\right)^2(\theta-\sin \theta)\,dz$$ where $\sin \arccos x=\sqrt{1-x^2}$ This should yield to Wolfram Alpha.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.