|
|
SHOWRAM.8xp
Purpose: Estimates definite integrals using Riemann Sums (Left, Middle, and Right) and displays them graphically.
Download SHOWRAM.8xp
Screenshots
Source Code
:Disp "A="
:Input A
:Disp "B="
:Input B
:Disp "NO.SUBINT"
:Input N
:(B-A)/N H
:H/2 D
:0 L
:0 M
:0 R
:ClrDraw
:DispG
:0 J
:A X
:Lbl 1
:Y1+L L
:Line(X,0,X,Y1)
:Line(X,Y1,X+H,Y1)
:Line(X+H,0,X+H,Y1)
:X+H X
:J+1 J
:If J
:Goto 1
:Pause
:HL L
:ClrHome
:Disp "LEFT="
:Disp L
:Pause
:ClrDraw
:DispG
:0 J
:A+H X
:Lbl 2
:Y1+R R
:Line(X-H,0,X-H,Y1)
:Line(X-H,Y1,X,Y1)
:Line(X,0,X,Y1)
:X+H X
:J+1 J
:If J
:Goto 2
:Pause
:HR R
:Disp "RIGHT="
:Disp R
:Pause
:ClrDraw
:DispG
:0 J
:A+D X
:Lbl 3
:Y1+M M
:Line(X-D,0,X-D,Y1)
:Line(X-D,Y1,X+D,Y1)
:Line(X+D,Y1,X+D,0)
:X+H X
:J+1 J
:If J
:Goto 3
:HM M
:Pause
:Disp "MIDPT="
:Disp Generated by SourceCoder, © 2005 Cemetech
|
|