Split an Image in Half on a Zigzag Line

Post questions on how to use or achieve an effect in Inkscape.
readerzoo
Posts: 3
Joined: Sun Jul 06, 2014 3:54 am

Split an Image in Half on a Zigzag Line

Postby readerzoo » Sun Jul 06, 2014 4:01 am

Hi! I'm new to Inkscape, so please forgive my ignorance and terminology :-) I have an image that I want to split in half on a zigzag. The image is an egg and I have created the zigzag line across the middle of the image. However, I do not know how to separate/split the image on the zigzag line so that I have a "top" and "bottom" (as if the egg is cracked into 2 pieces). What steps do I need to take to accomplish this? Thanks in advance for any help!

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Split an Image in Half on a Zigzag Line

Postby Lazur » Sun Jul 06, 2014 4:16 am

Hi.

Assuming you have the egg shape as a single path, and the zig-zag as an open path,
use the node editor tool to modify the zig-zag shape so that it will be a closed path that covers the area you want to split,
then duplicate both shapes (Shift+Ctrl+D) and intersect them (Ctrl+*), and perform subtract on the original two paths (Ctrl+-)

If the original egg shape is a group of objects, use clipping instead.
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/Clip-Clipping.html

readerzoo
Posts: 3
Joined: Sun Jul 06, 2014 3:54 am

Re: Split an Image in Half on a Zigzag Line

Postby readerzoo » Sun Jul 06, 2014 5:01 am

Thank you for your quick reply :-)
The egg shape is an imported JPEG, so I'm assuming it's not a single path? I created the zigzag on top of it using the Bezier tool. Not sure if that means the zigzag is an open path or not. Is there a way to check if something is an open or closed path?
I tried selecting both the egg and zigzag (where the zigzag is the uppermost object) and then did Object > Clip Set, but all that did was remove the egg completely and recolor the zigzag in the colors of the egg.
Thank you for your patience with me as I learn all of this and the proper terminology!

readerzoo
Posts: 3
Joined: Sun Jul 06, 2014 3:54 am

Re: Split an Image in Half on a Zigzag Line

Postby readerzoo » Sun Jul 06, 2014 5:09 am

Also, not sure if I was clear in how I stated what I wanted, but ultimately I want the egg to be 2 separate parts/images ... a top image with the zigzag crack on bottom and a bottom image with the zigzag crack on top. Hope that makes sense :-)

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Split an Image in Half on a Zigzag Line

Postby Lazur » Sun Jul 06, 2014 5:40 am

readerzoo wrote:I tried selecting both the egg and zigzag (where the zigzag is the uppermost object) and then did Object > Clip Set, but all that did was remove the egg completely and recolor the zigzag in the colors of the egg.


You are on the right track.
For the two halves you will have to create two clipping objects from the zig-zag part.

By opening the fill and stroke panel (Shift+Ctrl+F) you can add a stroke to check if it's a closed path -probably it is not.


Return to “Help with using Inkscape”