Adobe Illustrator/Paths and Fills
Expert: Amy - 2/17/2005
QuestionI am currently using Illustrator CS, but I think this is a pretty general question that is not version dependant. This might be a long explanation, but it the only way I can think to illustrate my problem simply. Lets say you draw a triangle with the pen tool so that it is a closed path. Then, what I want to do is draw a line from one of the corner points to the center point of the line opposite. Finally I want to color each of the two triangles created by that line a different color. So basically my qustions is how do you create two destinct objects or closed paths if their is a shared line. Right now I have to copy the line, put it in the exact same place and connect the original to one shape and the copy to the other...there has got to be an easier way. I hope this all makes sense. Thanks!
AnswerHi Mark.
Yep, I can answer that.
Draw your triangle. For my purposes, I have drawn an isoceles triangle that is situated on the page like a roof of a house. Flat on the bottom and angled on the sides.
Now draw a straight line up and down bisecting the triangle, making absolutely certain your line runs through the anchor point at the triangle's tip. Your line can begin and end well outside of the outline of triangle, it just has to divide it. Whatever's hanging outside the triangle will disappear after the next step.
Open Window> Show Pathfinder or hit Shift+F9.
The fist button in the second row (Divide/Merge/Crop) is Divide. Select your triangle and the line that bisects it and click the Divide button.
Voila. Two fillable triangles.
Please note that they are grouped together, so ungroup them to fill and move them separately, or use the Direct Select tool (white arrow) to select them independently of each other.
You can do this with any shape. You can also use the Knife tool (hidden under scissors tool) to slice objects in half like this but it's really tough to be precise.
You may want to adjust the stroke's join to a round join (in the Stroke Window) so that you don't have freakishly long jaggies for corners.
Hope this works for you!
Amy