cutting up a star

Post questions on how to use or achieve an effect in Inkscape.
llogg
Posts: 443
Joined: Tue Mar 11, 2008 7:30 am

cutting up a star

Postby llogg » Sun Feb 22, 2009 2:37 am

A while back someone posted a tip about how to take a star and divide it up into component rectangles using boolean path operations. For the life of me I cannot remember how to do this and I can't find the post with a forum search. Can anyone help? Basically I've got a star that I'd like to divide into 10 component triangles so that I can alternate the colors of the triangles to create a very basic illusion of depth. Thanks for your help.

llogg
Posts: 443
Joined: Tue Mar 11, 2008 7:30 am

Re: cutting up a star

Postby llogg » Sun Feb 22, 2009 3:28 am

Well, I remembered how to do it, but I can't get it quite right, so if anyone can help I'd still appreciate it. Here are the steps I use to cut up the star.
1. Draw star shape with :tool_star: , no fill.
2. Draw straight vertical line with :tool_pen: .
3. Duplicate line and rotate 72 degrees. Duplicate that one and rotate by 72 degrees. And so on until I've got five lines.
4. Select all lines and ctrl-K to combine paths.
5. Select star and convert to path. Select star and lines and align so that lines bisect the points of the star. Path>combine.
6. Path>Stroke to path.
7. Path>Break apart.

This gives me all the triangle pieces I want, but they're not quite perfect. When I select every other triangle and combine them then change the color and align them over a duplicate of the original star, the angles seem a little off. Here's an example (hope it's lg enough to show the problem):
Image

User avatar
EarlyBlake
Posts: 302
Joined: Tue Jun 03, 2008 5:42 pm

Re: cutting up a star

Postby EarlyBlake » Sun Feb 22, 2009 6:12 am

Turn on snap nodes to nodes to get the right paths to divide with. Might want to use difference and/or intersection operations with closed paths. I think I saw a bug reports about the cut path operation (and maybe division path operation). It said that those operations did not cut the path exactly at the path intersection points. Once you get 2 triangles that make up one point, you can do duplicate and use object > transform to rotate it 72 degrees. Snap nodes will line things up for when you drag.
Last edited by EarlyBlake on Sun Feb 22, 2009 2:27 pm, edited 2 times in total.

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: cutting up a star

Postby brynn » Sun Feb 22, 2009 7:11 am

Could it be that you're forgetting about the stroke? Whenever I'm working with identical object shapes, some with a fill the same color as the stroke, and some with no fill, I'm always forgetting that the stroke falls half inside the object and half outside. I don't know, just a thought :)

I'm thinking how I might approach this task, and it's not so terribly different from what you did. I do a lot of mandalas, so I'm always needing to know the exact center point of various shapes (especially circles). And I do this by making a single dot ( :tool_pencil: or :tool_pen: tool, then Ctrl + click). Then I use the single dot (and Snap) as the starting place for making the shape. After the shape is made, then I would make the 5 straight lines from the center dot to the apex of each point, using Snap to be sure I'm right on point. Then the Combine thing and the Break Apart thing or whatever.

Do you specifically need the 10 triangles, or do you need a star divided by 5 lines?

User avatar
EarlyBlake
Posts: 302
Joined: Tue Jun 03, 2008 5:42 pm

Re: cutting up a star

Postby EarlyBlake » Sun Feb 22, 2009 10:03 am

:tool_star: 5 pointed star. Duplicate a couple of times to be safe. Draw the sloppy red and green paths, using snap nodes.

Image

Repeat on duplicate :tool_star: for other triangle.

llogg
Posts: 443
Joined: Tue Mar 11, 2008 7:30 am

Re: cutting up a star

Postby llogg » Sun Feb 22, 2009 1:08 pm

brilliant, Early Blake. Thanks.

User avatar
EarlyBlake
Posts: 302
Joined: Tue Jun 03, 2008 5:42 pm

Re: cutting up a star

Postby EarlyBlake » Mon Feb 23, 2009 2:08 am

llogg wrote:brilliant, Early Blake. Thanks.


:oops:


Return to “Help with using Inkscape”