Rating changes for last rounds are temporarily rolled back. They will be returned soon. ×

Imtiaz_rafi's blog

By Imtiaz_rafi, 4 years ago, In English

UPDT : FOUND THE SOLUTION.THANKS.

If I have only Four coordinate of a parallelogram then how should I find the straight height of that for calculating the area?

Parallelfe860574ba49a43b.png

  • Vote: I like it
  • +1
  • Vote: I do not like it

| Write comment?
»
4 years ago, # |
  Vote: I like it +8 Vote: I do not like it

Is is always the case that $$$A_y = B_y$$$ and $$$C_y = D_y$$$? Because in that case it's just $$$D_y-A_y$$$ isn't it.

  • »
    »
    4 years ago, # ^ |
      Vote: I like it +5 Vote: I do not like it

    No. the coordinates can be in different line but ( Ay-By)==( Cy-Dy) are same

»
4 years ago, # |
Rev. 2   Vote: I like it +9 Vote: I do not like it

I think it should be this

Unable to parse markup [type=CF_MATHJAX]


This is the general equation independent of what are the constraints on the points(The only thing I have assumed is that the given quadrilateral is a parallelogram). You can make further simplifications in this expression according to the problem.
  • »
    »
    4 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    can you provide the source of that equation? thanks in advance <3

    • »
      »
      »
      4 years ago, # ^ |
        Vote: I like it +3 Vote: I do not like it

      I used some basic coordinate geometry to derive the above equation, you can learn it from the following links
      1.Formula to find the equation of a line passing from 2 points: Resource 1
      2. Formula to find the perpendicular distance of a point from a line : Resource 2
      The basic logic I used was like, I first found the equation of the line AB using the formula given in resource 1 and then I found the perpendicular distance between the line AB and the point D using the formula given in resource 2

»
4 years ago, # |
Rev. 3   Vote: I like it +11 Vote: I do not like it

Use shoelace theorem. Via shoelace the area is $$$\frac{|(a_x*b_y+b_x*c_y+c_x*d_y+d_x*a_y)-(a_y*b_x+b_y*c_x+c_y*d_x+d_y*a_x)|}{2}$$$. The base is just $$$\sqrt{(a_x-b_x)^2 + (a_y-b_y)^2}$$$ via pythagorean. Then just do the area/base for the height.

  • »
    »
    4 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Read the topic, he clearly mentions that we have to calculate the height without calculating area.

    • »
      »
      »
      4 years ago, # ^ |
        Vote: I like it +4 Vote: I do not like it

      My bad but the op is interested in the height so that he can calculate the area, and this one finds the area without the height, so I think it's fine.

  • »
    »
    4 years ago, # ^ |
      Vote: I like it +3 Vote: I do not like it

    just figured out that the area and height can be calculated in that way also. Thanks a lot bro.. This really works

»
4 years ago, # |
Rev. 2   Vote: I like it +6 Vote: I do not like it

Let's say the sides are $$$\vec{AB}$$$ and $$$\vec{AD}$$$, then the height will be $$$AD*sin(\theta)$$$ where $$$\theta$$$ is the angle between $$$\vec{AB}$$$ and $$$\vec{AD}$$$. (We can calculate side vectors from the coordinates)

  • »
    »
    4 years ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    UPDT: Got the idea now

    • »
      »
      »
      4 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      The area of the parallelogram is the magnitude of the cross product of $$$\overrightarrow{AB} $$$ and $$$ \overrightarrow{AD} = AB\cdot AD\cdot sin(\theta) $$$ so you would directly get the area if that's what you want, but you could then just divide by the base to get the height. The cross product's magnitude is represented in terms of the angle between the two vectors even though it can be calculated with just the coordinates.

    • »
      »
      »
      4 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it
    • »
      »
      »
      4 years ago, # ^ |
      Rev. 2   Vote: I like it 0 Vote: I do not like it

      The angle can be calculated by dot product.

      $$$\vec{a}.\vec{b} = abcos(\theta)$$$
      $$$\implies cos(\theta) = \frac{\vec{a}.\vec{b}}{ab} $$$
»
4 years ago, # |
  Vote: I like it +3 Vote: I do not like it

You can get two vectors $$$\overrightarrow{AD} = <D_x-A_x, D_y-A_y>$$$ and $$$\overrightarrow{AB} = <B_x-A_x, B_y-A_y>$$$. The scalar cross product $$$ \overrightarrow {AD} \times \overrightarrow {AB}$$$ is the area of the parallelogram: $$$\mathbf{abs( \left(D_x-A_x\right)\left(B_y-A_y\right)-\left(D_y-A_y\right)\left(B_x-A_x\right) )}$$$