Calculate rectangle vertices

Papote

New member
Joined
Sep 11, 2016
Messages
1
I have a programming problem and I've forgotten some of my math rectangle formulas. I have to make a program that creates a rectangle that isn't parallel to the X and Y axis, I assume this means a diagonal rectangle in the first quadrant of a Cartesian graph.
My inputs are the following:

  • coordinates of the vertex closest to the X axis and the origin
  • angle the long side makes with relation to the X axis.
  • area of the rectangle
  • length of the long side
The outputs expected are the following:

  • length of the short side,
  • coordinates of all the rest of the rectangle's vertices.
Given these input how do I calculate the output mentioned?
 
I have a programming problem and I've forgotten some of my math rectangle formulas. I have to make a program that creates a rectangle that isn't parallel to the X and Y axis, I assume this means a diagonal rectangle in the first quadrant of a Cartesian graph.

My inputs are the following:

  • coordinates of the vertex closest to the X axis and the origin
  • angle the long side makes with relation to the X axis. ..... what does long mean here? The longest side of the rectangle?
  • area of the rectangle
  • length of the long side
The outputs expected are the following:

  • length of the short side,
  • coordinates of all the rest of the rectangle's vertices.
Given these input how do I calculate the output mentioned?

First draw an approximate sketch of the situation and show us what you got as inputs in the drawing.
 
I would have a number of questions for the instructor, were I given the posted problem statement. I'll skip those details, for now.

There are different approaches, for calculating the three remaining vertices. One no-frills method would use basics from introductory algebra, as well as a piece of information from beginning trigonometry.

I'm thinking of things like:

working with linear equations and their graphs

dealing with perpendicular slopes

finding intersection point of two lines

solving systems of equations

using the distance formula

understanding the right-triangle definition of the tangent function

Do these concepts look familiar? Questions? :)
 
Is that YOUR decision or the teacher's?

It's not clear exactly what the assignment is.

If they must use an angle input, it might be easier to use trigonometry for determining the vertices. (Can any angle be input?)

I'm also wondering why an assumption has to be made, regarding the first quadrant. That seems like something the instructor ought to have specified up front.
 
Top