yspacing  =  
        0.5;
xspacing  =  2*Pi*0.05;
xstart = 0;
ystart  =  -1;
xlimit  =  4.0*Pi;
ylimit =  2;
lineThickness = 
        0.005;

For[y = ystart; glist = {}, y < ylimit, 
      y +=  yspacing, 
For [x = xstart; plist = {}, 
        x < xlimit,  x +=  xspacing, 
        plist = Append[plist, {x, Sin[x] + y}]]; 
lnthk = 
        If[y != 0, lineThickness, 2*lineThickness]; 
      glist = Append[glist, 
          Graphics[{Thickness[lnthk], 
              Line[plist]}]];
]
Show[glist, Axes -> Automatic]

x = 
        0.0;
y = 0.0;
dx  = 0.2;
plist = {};
For[,x < xlimit,x = 
        x + dx,
dy = 
          Cos[x];

      plist = 
          Append[plist, 
            Graphics[{PointSize[0.02], Point[{x, y}]}]];

       y = y + dy*dx;
]
Show[plist, Axes -> Automatic]

Show[plist, glist, 
      Axes -> Automatic, 
      PlotRange -> {{xstart, xlimit}, {ystart - 1, ylimit + 1}}, 
      AspectRatio -> 
        0.5]

yspacing  =  
        4.0;
xspacing  =  2*Pi*0.05;
xstart = 0;
ystart  =  -4;
xlimit  =  8.0*Pi;
ylimit = 10;
lineThickness = 
        0.005;

For[y = ystart; glist = {}, y < ylimit, 
      y +=  yspacing, 
For [x = xstart; plist = {}, 
        x < xlimit,  x +=  xspacing, 
        plist = Append[plist, {x, Sin[x] + y}]]; 
lnthk = 
        If[y != 0, lineThickness, 2*lineThickness]; 
      glist = Append[glist, 
          Graphics[{Thickness[lnthk], 
              Line[plist]}]];
]
Show[glist, Axes -> Automatic, 
      AspectRatio -> 0.3]

x = 
        0.0;
y = 0.0;
dx  = 5;
plist = {};
For[,x < xlimit,x = 
        x + dx,
dy = 
          Cos[x];

      plist = 
          Append[plist, 
            Graphics[{PointSize[0.02], Point[{x, y}]}]];

       y = y + dy*dx;
]
Show[plist, Axes -> Automatic]

Show[plist, glist, 
      Axes -> Automatic, 
      PlotRange -> {{xstart, xlimit}, {ystart - 1, ylimit + 1}}, 
      AspectRatio -> 0.5]

x = 
        0.0;
y = 0.0;
dx  = 5;
plist = {};
For[,x < xlimit,x = 
        x + dx,
dy1 = 
          Cos[x];

      dy2 = Cos[x  + dx/2];

      dy3 = Cos[x + dx];

      dy = dy1/4  +  dy2/2  +  dy3/4;

      plist = 
          Append[plist, 
            Graphics[{PointSize[0.02], Point[{x, y}]}]];

       y = y + dy*dx;
]
Show[plist, Axes -> Automatic]

Show[plist, glist, 
      Axes -> Automatic, 
      PlotRange -> {{xstart, xlimit}, {ystart - 1, ylimit + 1}}, 
      AspectRatio -> 0.5]

yspacing  =  
        0.5;
xspacing  =  2*Pi*0.05;
xstart = 0;
ystart  =  -1;
xlimit  =  4.0*Pi;
ylimit =  2;
lineThickness = 
        0.005;

For[y = ystart; glist = {}, y < ylimit, 
      y +=  yspacing, 
For [x = xstart; plist = {}, 
        x < xlimit,  x +=  xspacing, 
        plist = Append[plist, {x, Sin[x] + y}]]; 
lnthk = 
        If[y != 0, lineThickness, 
          2*lineThickness]; 
glist = 
        Append[glist, 
          Graphics[{Thickness[lnthk], 
              Line[plist]}]];
]
Show[glist, Axes -> Automatic]

x = 
        0.0;
y = 0.0;
dx  = 2;
plist = {};
For[,x < xlimit,x = 
        x + dx,
dy = 
          Cos[x];

      plist = 
          Append[plist, 
            Graphics[{PointSize[0.02], Point[{x, y}]}]];

       y = y + dy*dx;
]
Show[plist, Axes -> Automatic]

Show[plist, glist, 
      Axes -> Automatic, 
      PlotRange -> {{xstart, xlimit}, {ystart - 1, ylimit + 1}}, 
      AspectRatio -> 0.5]

(* 
      define the samples using midpoint method *) 
x = 0.0;
y = 0.0;
dx  = 2;
plist = {};
For[,x < xlimit,x = 
        x + dx,
dy = 
        Cos[x + dx/2]; 
plist = 
        Append[plist, 
          Graphics[{PointSize[0.02], 
              Point[{x, y}]}]]; 
 y = 
          y + dy*dx;
]
Show[plist, Axes -> Automatic]

Show[plist, glist, 
      Axes -> Automatic, 
      PlotRange -> {{xstart, xlimit}, {ystart - 1, ylimit + 1}}, 
      AspectRatio -> 0.5]