MathGroup Archive 2000

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Graphics for LOWER INTEGRAL

  • To: mathgroup at smc.vnet.net
  • Subject: [mg26151] Re: Graphics for LOWER INTEGRAL
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Thu, 30 Nov 2000 01:03:58 -0500 (EST)
  • Organization: Universitaet Leipzig
  • References: <8vvpf7$30p@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

since MathWorld is off line I have no idea how the picture may look like
but

LowerSumGraph[f_, {x_, x1_, x2_, n_Integer}, opts___] :=
    Module[{data},
       data = Table[{x, f}, {x, x1, x2, (x2 - x1)/(n - 1)}];
       Show[Plot[f, {x, x1, x2}, DisplayFunction -> Identity, opts], 
      Graphics[Rectangle @@@ Drop[Transpose[{data, RotateLeft[data]}],
-1] /. 
            Rectangle[{t1_, y1_}, {t2_, y2_}] :> 
              Rectangle[{t1, 0}, {t2, If[y2 < y1, y2, y1]}] /.
          
          Rectangle[{t1_, 0}, {t2_, y1_}] :> {GrayLevel[0.5], 
              Rectangle[{t1, 0}, {t2, y1}], {GrayLevel[0], 
                Line[{{t1, 0}, {t2, 0}, {t2, y1}, {t1, y1}, {t1, 0}}]}}
        ], DisplayFunction -> $DisplayFunction
      ]
    ]

and

LowerSumGraph[x^2, {x, -1, 1, 16}]

Will reproduce the common picture.

Hope that helps
  Jens

Ernesto Jardim wrote:
> 
> Hi
> 
> I'm doing a notebook to demonstrate the Rienman integral and I want to
> include a figure similar to the one there is on the Weistein CRC
> Encyclopedia for LOWER INTEGRAL. I've tried but I wasn't able to do the
> bars under the curve using the lowest f(x) of the curve on the interval
> defined.
> 
> Can you help me ?
> 
> Thanks
> 
> EJ


  • Prev by Date: Re: How to plot field lines of conformal mapping
  • Next by Date: Re: Bug: Mathematica 4.0 vs. Win2k on ThinkPad
  • Previous by thread: RE: Graphics for LOWER INTEGRAL
  • Next by thread: Transpose written as superscript T ?