Graphing an oblique circular cone.

Click For Summary
SUMMARY

The discussion focuses on rendering radial gradients using an oblique circular cone. The user successfully employs a quadric surface equation, specifically \(\frac{x^{2}}{a^{2}} + \frac{y^{2}}{b^{2}} - \frac{z^{2}}{c^{2}} = 0\), to interpolate colors for right circular or elliptical cones. However, the challenge arises when attempting to adapt this method for oblique cones, where the apex is not directly above the center. The user seeks assistance in deriving the appropriate equation for graphing an oblique circular cone to enhance the efficiency of their gradient rendering.

PREREQUISITES
  • Understanding of quadric surfaces and their equations
  • Familiarity with color interpolation techniques
  • Basic knowledge of radial gradients and their properties
  • Introductory calculus concepts, particularly related to conic sections
NEXT STEPS
  • Research methods for graphing oblique circular cones in 3D space
  • Explore advanced quadric surface equations and their applications
  • Study line-circle intersection techniques for gradient calculations
  • Investigate mathematical transformations for rotating quadric surfaces
USEFUL FOR

Graphic designers, software developers, and mathematicians interested in advanced rendering techniques and color gradient algorithms.

Ostsol
Messages
12
Reaction score
0
I have recently experimented with algorithms for rendering colour gradients. Linear gradients are no problem, but radial gradients have proved to be somewhat more difficult. A radial gradient focused at the centre is simply a matter of measuring the distance of a pixel from the centre and comparing it to the radius of the gradient. I found that the most elegant solution was to represent the gradient as an inverted cone of height 1.0. This way, with a single equation I can discover the ratio with which to interpolate colours. I used the following quadric surface equation:

\frac{x^{2}}{a^{2}} + \frac{y^{2}}{b^{2}} - \frac{z^{2}}{c^{2}} = 0

Solving for z, I get the ratio.

The problem is that this works only for right circular or elliptical cones. If the apex is not above the centre, as with an oblique cone, this equation will not help me. I need this because a radial gradient's focus need not be at its centre. I can discover the ratio via a line-circle intersection, but I feel that representing the gradient as an oblique cone would be more elegant and probably more efficient. Unfortunately, I cannot find any information on how one might graph such a cone and my math education is limited to introductory single-variable calculus -- and that was over a decade ago. As such, deriving the correct equation myself is beyond me.

Can anyone help me find such an equation, assuming one exists?

I have attached an example of the kind of radial gradient I would like to reproduce.
 

Attachments

  • radial.png
    radial.png
    8.8 KB · Views: 723
Physics news on Phys.org
I've come to the conclusion that an oblique circular cone is merely a right elliptical cone. The bottom of the oblique cone is a conic section that is inclined such that the ellipse is now a circle. Unfortunately, this doesn't help me much, as I'm sure that rotating a quadric surface involves some very complex math.
 

Similar threads

  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 15 ·
Replies
15
Views
3K
  • · Replies 19 ·
Replies
19
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 9 ·
Replies
9
Views
6K
  • · Replies 9 ·
Replies
9
Views
4K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
Replies
11
Views
2K