BB code in posts seems to be working again!
I haven't turned on every single tag, so please let me know if there are any that are used/needed but not activated.

Main Menu

Closing Elliptical Arc

Started by JuneTheSecond, April 11, 2009, 12:00:42 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.



Recently, a question about to draw the close ellipse on the Elliptical Arc was posted.
It was not easy question. I could not answerd.
So, I've studied again in deep, and made one solution.
The 3-equation can be easily solved, when I introduced a dummy
coordinate system.

You can change the elliptical arc by moving the control point and
change the direction and length of the control lever.

On the first page of Visio drawing the result is shown,
and on the second page the description how to solve the
equations are written.

In Octover, 2007 Anders has posted a question about same problem at,
I think Anders has solved the problem.
I would like to hear how you solved.

Best Regards,

Junichi Yoda


Thanks for resolve this question. JuneTheSecond, thank you very much. You really safe my time. Thank you again.


If VBA is allowed, my shape "Ellipse by 5 Points" is easy way to draw closed ellipse.
Best Regards,

Junichi Yoda



The first EllipticalArcTo.vsd is enhanced with VBA so as you can fit closed ellipse to any Elliptical arc.
Best Regards,

Junichi Yoda


It's a very good sample for Elliptical Arc


The solution preseneted by Junichi is brilliant. It shows in a step-by-step the mathematical explanation behind solving the problem of getting the center (and the major and the minor axes) of the ellipse that encloses the elliptical arc.

I include here a similar method of finding the center of the ellipse that encloses the elliptical arc without using xy-plane and without using a master. This method -which is based on VBA- will find the center of the ellipse that encloses the elliptical arc by adding one scratch row for intermediate calcualtions and for the final result. The VBA procedure can find center of any elliptical arc (whether it is 1-D or 2-D shape) and can work on any number of arcs of same shape (arcs in same geometry section or across multiple geometry sections).
Also, the coordinates of the result arc center is expressed locally with respect to elliptical arc shape's coordinate (which can be transfered easily to another shape/page coordinate system by using any of LOC(), PAR(), LOCTOLOC(), or LOCTOPAR() function).

For a simple arc shape, there is one geometry section with one MoveTo row and one EllipticalArcTo row. We can use the following function:

iScratchRow = FindCenterOfEllipticalArc(ActiveWindow.Selection(1), visSectionFirstComponent, visRowVertex + 1)

which will add one scratch row and put formulas for intermediate calucations in cells: A, B, C, D. The final result is in cell X, Y of the newly added scratch row:

Note that the 2nd scratch row shown here becuase I asked the procedure to find the major and minor axes of the elliptical arc as well.

I think this is more compact solution than having a supporting xy-plane shape. We can test the X, Y cells contain the correct result by creating a shape and making its location at X, Y cells of the scratch row:
PinX = PinY = GUARD(LOCTOPAR(PNT(Sheet.1!Scratch.X1,Sheet.1!Scratch.Y1),Sheet.1!Width,Width))
where Sheet.1 is the name of the elliptical arc shape.

Some elliptical arc shape before finding their center and the matching ellipse:

The same elliptical arc shapes after findting their center (red circle) and the matching ellipses (gray circle):

The attachment contains the code which creates the formulas in the ShapeSheet of the elliptical arc.

Give me six hours to chop down a tree and I will spend the first four sharpening the axe — Abraham Lincoln

Browser ID: smf (possibly_robot)
Templates: 4: index (default), Display (default), GenericControls (default), GenericControls (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 4: index+Modifications.english (default), Post.english (default), Editor.english (default), Drafts.english (default).
Style sheets: 4: index.css, attachments.css, jquery.sceditor.css, responsive.css.
Hooks called: 242 (show)
Files included: 34 - 1306KB. (show)
Memory used: 1100KB.
Tokens: post-login.
Cache hits: 14: 0.00146s for 26,764 bytes (show)
Cache misses: 3: (show)
Queries used: 16.

[Show Queries]