+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2008
    Location
    ATX
    Posts
    1,545
    Points
    1,588,665.65
    Rep Power
    219

    Default [Calc] Distance Slope and Midpoint finder

    This is a very, very useful program that I wrote and it has saved me a whole lot of time. You enter two coordinate points and it finds the slope of the line that passes in between the two points, the distance between the two points and the midpoint of the line in between the two points. Here's the source and the program is attached on the bottom. DO NOT COPY AND PASTE THE SOURCE INTO A NEW PROGRAM THERE ARE SYMBOLS IN THE PROGRAM THAT ARE NOT SUPPORTED ON A BROWSER SO I HAVE HAD TO CHANGE SOME STUFF. see what you can figure out, and anything you don't get, ask me.
    Code:
    :"Distance, slope and midpoint
    ClrHome
    SetUpEditor LDSM
    Archive LDSM
    UnArchive LDSM
    If dim(LDSM)=1
    Then
    Goto 2
    End
    Disp "Welcome to DSM,","the distance,","slope, and","midpoint finding","program."
    For(A,1,2000)
    End
    Output(8,1,"       By: WMD54")
    For(A,1,1000)
    End
    ClrHome
    Lbl 2
    1->LDSM(1)
    Disp "To quit, enter","all zeros."
    For(A,1,500)
    End
    ClrHome
    0->A:0->B:0->C:0->D:0->E:0->F:0->G:0->H:0->I:0->J
    Lbl 1
    Disp "A=x,B=y,C=x‚","D=y‚"
    Prompt (A)
    Prompt (B)
    Prompt (C)
    Prompt (D)
    If A=0 and B=0 and C=0 and D=0
    Then
    Goto N
    End
    sqrt((C-A)(squared)+(D-B)(squared))->I
    (D-B)/(C-A)->E
    (D+B)/2->F
    (C+A)/2->G
    Disp "Distance:"
    Output(7,11,I)
    Disp "Slope:"
    Output(7,8,E)
    Disp "Midpoint:"
    Output(8,1,"(      ,      )")
    Output(8,2,G)
    Output(8,9,F)
    Pause 
    ClrHome
    Goto 1
    Lbl N
    ClrHome
    Output(4,1,"      Bye!      ")
    For(A,1,500)
    End
    ClrHome
    Stop
    Last edited by WMD54; 10-12-2008 at 11:26 PM.

  2. #2
    Join Date
    Jan 2008
    Location
    PA
    Posts
    1,164
    Points
    3,867,726.25
    Rep Power
    220

    Default

    coolio coulda used this in geometry last year


    Get Vip: Here
    Donate: Here«
    >>List of Compilers<<
    >>SFDM Name Generator<<
    [Owner Of FluidCoding]

  3. #3
    Join Date
    Apr 2008
    Location
    ATX
    Posts
    1,545
    Points
    1,588,665.65
    Rep Power
    219

    Default

    this stuff just keeps popping up. i'm in pre-cal and i've used it this year so you never know when you'll need it

  4. #4
    Join Date
    Jan 2008
    Location
    Your mom's fresh shaven Cun+.
    Posts
    2,598
    Points
    3,476,613.43
    Rep Power
    223

    Default

    u still do a review of it in Alg 2 sonnie





+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts