Drawing lines with smooth curves

Hi,
I'm trying to make a map for an underground system in a PC game and I want something similar to the one Transport for London has:
http://www.tfl.gov.uk/assets/downloads/standard-tube-map.gif
I'm a total newbie with Adobe Illustrator, but I'm trying it as I've heard it's what Transport for London uses.
My question is then, what would be the easiest way of accomplishing multiple lines with different colours and smooth curves, like the lines in my reference picture?
Thanks in advance,
Martin

Martin,
In addition to what Kurt said, you may draw paths with straight segments and then round the corners afterwards, using Effect>Stylise>Round Corners (you may Object>Expand Appearance to obtain actual roundings).

Similar Messages

  • Can j2me draw line with double values.

    Hi,
    Can any body know how to darw line in j2me with double values.
    I don't want use draw Line with int.
    Shall i use svg or j2me has solution.
    Thanks and regards,
    Rakesh.

    not possible
    graphics.drawLine(float,float,float,float);...there's no such method in MIDP API: [click here for javadoc of Graphics class methods|http://java.sun.com/javame/reference/apis/jsr118/javax/microedition/lcdui/Graphics.html#drawLine(int,%20int,%20int,%20int)]

  • Draw line with float values possible

    Hi,
    Using Canvas drawing is possible to draw line with float values.
    graphics.drawLine(int,int,int,int);
    graphics.drawLine(float,float,float,float);Thanks and regards,
    Rakesh.

    not possible
    graphics.drawLine(float,float,float,float);...there's no such method in MIDP API: [click here for javadoc of Graphics class methods|http://java.sun.com/javame/reference/apis/jsr118/javax/microedition/lcdui/Graphics.html#drawLine(int,%20int,%20int,%20int)]

  • How to make a line with arrow curve around a circle?

    I've got CS6 and Windows 7. Trying to make a line with an arrow on one end curve around a circle. Actually want it to have a 3D look like it was curving around the back side of a globe. How do you do this? Thanks.

    Perhaps you mean something more like this
    similar technique you create the arrow as a straight stroke path with an arrowhead and make it a symbol
    You then make it a symbol
    you than make a vertical rectangle and use the 3D Revolve Effect to make a cylinder
    then you go to map art
    then you choose in the map art to make the geomtery invisible
    then you ma the arrow symbol and adjust the placement and then adjust the rotation of the cylinder to your likeing.
    If you need a video to follow I'll do one later.

  • How to draw line with width at my will

    Dear frineds:
    I have following code to draw lines, but I was required:
    [1]. draw this line with some required width such as 0.2 or 0.9 or any width at my will
    [2]. each line after I draw, when I use mouse to click on it, it will be selected and then I can delete it,
    Please advice how to do it or any good example??
    Thanks
    sunny
    package com.draw;
    import java.util.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    public class DrawingArea extends JPanel
         Vector angledLines;
         Point startPoint = null;
         Point endPoint = null;
         Graphics g;
         public DrawingArea()
              angledLines = new Vector();
              setPreferredSize(new Dimension(500,500));
              MyMouseListener ml = new MyMouseListener();
              addMouseListener(ml);
              addMouseMotionListener(ml);
              setBackground(Color.white);
         public void paintComponent(Graphics g)
              // automatically called when repaint
              super.paintComponent(g);
              g.setColor(Color.black);
              g.setFont(getFont());
              AngledLine line;
              if (startPoint != null && endPoint != null)
                   // draw the current dragged line
                   g.drawLine(startPoint.x, startPoint.y, endPoint.x,endPoint.y);
              for (Enumeration e = angledLines.elements(); e.hasMoreElements();)
                   // draw all the angled lines
                   line = (AngledLine)e.nextElement();
                   g.drawPolyline(line.xPoints, line.yPoints, line.n);
         class MyMouseListener extends MouseInputAdapter
              public void mousePressed(MouseEvent e)
                   if (SwingUtilities.isLeftMouseButton(e))
                        startPoint = e.getPoint();
              public void mouseReleased(MouseEvent e)
                   if (SwingUtilities.isLeftMouseButton(e))
                        if (startPoint != null)
                             AngledLine line = new AngledLine(startPoint, e.getPoint(), true);
                             angledLines.add(line);
                             startPoint = null;
                             repaint();
              public void mouseDragged(MouseEvent e)
                   if (SwingUtilities.isLeftMouseButton(e))
                        if (startPoint != null)
                             endPoint = e.getPoint();
                             repaint();
              public void mouseClicked( MouseEvent e )
                   if (g == null)
                        g = getGraphics();
                   g.drawRect(10,10,20,20);
         class AngledLine
              // inner class for angled lines
              public int[] xPoints, yPoints;
              public int n = 2;
              public AngledLine(Point startPoint, Point endPoint, boolean left)
                   xPoints = new int[n];
                   yPoints = new int[n];
                   xPoints[0] = startPoint.x;
                   xPoints[1] = endPoint.x;
                   yPoints[0] = startPoint.y;
                   yPoints[1] = endPoint.y;
                   /*if (left)
                        xPoints[1] = startPoint.x;
                        yPoints[1] = endPoint.y;
                   else
                        xPoints[1] = endPoint.x;
                        yPoints[1] = startPoint.y;
         public static void main(String[] args)
              JFrame frame = new JFrame("Test angled lines");
              frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
              DrawingArea d = new DrawingArea();
              frame.getContentPane().add( d );
              frame.pack();
              frame.setVisible(true);
    }Message was edited by:
    sunnymanman

    sonudevgan wrote:
    dear piz tell me how i can read integer from user my email id is [email protected]
    foolish, foolish question

  • Draw line with Gradient

    Hi,
    I am trying to implement drawing on canvas with two colors, red and blue.
    For example, to draw with the mouse "with two colors".
    I do not need a filled rectangle.
    I am looking into gradient but without any success.
    Is there a better way to draw a line with two colors?
    I also tried to use BasicStroke, but the line had an inner/outer strokes.
    Please help with suggestions.

    devboris wrote:
    ..For example, to draw with the mouse "with two colors".
    import java.awt.*;
    import javax.swing.*;
    class GradientLine {
        public static void main(String[] args) {
            GradientPanel gp = new GradientPanel();
            gp.setPreferredSize( new Dimension(600,400) );
            JOptionPane.showMessageDialog(null, gp);
    class GradientPanel extends JPanel {
        public void paintComponent(Graphics g) {
            // cast the Graphics objkect to a Graphics2D object
            // (G2D includes setPaint() method)
            Graphics2D g2 = (Graphics2D)g;
            GradientPaint bgPaint = new GradientPaint(
                0,
                0,
                Color.black,
                getWidth(),
                getHeight(),
                Color.white );
            g2.setPaint(bgPaint);
            g2.fillRect( 0, 0, getWidth(), getHeight() );
            GradientPaint fgPaint = new GradientPaint(
                0,
                0,
                Color.yellow,
                getWidth(),
                getHeight(),
                Color.red );
            // set the paint to a gradient.
            g2.setPaint(fgPaint);
            for (int ii=0; ii<getWidth()/10; ii++) {
                g2.drawLine( ii*10, 0, ii*10, getHeight() );
            for (int ii=0; ii<getHeight()/10; ii++) {
                g2.drawLine( 0, ii*15, getWidth(), ii*15 );
    }

  • Newbe - straight line with different curves at each end

    I'm generally not using Illustrator as I'm sure you can tell. I need several curly brackets, but none will really do as they will cover varioius lengths and should be the same size. It looks like the easiest way will simply be to create one putting two straight lines together, but I cannot even determine how to get a curved end at one end of the line - yet alone a second different curve on the other end. Thanks. Rick

    shiesl,
    For the curly bracket shape you may consider quarter circles at the ends, and a pair at the middle, all with the same radius.
    You may:
    1) Create a circle with the Ellipse Tool and cut it into quarters at the Anchor Points; you may then use all the bits or just one or two of them with copies,
    2) Place the first quarter with the inner end where you want the first straight part to start (on one side of the intended straight part),
    3) Place the second quarter (corresponding to a 180 degrees rotation) oppositely (on the other side of the intended straight part) where you want the firrst straight part to end,
    4) With the Direct Selection Tool select both inner ends and Object>Path>Join, now you have one half curly bracket,
    5) Object>Transform>Reflect, Align the two halves, and Join them at the midlle.
    For different lengths, you may Direct Select the two Anchor Points at either end and move them away from the middle (you may use arrow, Object>Transform>Move, or other ways).
    If you just want roundings at the ends, you may simplify the suggestion here, just having the second one on the same side in 3) and finish with 4).

  • Drawing line with button??

    Hi all.
    Why won't this class draw a line when i click the mouse button. Nothing happens when i click on the panel.
    import java.util.*;
    import java.awt.*;
    import javax.swing.JPanel;
    import javax.swing.*;
    import javax.swing.Action.*;
    import java.awt.event.*;
    import java.awt.event.MouseAdapter;
    public class DrawingPanel extends JPanel implements Observer
      private ViewableEtch etch;
      private ClearPanel clear;
      public DrawingPanel(ViewableEtch etch, ClearPanel clear)
        this.etch = etch;
        this.clear = clear;
       etch.addView(this);
        clear.addView(this);
        setLayout(new FlowLayout());
        setLayout(new GridLayout(200,200));
          //etch.addActionListener(this);
            DrawingControl dc = new DrawingControl();
        public void update(Observable obs, Object obj)
         Views v = (Views)obs;
         if (v.getSource() == etch)
         //etch.getLineColor();
           getGraphics().setColor(etch.getLineColor() );
           getGraphics().drawLine(etch.getStartX(), etch.getStartY(), etch.getEndX(), etch.getEndY());
         else
           v.getSource().equals(clear);
    public void mouseClicked(MouseEvent e)
    //etch.setLine(new etch(getStartX(), getStartY(), e.getEndX(), e.getEndY()));
    getGraphics().drawLine(etch.getStartX(), etch.getStartY(), etch.getEndX(), etch.getEndY());
    }thanx

    This should work
    public class MyPanel extends JPanel implements MouseListener {
       public MyPanel() {
          addMouseListener(this);
       public void mouseClicked(MouseEvent e) {
          // Add code here
       public void mouseEntered(MouseEvent e) {}
       public void mouseExited(MouseEvent e) {}
       public void mousePressed(MouseEvent e) {}
       public void mouseReleased(MouseEvent e) {}

  • Draw Line With Arrow between containers in flex

    I need to connect multiple containers by drawing arrow . can any one provide me the idea how to do?
    Thanks in Advance,
    senthil
    [email protected]

    If your containers are within a spark container them self then you could use fxg to draw arrows based on the containers boundaries
    eg this code will draw a red arrow:
    <Graphic xmlns="http://ns.adobe.com/fxg/2008" version="2"> <!-- Use Use compact syntax with absolute coordinates. --> <Path data=" M 20 0 C 50 0 50 35 20 35 L 15 35 L 15 45 L 0 32 L 15 19 L 15 29 L 20 29 C 44 29 44 6 20 6"> <!-- Define the border color of the arrow. --> <stroke> <SolidColorStroke color="#888888"/> </stroke> <!-- Define the fill for the arrow. --> <fill> <LinearGradient rotation="90"> <GradientEntry color="#000000" alpha="0.8"/> <GradientEntry color="#FFFFFF" alpha="0.8"/> </LinearGradient> </fill> </Path> </Graphic>
    you will have to scale the arrow according to your needs

  • Draw lines with a specfic width and color

    how to do it?
    if given x arrays and y arrays, then connect points.
    public void drawLine(int x1, int y1, int x2, int y2)This function doesn't have width and color.

    thanks.
    I met a problem that the color is obtained by
    calculating RGB.
    color=a*R+b*G+c*B;
    a+b+c=1;
    How to get it?huh?

  • Smooth Curves with Gradient Mesh???

    Hi everyone! For a school project I was to render an everyday object and I chose a pepper. I created the pepper with the mesh tool and also rendered it with the gradient mesh, now my instructor says that I need to have really smoothe curves but I have way too many anchor points so I don't know how to fix the curves. He said I might have to restart but please someone help me. I don't want to redo the whole thing.
    Thank you.
    Eagerly waiting for help.

    You don't actually need to redo it in order to reduce the number of grid lines. With the gradient mesh tool it's possible to delete them.
    Although I wouldn't consider this "way" too many. But you've got a problem with the dark spots in the upper right corner. It's too small to see the details there, but it looks like the grid lines overlap each other. try and fix that and then check if the points at the border are colored euqally.

  • How to draw centre line with white background?

    Hi,
    I need to draw a centre line with white background on it. Now i'm doing it by pasting the main line in the background and giving it white so that it shows a white backgound. Is there a way to do just by drawing like normal lines. If we can, is it possible to control the white backgound only to show less than the original line in both ends. This is for illustrations i do for exploding views and i need to draw this line to show it as assembly drawing.
    Thanks
    Manoj

    1. Draw a white line segment of desired width (stroke weight) with round cap (Stroke panel) for the background line.
    2. Copy, Paste in Front
    3. Change to desired foreground color, butt cap, reduce stroke weight.
    4. Opt/Alt–drag foreground segment to overhang background segment by desired amount on both ends.
    5. Select both segments and drag to Brushes panel, choose Art Brush.
    6. In Art Brush Options choose Stretch Between Guides, drag guides somewhere to the inside of curve of round caps. (If in step 3 you chose black, set Colorization Method to Tints. Then you can select any color for the foreground segment by setting the stroke color.) Name the brush as you choose. Click OK.
    7. Draw any path and apply the brush.

  • How to draw and modify double lines with Adobe Illustrator?

    I need tot draw roadmaps. This should be easy using the pen tool, but my problem is that I cannot find a way to draw double lines with this tool. I have seen many fancy border styles and patterns. Some do have double or even quadruple lines, but the problem is than that they have an offset from the vector line and the space in between the two lines (the edges of the road) cannot be filled. Somewere I also found some pens called 'Double line 1.1' to 'Double line 1.6' but they also had an offset from the vector and I could not chance the size of the lines and the interval in between them independently.
    What I am looking for is a way to draw two lines in parallel and have the option tot fill the space in between with a color or even a pattern.
    The color and size of the lines should be changeable to make a distinction between several types of road.
    Is there an existing set of pencils for this purpose? It would be nice to be able to draw not only roads, but also railways and rivers!
    I am surely not the first person who needs to do this?
    I use AI version 6

    Jacob,
    Thanks for the answer. I have been searching for a solutions for a long
    time, but today I found the solution on a forum (not on this one). That
    solution is exactly as you described below, i.e. using a coloured line and a
    narrower white line on top of the first one. My problem was that I did not
    know how to create a custom brush based on the two lines. Now I know how to
    do that. However, I still have the problem. I can now draw double lines and
    I can change the color of the background line (the coloured one) but I
    cannot change the white colour of the narrower line. I assume that I have to
    completely redefine a new brush when I need to change that colour too.
    Regards,
    Rob Kole
    Van: Jacob Bugge [email protected]
    Verzonden: donderdag 28 maart 2013 17:04
    Aan: RKOLE
    Onderwerp: How to draw and modify double lines with Adobe
    Illustrator?
    Re: How to draw and modify double lines with Adobe Illustrator?
    created by Jacob Bugge <http://forums.adobe.com/people/Jacob+Bugge>  in
    Illustrator - View the full discussion
    <http://forums.adobe.com/message/5186535#5186535

  • How can i draw a straight line with a brush?

    i know the pencil tool can draw a straight line with anchor points. is there a setting for the pencil tool that can mimic a 30 point brush, low hardness (faded side to side) at about an 80 degree angle or is there a way to make a straight line with the brush tool using a mouse?
    i know this image is a bit blurry. what i want to do is replace the 2 white angled lines with the 30 point brush effect 230 pixels wide. the project on the left of the pic is a 2ft by 4ft canvas. any ideas? please help.

    Hello Mike, I wonder if you can help, no one else can. I asked this question on the forum in August Brush line fades on start with anchor points
    Only on Photoshop CC does this happen, drawing a diagonal line with shift key, instead of line starting dark & then fading out, it does the reverse, starts on nothing & then darkens towards anchor point. I am on trial versions & can't purchase until this is cleared up.

  • Flash IDE unable to draw pure black line with zero alpha

    As Title
    Use line or pancil tool in Flash CS 5.0 or 5.5.
    Choose pure black color #000000 and zero alpha.
    Try to draw line on the tage.
    result : stage is empty

    can u tell me what u are trying to achieve? this is very criptic

Maybe you are looking for

  • Apple tv connection to computer

    can I use any USB-mini cable on my Apple TV or does it have to be an Apple cable?

  • Tower Not Working

    I live in the Castleton-on-Hudson/Schodack, NY area.  This morning I was able make or receive phone calls, text or use any of the features on my phone.  I was told that a tower was down in our area.  That was HOURS ago and we still do not have servic

  • [SOLVED] xterm: redraws window slowly / flickers

    The problem is most obvious when reading man pages in xterm. After each action that causes the window to be redrawn (like page down) it can be clearly seen how the redrawing is not instant. It takes only a tenth of a second but the flickering can be

  • IPhoto sending unedited versions of photos to iPhone

    I have been synching my iPhoto albums with my iPhone for a while now without issue. Today I have edited a new batch of photos in iPhoto and then synched with my iPhone. The photos that have appeared on my iPhone are the correct photos (number wise),

  • Looking a part-time job

    Dear all: I've use LabVIEW to develop test software more than 4years. I'm looking a part-time job now. E-mail: [email protected] ¤╭⌒╮ ╭⌒⌒╮ ╱-◥?80?80◣ ╭ ╭ ︱田︱田田| Boone Mail:[email protected] QQ:24732458 QQ Group:13267790 QQ Comp: 17756234 ╬╬╬╬╬╬╬╬╬╬╬╬