- This topic has 2 replies, 3 voices, and was last updated 10 years, 3 months ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.
|
Miscellaneous › Others › C programming
Write C program for, we are given four co-ordinate points find the area bound by these four points.
Hi,
We can not calcluate area without knowing shape.
AM BHATT sir has explaines is true for a rectangle or square.
For irregular shapes we have to perform integration wrt x and y.
But that is not possible with basic controllers.
from 4 co-ordinates find out x-distance and y-distance
like if given 4 co-ordinates on 4 corners are (x,y) (x1,y1) (x2,y2) and (x3,y3)
x-distance = x1-x or y1-y
y-distance = x2-x or y2-y
now for area you need l and b so
l = x-distance
b = y-distance
and area is = l*b
thats all
for experiment purpose this can be done.