#### Archived

This topic is now archived and is closed to further replies.

# triangle math

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

## Recommended Posts

i hope this picture works..
                         .
C         .    |
.         |
.    |         | 300
.         |x        |
.              |         |
---------------|---------|
400           a

if i have this triagle., how, if possible, would i find the length of x thanks! [grhodes_at_work edited to correct the display of the picture] [edited by - grhodes_at_work on February 3, 2003 5:43:15 PM]

##### Share on other sites
the pic didn''t work., go to http://www.logo3.net/tri.jpg for a pic. thanks!

##### Share on other sites
Homework problems cannot be answered on this board, or at least not until you have shown some work.

##### Share on other sites
That''s math for 13-years-olds, isn''t it? Look up for Thales in your elementary school books :-p

ToohrVyk
-------------
Extatica - a free 3d game engine
Available soon!

##### Share on other sites
it''s not for homework., this is a board for helping with math and physics, is it not?

Im trying to figure out the size to scale a picture using a sort of raycasting technique. The 300 line is how big half of the height of the pic would be if you were 0 units from the object, the middle line is 400 units away from the object and 2x would be the projected height of the object. I cant get the math right..
i know the angle in the bottom left corner (aC) is

aC = tan(300/(400+a))

then using the F pattern the inside angle and the other angle of the triangle are equal.

but i can seem to find the equation to get x.

##### Share on other sites
The ratio of the sides of the small triangle is the same as the ratio of the sides of the large triangle. So we know that 400/x = (400+a)/300. Now you can easily express x as a function of a.

##### Share on other sites
quote:
Original post by ligh
it''s not for homework., this is a board for helping with math and physics, is it not?

The answer to your question is yes, BUT with a condition. This forum focuses on solving practical problems in math & physics related to game development. Not math and physics in general. Read the forum FAQ (link available at the top of the list of topics and below) to learn more about forum policy.

Forum FAQ

You''ll find that people in this forum are always on the lookout for students trying to get essentially free answers to homework questions, and if you do not explain simple posts such as yours and show your work, many folks will assume you are asking a homework question.

quote:
Original post by ligh
Im trying to figure out the size to scale a picture using a sort of raycasting technique.

That falls close enough to the category of game development, so your post is OK.

Graham Rhodes
Senior Scientist
Applied Research Associates, Inc.

##### Share on other sites
You have two similar triangles, one within the other. Since lengths of corresponding sides are proportional,

x/(400-a) = 300/400

This assumes that 400 is the length of the entire bottom edge of the large triangle. If 400 is the length of the bottom of the smaller triangle (I can''t tell which of tehse options it is from the ASCII art), then you have this proportionality:

x/400 = 300/(400+a)

In either case, just solve for x.

##### Share on other sites
i figured it out.. i mixed up the a and the 400, and i forgot to put in 30 as the angle of aC.. which is 1/2 of 60, my fov.

thanks for the help anyway

1. 1
Rutin
37
2. 2
3. 3
4. 4
5. 5

• 11
• 12
• 14
• 9
• 9
• ### Forum Statistics

• Total Topics
633349
• Total Posts
3011464
• ### Who's Online (See full list)

There are no registered users currently online

×