# Equation for an oblique cone?

• Aug 21st 2012, 11:24 PM
Ostsol
Equation for an oblique cone?
For my own purposes I have been trying to write a program that draws a radial gradient. In computer graphics, a radial gradient blends a colour from the edge of a circle to a focus point within. When the focus is at the centre of the circle, it is simple enough to treat the gradient as a right circular cone with a height of 1.0. Given a pixel at position x and y, z will represent the ratio with which to interpolate between colours. The equation I used is:

${x^2 \over a^2} + {y^2 \over b^2} = {z^2 \over c^2}$

A gradient with a non-centred focus is an oblique cone, but I am having a difficult time finding the equation used to represent an oblique cone. The extent of my math education is single variable calculus about a dozen years ago, so I am not up to the task of trying to derive the equation myself. Does such an equation exist? Or is an oblique cone simply a right cone whose base is an inclined section? Any help would be appreciated.

Thank you.
• Aug 27th 2012, 10:25 PM
pflo
Re: Equation for an oblique cone?
Is this what you're looking for?

$x^2+y^2=\frac{a^2(h-z)^2}{h^2}$
• Aug 28th 2012, 03:00 AM
emakarov
Re: Equation for an oblique cone?
Quote:

Originally Posted by pflo
$x^2+y^2=\frac{a^2(h-z)^2}{h^2}$

This is a right cone. See the picture here.
• Aug 28th 2012, 06:56 PM
Ostsol
Re: Equation for an oblique cone?
Unfortunately, no. As I mentioned, I'm beginning to think that an oblique cone is merely a right cone rotated such that an inclined elliptical section becomes its base.