centering a triangle

Post questions on how to use or achieve an effect in Inkscape.
Wed
Posts: 30
Joined: Tue Nov 18, 2008 10:55 am

centering a triangle

Postby Wed » Mon Dec 22, 2008 2:26 pm

I used the star tool to create a triangle. It turned out great. But when I tried to align it with a circle, something went wrong.

It turns out that the center of rotation, is the center of the object, not the triangle. Since I know that the center of a triangle is a third of the perpendicular length to the base (or any side) to the top, I calculated the new center and defined it in the XML editor. But it doesn't scale well. Actually, it doesn't scale at all.

Is there any way to set the center point in a non symmetrical shape, that scale well? I failed finding many earlier posts that resembled my problem. Which, I think, is a bit odd.

User avatar
microUgly
Site Admin
Posts: 2985
Joined: Sat Jun 02, 2007 3:13 pm
Contact:

Re: centering a triangle

Postby microUgly » Tue Dec 23, 2008 10:29 am

Wed wrote:ISince I know that the center of a triangle is a third of the perpendicular length to the base (or any side) to the top, ...

That's a point on a triangle, but I'm not sure that's technically one of the centres. Triangles have many different centres and if Inkscape was to adopt one, it wouldn't necessarily be the one you want which leaves us in the same situation we are in now.

Then things become more complicate as your object becomes more complicated.

Perhaps you could log a feature request to have a plugin written that will auto position the rotation point based based on a selection of mathematical models.

Wed
Posts: 30
Joined: Tue Nov 18, 2008 10:55 am

Re: centering a triangle

Postby Wed » Tue Dec 23, 2008 1:12 pm

I understand your point of view. And I agree to an extent. Complex figures would be awkward to center.

Regarding my problem, maybe a better term would be "center of gravity", if that applies to an image without mass ... There is only one center of that kind. I solved the end result in a different manner.

I see in the blueprints (it took me a while to realize that that was the feature request page) that tech drawing is in the essential stage, and already started. So my wish is about to come true anyway. Technical drawings are my forte.

Wed
Posts: 30
Joined: Tue Nov 18, 2008 10:55 am

Re: centering a triangle

Postby Wed » Tue Dec 23, 2008 2:15 pm

I was in a bit of error regarding the center I am after. It is from the middle of the baseline to the opposite corner. So it isn't perpendicular. It's still a third from the base though, that the center is found.

It is of course, as the thread indicates, academic now.

User avatar
kelan
Posts: 178
Joined: Thu Sep 06, 2007 12:55 am
Location: Unicorn of Open Source
Contact:

Re: centering a triangle

Postby kelan » Tue Dec 23, 2008 11:10 pm

The Wikipedia article for triangle gives at least four points that could be called some kind of "center": circumcenter, orthocenter, centroid, and center of the incircle. You're talking about the centroid here, but looking at the images in the article, the center of the incircle also looks like an intuitive "center" for a triangle. So you see, it's difficult to simply choose a geometric center for a random shape and have it always do what you mean.


Return to “Help with using Inkscape”