Archived

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

Johnny_Blaze93

Triangle!!!

Recommended Posts

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