Jump to content
  • Advertisement

Archived

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

Johnny_Blaze93

Triangle!!!

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

Advertisement
Unless you have the the hyp as a vector and the other sides are parallel to the respective axis...

Share this post


Link to post
Share on other sites
As we all know that a diameter of a circle subtends a right-angle at the circumference. If u are not sure what it means; if you draw straight lines from both the ends of a diameter and make them meet at any point on the circumference , the lines will
always make 90 degree. Which means, the diameter will serve as the hypotenuse. Now i hope u understand why itz impossible to find the other two sides if u know the hypotenuse only. But, no matter what, the other two lines will always be bounded by a semi-circle ! .

Share this post


Link to post
Share on other sites
Ok, well what i am trying to do is make... i dont know what its called so ill explain it, when your on the desktop in windows, and you click and drag the mouse, it makes a rectangle and keeps updating it. I need to make on of those, any ideas?

Share this post


Link to post
Share on other sites
Well, that part is simple. You know the initial point where the mouse was clicked. And you can find out where the mouse is currently at. There you have the width and height of the rectangle. Make sense? You can just subtract the y values to get the height, and subtract the x values to get the width. And you know two of the four corners, so just add the width to the x component of one of the point, and add the height to the y component of one of the points.

Always remember, you''''re unique. Just like everyone else.

Share this post


Link to post
Share on other sites
In case you''re wondering, that''s called a "bounding box". In the days of win31, when it was animated, it was often referred to as "marching ants".

Share this post


Link to post
Share on other sites

  • 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!