# Equation for an oblique cone?

• August 22nd 2012, 12:24 AM
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.
• August 27th 2012, 11: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}$
• August 28th 2012, 04: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.
• August 28th 2012, 07: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.