Advertisement

03.05.2007 at 02:39PM PST, ID: 22429624
[x]
Attachment Details

fastest irregular shaped 2D polygon erea calculator (contest)

Asked by Terminator4 in 3D Game Programming, C Programming Language, Algorithms

Tags: irregular, calculator, area, shape

Hi, I have 2D closed path and I wanted to know the area (surface size) so I can figure out the amount of paint I need for that shape. (1.0f = one meter)

Here is what I found for a formula:
http://mathcentral.uregina.ca/QQ/database/QQ.09.06/graham1.html

The dude that completes this function the fastest and more efficient will get all the points

class point{
public:
float x, y;
  point(){x = y = 0;}
  set(float x_, float y_){x = x_ ; y = y_;}
}

void main(){
point[6];
//closed path points (2D volume)
point[0].set(0.1f, 1);
point[0].set(23, 0);
point[0].set(17, 4);
point[0].set(21, 12);
point[0].set(6, 8);
point[0].set(0, 13);
    //formula to get the m^2 of the total surface goes here
printf(" surface is %f^2",result);
Start Free Trial
 
Keywords: fastest irregular shaped 2D polygon e…
 
Loading Advertisement...
 
[+][-]03.05.2007 at 03:07PM PST, ID: 18658159

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.05.2007 at 03:08PM PST, ID: 18658166

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: 3D Game Programming, C Programming Language, Algorithms
Tags: irregular, calculator, area, shape
Sign Up Now!
Solution Provided By: ozo
Participating Experts: 2
Solution Grade: A
 
 
[+][-]03.05.2007 at 03:09PM PST, ID: 18658180

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.05.2007 at 03:10PM PST, ID: 18658189

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.05.2007 at 03:30PM PST, ID: 18658314

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.05.2007 at 03:36PM PST, ID: 18658350

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.05.2007 at 03:40PM PST, ID: 18658377

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32