ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Ellipse Box calculate perimeter mm2
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

wealsh

13 Posts

Posted - Nov 17 2018 :  10:34:17  Show Profile  Reply
How to calculate?
like this:

xequte

38185 Posts

Posted - Nov 17 2018 :  17:45:07  Show Profile  Reply
Hi

Are fairly close approximation is:

perim := 2 * PI * SqRt(( Sqr( w / 2 ) + Sqr( h / 2 )) / 2 );

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

wealsh

13 Posts

Posted - Nov 18 2018 :  02:49:24  Show Profile  Reply
hello
I'm sorry, I don't know much English. Look at the picture. This is the oval


Go to Top of Page

xequte

38185 Posts

Posted - Nov 18 2018 :  14:11:42  Show Profile  Reply
What input values do you have? Ellipse width and height?


Nigel
Xequte Software
www.imageen.com
Go to Top of Page

wealsh

13 Posts

Posted - Nov 18 2018 :  21:31:30  Show Profile  Reply
ImageEnVect1.GetObjRect(hobj, r);

if (ImageEnVect1.ObjKind[hobj] = iekELLIPSE) then
begin
w:= Trunc((r.Right - r.Left));
h:= Trunc((r.Bottom - r.Top));
end
Go to Top of Page

wealsh

13 Posts

Posted - Nov 19 2018 :  01:49:58  Show Profile  Reply
https://www.mathsisfun.com/geometry/ellipse-perimeter.html
https://stackoverflow.com/questions/8433443/modify-a-formula-from-calculating-around-a-circle-to-around-an-oval

delphi can do that ?
Go to Top of Page

xequte

38185 Posts

Posted - Nov 19 2018 :  02:07:55  Show Profile  Reply
Area := PI * W * H / 4;
perim := 2 * PI * SqRt(( Sqr( w / 2 ) + Sqr( h / 2 )) / 2 );

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

wealsh

13 Posts

Posted - Nov 19 2018 :  02:39:16  Show Profile  Reply
thanks~~
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: