Skip to main content
kphotopage
Legend
February 12, 2008
Question

Finding Geometric Center of Triangle, Star and Pentagon

  • February 12, 2008
  • 14 replies
  • 33586 views
http://img.photobucket.com/albums/v450/kphotopage/2007/2008/Want-Geometric-Center.gif

I am trying to find the geometric center of a triangle, star and a pentagon so I can align Group Spokes and cut the shapes.
What is Illustrators trick?
I do not want the center of the bounding box. I need the center of the shape.

I once had this thread bookmarked for later reference but the link no longer exist.

Centers of triangles.
http://www.adobeforums.com/webx?14@@.3bdfc3af/0

Thank you in advance. Ai CS3
Kathryn
    This topic has been closed for replies.

    14 replies

    Participant
    July 17, 2009

    To Kurt Gold's solution, I would add steps 7 and 8 in order to group the center point with the shape as follows:

    1. Select the object
    2. Copy and Paste in Front
    3. Select > Object > Direction Handles
    4. Cmd+X (Cut); do not deselect
    5. Object > Path > Average: choose both axes
    6. View > Guides > Make Guides

    7. Cmd+A (select all)

    8. Cmd+G (Group)

    _scott__
    Legend
    July 17, 2009

    It's much easier than all that....

    Select the object and use the Attributes Panel and tick the button to show center point.

    attributes.jpg

    That will show the center point of any shape regardless of what it's edges look like.

    Inspiring
    July 17, 2009

    Scott you are usually right on but in this case you have missed the mark.

    If you use the attributes panel to show the center mark it does so for the bounding box and not the object.

    As illustrated here

    With Kurts brilliant method which should be coded and placed in the control panel a a command you get the
    the center of the object as well as with James' genius script. As Illustrated here:

    Steve Fairbairn
    Inspiring
    May 5, 2008
    http://www.pixentral.com/show.php?picture=1cJKJFgkLTyjYEaWbBghWmqkrmpFd0

    Dunno if this helps.
    The blue bulgy triangle is exactly half way between the inscribed triangle and the circle.

    Start off by copying one side of the triangle and an arc of the circle.
    Use Pathfinder to clip the arc so that it's the same length as the side of the triangle (or you can do it manually).
    Do a one step blend between the two and you've got the blue bit.
    (Or you can just scale/copy the arc 50% vertically to get the same result)

    Now just rotate/copy the blue bit by 60° (twice), snap the ends together and join them and you've got your bulgy triangle.
    Participant
    April 30, 2008
    Hi James,

    Actually, in my CS3 Illustrator it's "Convert selected anchor point to smooth", but - not daring to say it out loud for fear of not catching my breath - I still had to stop to uncross my eyes. :)

    This was quite another angle on solving the problem, and so far the best - thank you!

    I'll work with it a bit to find out, just for fun, how to hit the exact midpoint between the side of the inscribed triangle and the circumference of the circle.

    Thanks again
    mccanute
    JETalmage
    Inspiring
    April 30, 2008
    VERSION?

    Assuming CS3:

    Forget the Blend.

    1. Polygon Tool: Draw the equilateral triangle.

    2. Use one of the methods described above to find the center of gravity. Position a vertical and horizontal guide there to mark the spot.

    or...

    When drawing the triangle, mousedown on some other snapable coordinate, like an anchorPoint of an existing path, or the Artboard origin. Then AltShiftDrag to draw the triangle outward from its center.

    3. WhitePointer: Drag a marquee selection around TWO of the triangle's anchorPoints. Click the Convert Selected Anchor Points To Curve button. (Stop to catch your breath after saying that.)

    4. Drag a selection marquee around the triangle's other anchorPoint. Click the Convert Selected Anchor Points To Curve (pant, pant) button. Now you should have the bulgy triangle you describe. To adjust the bulginess...

    5. Select>Object>DirectionHandles.

    6. Scale Tool. Click (don't drag) the center point described in step 2, to set the center of transformation there. ShiftDrag to scale all the handles as desired.

    JET
    Participant
    April 30, 2008
    Hi there,

    Sorry for re-opening this thread, but in my search for a solution this is what has come the closest.

    I appreciate the methods for finding the center of polygon shapes described here, but I would like to fix the center to the shape so that Illustrator understands it.

    Quite simply (!), I am trying to make a perfect blend - kind of a rounded triangle - between an equilateral triangle and a circle using the Blend tool. While the tool will latch on to the center of the circle, the center of the triangle always becomes offset. It seems the Blend tool is oriented towards the center of the bounding box rather than the center of the geometric shapes.

    Does anybody know of a fix?

    Thanks

    mccanute.
    Steve Fairbairn
    Inspiring
    February 14, 2008
    The way I've always done it is this:
    With your pen tool draw lines between diametrically opposite anchor points of the polygon or star. Do this twice, between different pairs of points.
    Convert these new lines to guides. The place where the guides cross is the geometrical centre.
    If you like, you can unlock the guides and group them with the polygon.
    They will then move or rotate with the polygon even if you re-lock them, so you always know where the centre is.
    kphotopage
    Legend
    February 13, 2008
    Brilliant James!
    Select all, run JET_CentroidCircle script, a center circle is placed.

    Thank you both Kurt and James.

    Kathryn
    JETalmage
    Inspiring
    February 13, 2008
    Well, I knew I had that thing somewhere. (I gotta start writing this stuff down.)

    The script I was trying to remember is here:

    http://www.IllustrationETC.com/AIbuds/CentroidCircles/JET_CentroidCircle.zip

    In the discussion that gave rise to it, the thread originator was working on a mobile sculpture, and wanted to locate a hole at the center of gravity of each shape. So it prompts you for a diameter, and then draws a circle at the centroid.

    http://www.IllustrationETC.com/AIbuds/CentroidCircles/CentroidCircles01.jpg

    http://www.IllustrationETC.com/AIbuds/CentroidCircles/CentroidCircles02.jpg

    http://www.IllustrationETC.com/AIbuds/CentroidCircles/CentroidCircles03.jpg

    Either the script or the Align Points method can be used to find the centroid of irregular polygons, not just regular polygons.

    What if the shape has curved segments? Copy / PasteInFront to make a clone of the path. Then apply extra points along the curves, using the Add Points command, or a Filter like ZigZag.

    JET
    kphotopage
    Legend
    February 12, 2008
    Yippee, the new Action works.

    Kurt, I like it with steps 3 & 4. It leaves an x in the center when not selected.

    I can now turn on Smart Guides and center the Grouped Spokes to cut the shape.
    Kurt Gold
    Community Expert
    Community Expert
    February 12, 2008
    Well, Kathryn, pure genius would be to leave out step 3 and 4 because they are not necessary at all to get the centre. I just added them to make the process a bit more rakish ;-)

    To include the Object > Path > Average command in your action, you'll have to use the Insert Menu Item command through the Actions Palette Flyout menu.