Jump to content
  • Advertisement
Sign in to follow this  
helix

Finding the radius of a cone at an arbitrary height?

This topic is 4520 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm trying to find the radius of a cone at an arbitrary height. I'm stuck but I'm pretty sure there has to be a way to do it. Here's what I have so far... I have a cone with a height (h), a top radius (r1), a base radius (r2), and a length of the edge of the cone from base to top (len). I can find len = root( (r2 - r1)^2 + h^2 ). Now given the height (h') at which to find the radius (r'). I figure that a non-zero top radius shouldn't be too tricky to handle. I'll subtract r2 - r1, perform my calculations and then add r1 to r'. I also could perform some trig to get the angle. With all these values, I'm still coming up short because I have two unknowns: r' and len'. What's my next step?

Share this post


Link to post
Share on other sites
Advertisement
No sooner than I hit send did I have an inspiration. I think this will work so tell me what you think.

If I find the percentage of the distance between h and h', then I can use the same percentage on r2' [I think].

So here are my calculations:

r2' = r2 - r1
percentage = h' / h
r' = (r2' * percentage) + r1

How does that look? It's cheap as hell compared to the other calculations I was considering.

Share this post


Link to post
Share on other sites
Yes, that's quite close to what I had here and fixed the problem I just noticed as well. So much easier than I originally thought it would be. Thanks!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!