8 Replies Latest reply: Aug 31, 2012 11:56 AM by TCarp RSS

    How to convert lines to polygons

    TCarp Community Member

      I am building a compass rose by using the star tool with 4 points and adding straignt lines from the end points to the corresponding end point.  Ultimately, I'll replicate the whole image with some scaling, copy it 3 times, and rotate each 22.5 degrees to create the final rose.

       

      I want give some 3D effects by shading half of each point on the star but it's actually a polygon (the star) with a straight lines splitting the points.  To shade I need to have the star actually be 8 triangles that I can fill (4 of them).

       

      Other than tracing to create one of the triangles (and then do some replacation and transforms to locate) is there another way to convert to star polygon and the straight lines into the triangles?

       

      Using CS5.

       

      Tom

        • 1. Re: How to convert lines to polygons
          Larry G. Schneider CommunityMVP

          Make sure that the straight lines extend beyond the outline of the star. Select each straight line and use Object>Path>Divide Objects Below.  Make the star with the star tool an use the up arrow to add the extra points. Select the intervening points and Scale 70%. Draw a path which extends farther than your longest extent. Duplicate the path about the center 7 more times. Align the star and the paths and hide 7 of the paths; then use the Object>Path>Divide Objects Below. Show the paths repete the Hide cut and show. Should look like this..

           

          Screen shot 2012-08-29 at 5.05.11 PM.png

          • 2. Re: How to convert lines to polygons
            TCarp Community Member

            Wow!  As an AI novice I have to read this a number of times to understand but, based on the image you've shown, it's exactly what I want.

             

            I tried another technique using the pen tool.  I started by drawing a simple triangle and then adjusted the anchor points to snap with the tip of the star, the valley of the star, and the intersection between the two lines.

             

            I was then able to replicate the triangle transforming its angle and then snapping it to the common center point.

             

            I'll study your method to see if 1) it's easier and 2) produces more accurate results.

             

            I very much appreciate you taking the time to post.

             

            Tom

            • 3. Re: How to convert lines to polygons
              TCarp Community Member

              I see what the Divide Objects Below does (pretty cool) but I would appreciate it if you would give a bit more detail.  I'm assuming you start with a 4 point star with 2 lines running from outside the star points.  If true, it the divide creates shapes that are not going to be useful without some further divides.

               

              Sorry for being slow.  I'm a novice but I see how your techinque will be a good one.

               

              Thanks

               

              Tom

              • 4. Re: How to convert lines to polygons
                Larry G. Schneider CommunityMVP

                Hi Tom,

                 

                No, I started with an 8 point star made with the Star Tool (Hidden under the Rectangle tool revealed by clicking and holding).  Click and hold on your artboard with the tool and you should see a 5 point star appear. Without releasing the mouse, tap the up arrow three times and watch the star change. Now hold the Shift key to square the star to the artboard and release the mouse. Use the Direct Select tool and Shift select every other point on the star. For ease choose the ones on the 45° angle. Then use the Scale tool from the center to scale the select points 70%.

                 

                With the Pen tool click and the shift click to make a straight line which is longer than the width of the star. It has to extend beyond the path of the star on both sides. Using the Align panel to center the two objects by Selecting both and use the Align Horizontal and Align Vertical in order. Then Select the single path and Rotate/Copy it at an angle of 22.5°. You should end up with 7 copies and the original path. Shift-Select 7 of the paths and use Object>Hide (Cmd(Ctrl)-3).

                 

                Select the remaining path and do the Object>Path>Divide Objects Below. You should now have two objects. Show the hidden objects (Cmd(Ctrl)-Opt(Alt)-3) or Show all from the Object menu and repeat for each. of the remaining paths. There can be only one path visible at a time to make this work. When you have completed the process you should have the rose as above which you can color as you like.

                • 5. Re: How to convert lines to polygons
                  TCarp Community Member

                  Larry, thanks.

                   

                  Again I need to work through each step as much to replicate as to understand the technique you're using.

                   

                  Your post is great at helping me understand AI techinques.  I'll certainly post back if I have any questions.

                   

                  I really appreciate you taking the time to help.

                   

                  I'm facinated by the way you're creating the rose.

                   

                  Tom

                  • 6. Re: How to convert lines to polygons
                    TCarp Community Member

                    Larry

                     

                    This so very cool!  I learned a bunch by executing your process.  For the benefit of others who might also be novices at AI, I'd like to make some notes on your technique.

                     

                    No, I started with an 8 point star made with the Star Tool (Hidden under the Rectangle tool revealed by clicking and holding).  Click and hold on your artboard with the tool and you should see a 5 point star appear. Without releasing the mouse, tap the up arrow three times and watch the star change. Now hold the Shift key to square the star to the artboard and release the mouse. Use the Direct Select tool and Shift select every other point on the star. For ease choose the ones on the 45° angle. Then use the Scale tool from the center to scale the select points 70%.

                    When drawing the star you don't "click and hold" but "click and drag" without releasing the mouse.  Also, not sure what “from the center” means. I was able to scale the 4 points by releasing the Shift key and right clicking on the artboard, selecting Transform and doing the scaling there.  Is there another technique you are using?

                     

                    With the Pen tool click and the shift click to make a straight line which is longer than the width of the star. It has to extend beyond the path of the star on both sides. Using the Align panel to center the two objects by Selecting both and use the Align Horizontal and Align Vertical in order. Then Select the single path and Rotate/Copy it at an angle of 22.5°. You should end up with 7 copies and the original path. Shift-Select 7 of the paths and use Object>Hide (Cmd(Ctrl)-3).

                    I've just begun to realize how powerful the pen tool is.  This is another technique (shift click) I learned from this post.

                     

                    For anyone else who's a novice, the Rotate tool is in the Object>Transform area.  Couldn't figure out how to repeat the Rotate/Copy without going back to the Object menu or using the keyboard shortcut, but doing the rotate 7 times wasn't much of a hassle.

                     

                    Select the remaining path and do the Object>Path>Divide Objects Below. You should now have two objects. Show the hidden objects (Cmd(Ctrl)-Opt(Alt)-3) or Show all from the Object menu and repeat for each. of the remaining paths. There can be only one path visible at a time to make this work. When you have completed the process you should have the rose as above which you can color as you like.

                    I'm assuming the reason all the remaining lines need to be hidden is to avoid them also being divided.

                     

                    I am so grateful for this.  Along with learning how to make a cool compass rose, I now understand how to "break up" polygons.

                     

                    Thanks you!

                     

                    Tom

                    • 7. Re: How to convert lines to polygons
                      Larry G. Schneider CommunityMVP

                      Glad to help. Some more comments.

                      Yes, I mean click and drag but you have to hold the mouse button for the next two steps (increasing the number of points and squaring to the artboard). There is also the Option of using Opt(Alt)-click to reveal a dialog to enter the number of points and the radii of the inner and outer point circles. After setting the path for the star, I used the Direct Select tool to select the alternating points and the Scale tool (keyboard shortcut "s" to Opt(Alt)-click at the center of the star path and used the dialog to set the 70% scaling factor.

                      There is also a Rotate tool (kbsc "r") which will work. In AI you can use the kbsc Cmd(Ctrl)-d to repeat the last done transformation (including copying) so once you have done one, you can just do a Cmd-d as many times as you want.

                      • 8. Re: How to convert lines to polygons
                        TCarp Community Member

                        Hi Larry

                         

                        I actually will be using the option with the Star tool to set the radii and number of points.  Gives me early sizing control although I could adjust the star size later.

                         

                        After that, the process will be the one you have posted.

                         

                        This same overall technique will help me with the other format of compass rose I want to build.  To give the rose even more depth I actually stack 4 stars (each rotated) on top of each other.  One of the stars is scaled down for points like NNE.

                         

                        If I start building one 4-point star using your technique, I can group the star's polygons and replicate to create the other 3 stars, scaling 2 of them  From there it's just a matter of arranging and rotating.

                         

                        A couple practices, including the Cmd-D and it will be amazing how fast the rose can be built.

                         

                        Tom