Jump to content
  • Advertisement
Sign in to follow this  
Boku San

Finding the angle between faces in a pyramid

This topic is 5119 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

Uhh, topic. I guess this should be a pretty simple one, but I'm a sophomore in HS, and low-level math classes are hard to get out of (can't test out in HS--at least not at my school). So, if the topic didn't say it clear enough, I'm wondering how you would find the angle between faces in a pyramid. At first I was thinking that you could use the hypotenuse (sp) of a right triangle (pyramid on a square base, half of square base == right triangle), but then I realized that I need a way to find an angle between the base and the faces. This hasn't been covered in any of my math classes, so a slow explanation would be much appreciated... Thanks in advance.

Share this post


Link to post
Share on other sites
Advertisement
I think it would be the arc tangent of (y/.5x).

y= height of pyramid
x= lenght of one side of the square base


/|\
/ | \
/ y| \ angle=t
/ | \
/ | t\
-----------
x

Share this post


Link to post
Share on other sites
I'm in HS too so i know where your coming from, however i've already taken trig and im currently taking AP Physics so this stuff is fresh in my mind.

arc tangent is also known as inverse tangent so mabye that might help.

Share this post


Link to post
Share on other sites
Oh wait a second...I just now reread the question I posted, and realized that it's not what I wanted to know. I guess it could be *helpful*, but not the current problem. What I need to find is the angle difference between the *faces*, such as face1 to face2, not between face1 and the base.

So, uh...my bad.

Share this post


Link to post
Share on other sites
homework question?

if so, i'll give only a hint:
angle between planes = angle between normals of planes.

So from there you probably can find what you want, except, that i don't know what you want, angle difference may mean different things.

Share this post


Link to post
Share on other sites
Quote:
Original post by Dmytry
homework question?

if so, i'll give only a hint:
angle between planes = angle between normals of planes.

So from there you probably can find what you want, except, that i don't know what you want, angle difference may mean different things.


Not homework. draw_triangle() :P.

I started to re-learn OpenGL and realized that I don't know how to mathematically find the angle between the first face and the second face. I just used vertices in the past. This time I ended up for() looping through 360 degrees, increasing 0.1f, and drawing a triangle by the rotation. So it's a whole bunch of flat triangles that look un-flat.

This feels like a n00b question, but I guess it's better to know and feel like a nub than to not know.

EDIT: btw, no homework, fall break =).

Share this post


Link to post
Share on other sites
To follow on from Dmytry:

1) calculate the face normals by cross-producting two of the edges, and normalise them
2) angle = arccos (dotproduct (normal1, normal2))

Share this post


Link to post
Share on other sites
...
@Ajare:
I really, really wish you hadn't told me that. I was totally havin fun in my own little world thinking I knew the way to do it, and then I read this and...*whoosh*

That's the sound of something flying way over my head. *sigh* Here I come MathWorld.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!