Please somebody assist i have to make a programme in VB 6 to calculate area of any given shape using coordinates. Please assist
13 15955
can you post the code that you are working on, are you facing any problem with that ?
Yes i facing a problem with starting it, its giving me a head ache
What is the area to calculate? Is it a squre, circle, cube, maybe the area of a bottle, the area of Texas?
You need to supply a little more info.
You must know the formula(e) for the shape whose area is required to be calculated then input all the parameters required for area and place them in the formula. For example
Area of square = (side)^4
so input side and calculate area.
Area of a rectangle = 2* length + 2* breadth
Here input length & breadth and calculate area.
You must know the shape first. Sometimes a shape is broken into several shapes to find out its area.
If any other help is required please post what you have written and where you are stuck.
You must know the formula(e) for the shape whose area is required to be calculated then input all the parameters required for area and place them in the formula. For example
Area of square = (side)^4
so input side and calculate area.
Area of a rectangle = 2* length + 2* breadth
Here input length & breadth and calculate area.
You must know the shape first. Sometimes a shape is broken into several shapes to find out its area.
If any other help is required please post what you have written and where you are stuck.
Area of square = (side)^4 ???!!!
Area of a rectangle = 2* length + 2* breadth ???!!!
Are you sure ?
MTB
its area of any shape with coordinates, e,g calculating an area of X with coordinates (a,b), (c,d), (e,f), ..........
Area of a square is side A multiplied by side B
The area of a rectangle is Long side A multiplied by Short side B
In the case of these coordinates the area is calculated as follows (a,b), (c,d), (e,f)
2*Area=((a*d)+(c*f))-((b*c)+(d*e))
This formula will work in every shape provided i know all coordinates not my situation is to do it in vb so that when i put any number of coordinates it should calculate area for me from those coordinates.
In the case of these coordinates the area is calculated as follows (a,b), (c,d), (e,f)
2*Area=((a*d)+(c*f))-((b*c)+(d*e))
This formula will work in every shape provided i know all coordinates not my situation is to do it in vb so that when i put any number of coordinates it should calculate area for me from those coordinates.
Hmmm.....
To obtain the area of a particular shape is to use a formular that depends on that shape.
Co-ordinants are just a reference number to a datum point.
What is the shape you want to determine the area of? Is it a square? is it a rectangle? is it a circle?, an oval, a trapezium?, a hexagon?
Forget about the word co-ordinates and let me know what the shape of the area is that you are trying to evaluate is.
This formula works on any shape triangle, square, tripizium. I mean any
First of all sorry for the wrong formulae typed by me. Actually I was in a hurry and by mistake typed wrong formulae. Thanks MTB for pointing them out. Correct formulae are:
Area of square = side^2 sq.units
Area of rectangle = Length * Breadth sq.units
Mr. Rakodu I think the formula posted by you is for calculating area of a triangle (I haven't checked it, it works for right angled triangle. For others I don't know). Because in your formula there are only 3 coordinates and trapezium, square, rectangle require four coordinates. However, You can do one thing. Divide the shape, whose area is to be calculated, into various triangles such that area of a triangle is not overlapped by other triangle and whole area is covered by all the triangles. So that
Area of the shape = sum of area of all the triangles (received by dividing)
Now with the help of your formula you can calculate the required area.
To calculate the area of a square and of a rectangle multiply the width by the height.
Formula : L x H
To calculate the perimeter of a square or a rectangle
Formula : (2 x L) + (2 x H)
To calculate the area of a circle you need the radius, which is half the diameter. Once you know the radius
Formula : Pi x (R x R)
To calculate the perimeter of a circle
Formula : (R x 2) x Pi
To calculate the area of a triangle is to multiply the base by the height and divide it by 2.
Formula : (B x H)/2
To calculate the perimeter of a triangle
Formula : ((B x 2) + (H x 2))/2
To calculate the area of a hexagon can be a little complex but if you picture (or draw ) it as 6 seperate triangles, its not such a task.
As you can see by these examples that no 2 shapes are calculated in the same way.
If you have a 4 sided shape with 4 different length sides, then the formular gets a lot more complex.
If you have a part circle or an oval shape then it gets even more complex.
You cannot have one formular that will calculate the area of all shapes. It is geometrically impossible.
Thanks guys i will try to do it after that i will post it to you
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Ron Adam |
last post by:
Hi, I'm having fun learning Python and want to say thanks to everyone
here for a great programming language.
Below is my first Python program (not my first program) and I'd
apreciate any...
|
by: Sarah Wang |
last post by:
Hello everyone!
I want to calculate zprob(the area under the normal curve)
with python and I managed to find a function from the
internet.
But the problem is that the function calculates the...
|
by: Joe Bongiardina |
last post by:
What does the message "calculating...." mean in the lower left status area
of a form?
I have a form with no calculated, concatenated or lookup fields, yet it
displays this msg.
The form takes...
|
by: keith |
last post by:
This may seem simple, but I'm having a bit of trouble figuring out
exactly how to do it. I'm accessing a database through an ODBC link,
and I have a query that returns only jobs completed that day...
|
by: jdcrief |
last post by:
Complier: Visual C++ 2005 Express Edition
The program I wrote will compile and execute, but the output is always
the same, no matter what number is entered in for the radius of the
circle. ...
|
by: Ham Pastrami |
last post by:
Since my HTML is failing to render properly on either FF2 or IE6, I wonder
if my understanding of the CSS is faulty. What I want is to place a little
box at the top right corner of my content area,...
|
by: Massimo30 |
last post by:
Looking for answers and have done a search in books and websites and still can't find the answer:
I am setting up a Market Trend DB on housing figures. I have the following fields in my table:
My...
|
by: trogenone |
last post by:
Hello
Im new to this and need a hand. Sorry if i have posted this in the wrong area.
I am working on a small database it consists of two tables:
Employees & Holidays
Employees field are:
...
|
by: sureshl |
last post by:
function cal()
{
var f = document.form1;
var regExp_Count = new RegExp("^+$");
f.price1.value = parseFloat(f.baseprice.value*(f.percen.value/100)).toFixed(0);
}
cal() functions , will...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
| |