How to calculate the ceter point of EllipticalArc

J

Jerry

The EllipticalArcTo supplied x, y, a, b, c, d value from .vdx.
Q1. How can I calculate the center point of the EllipticalArcTo? (Not use VBA)
Q2. The d element of EllipticalArcTo use the _ELLIPSE_ECC function marked as
internal use purpose, Is any possible to get the information about the
function?
Q3. how to set the value to d element from external application to assure of
displaying the shape correctlly after Visio loads the file?
 
J

JuneTheSecond

Hi,

I think center point of the first ellipse sheet.1 before any turn is
x= Sheet.1!BeginX
y= Sheet.1!EndY

C : _ELLIPSE_THETA function, seem to me, returns the arc tangent of short
radius
by long radius. theta= arctan(b/a)
D : _ELLIPSE_ECC function seems return eccentlicity of ellipse.
ecc=sqrt(1-(b^2/a^2))

By the way, I've posted the studys about Visio ellipse in other aspects
in my home page below.

--
Best Regards.

JuneTheSecond
Now, visual calculation is more visual.
http://www.geocities.jp/visualcalculation/english/index.html
 
J

Jerry

Thank you for JuneTheSecond's reply.
I understand the equation of elliptise, and from the sdk described d is the
ratio of
short radius to long radius.

But I'm trying to draw the elliptical arc from the EllipticalArcTo element
of Visio,
I need the get the coordinate of center point to calculate the length of
long radius or short radius. It's now still can not resolve my problem.
 
J

JuneTheSecond

Hi,

Sorry, my answer was based on the spec. in vds file.
x= Sheet.1!BeginX (that means the value of BeginX of EllipticalArc)
y= Sheet.1!EndY (that means the value of EndY of EllipticalArc)
( And sheet.1 is the name of the shape of my elliptical arc,
! is the conjunction connecting page and shape.)

And Long radius , I think it may be , a=EndX-BeginX
Short radius, may be, b=EndY-BeginY
--
Best Regards.

JuneTheSecond
Now, visual calculation is more visual.
http://www.geocities.jp/visualcalculation/english/index.html
 
J

Jerry

Hi, JuneTheSecond

The Width of EllipticalArc is SQRT((EndX-BeginX)^2+(EndY-BeginY)^2),
threrfore we can sure the length between Begin Point and End Point is not the
radius, the result is base on trigonometric.
You can draw a line from begin point to end point to poorf on my opinion,
the length of this new line is equal to the width of EllipticalArc

Regards,

Jerry
 
J

JuneTheSecond

Hi, Jerry

I must apologize you that my answer was all mistaken.
Right explanations are in the SDK Documentation for Visio2002 at
Microsoft Visio ShapeSheet Reference
http://msdn.microsoft.com/en-us/library/aa830805(office.10).aspx
I've collected the descriptions lies scattered in many documents.

EllipticalArcTo
A cell
The x-coordinate of the arc's control point—a point on the arc. The control
point is best located about halfway between the beginning and ending vertices
of the arc. Otherwise, the arc may grow to an extreme size in order to pass
through the control point, with unpredictable results.
B cell
The y-coordinate of an arc's control point.
C cell
The angle of an arc's major axis relative to the x-axis of its parent.
D cell
The ratio of an arc's major axis to its minor axis. Despite the usual
meaning of these words, the "major" axis does not have to be greater than the
"minor" axis, so this ratio does not have to be greater than 1. Setting this
cell to a value less than or equal to 0 or greater than 1000 can lead to
unpredictable results.

--
Best Regards.

JuneTheSecond
Now, visual calculation is more visual.
http://www.geocities.jp/visualcalculation/english/index.html
 
J

Jerry

Hi, JuneTheSecond

It's ok. The description of EllipticalArcTo about x, y, a, b, c and d
elements I have known, as my prior post question. It's insufficient for me,
therefore I post this question here. I have a nice discussion experience with
you.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top