Results 1 to 8 of 8

Thread: Sdcits Wierd Stuff

  1. #1
    Join Date
    Feb 2006
    Location
    California-Foster City
    Posts
    742
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default Sdcits Wierd Stuff

    3/29/06
    My homework used the Hero’s formula, so I decided to make a script for it


    What it does: Calculates Area of Triangle given 3 side lengths
    Proof:
    Code:
    	We use the formula  area = (1/2)bc.sin(A)
    
    And sin(A) = 2 sin(A/2).cos(A/2)    so area = bc.sin(A/2).cos(A/2)
    
    Next we find expressions for cos(A/2) and sin(A/2) in terms of 
    s, a, b, c, where a, b, c are the sides of the triangle and s is 
    the semi-perimeter.
    
    So  s = (a+b+c)/2
    
                                        b^2 + c^2 - a^2
      cos(A) =   2cos^2(A/2) - 1    =   ----------------
                                             2bc
    
    
                                        b^2 + c^2 - a^2
                    2cos^2(A/2) = 1 + ------------------
                                             2bc
    
    
                                   (b+c)^2 - a^2      (b+c-a)(b+c+a)
                                =  --------------   = --------------
                                        2bc                2bc
    
                                     (2s-2a)2s
                                =   -----------
                                        2bc
    
                                       s(s-a) 
                         cos^2(A/2) = ---------
                                         bc
    
                                       b^2 + c^2 - a^2
    Next  cos(A) = 1 - 2 sin^2(A/2) = ----------------
                                            2bc
    
                                           b^2 + c^2 - a^2
                        2sin^2(A/2) = 1 - ----------------
                                                2bc
    
                                       a^2 - (b-c)^2      (a-b+c)(a+b-c)
                                    =  --------------  =  --------------
                                           2bc                  2bc
    
                                       (2s-2b)(2s-2c)
                                    =  --------------
                                            2bc
    
                                        (s-b)(s-c)
                        sin^2(A/2)  =  ------------
                                             bc
    
     We can now return to the formula for the area of the triangle:
    
         (1/2)bc.sin(A) = bc.sin(A/2).cos(A/2) 
    
                          bc.sqrt[s(s-a)(s-b(s-c)]
                        = ------------------------
                                   bc
    
                        = sqrt[s(s-a)(s-b)(s-c)]


    Script attached, Herons
    The Welcoming Party
    Don't be a Fakawi! Get 25 hours of sleep a day!

  2. #2
    Join Date
    Feb 2006
    Location
    L.A, USA
    Posts
    1,632
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I'm impressed. Such math from a 7th grader. I just learned about Tangent, Cosine, Sine a few months ago.

  3. #3
    Join Date
    Feb 2006
    Location
    California-Foster City
    Posts
    742
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    it isnt too advanced except for the proof, we need it for plane geometry and the trigonometry were learning right now
    The Welcoming Party
    Don't be a Fakawi! Get 25 hours of sleep a day!

  4. #4
    Join Date
    Feb 2006
    Location
    New Zealand
    Posts
    1,330
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Gah seems like sine is stil easier to me. You would never really use this in real world. so when you are using it in maths class or wherever you will most likely have a calculater to do sine. And even if you dont. I have sine tables inscribed on underside of my eyelids

  5. #5
    Join Date
    Feb 2006
    Location
    California-Foster City
    Posts
    742
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Gah, doing that takes time and you have to drop the line. This is for ALL triangles. I use this so i dont drop the hight, but yes, some times it doesnt have all 3 sides
    The Welcoming Party
    Don't be a Fakawi! Get 25 hours of sleep a day!

  6. #6
    Join Date
    Feb 2006
    Posts
    582
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Pyro
    And even if you dont. I have sine tables inscribed on underside of my eyelids
    Did it hurt?
    Free File Hosting
    No download timers!

    Rifkwtf.com

  7. #7
    Join Date
    Feb 2006
    Location
    L.A, USA
    Posts
    1,632
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I went on a Field Trip to KNotts the other day. We had to use this method to get the height of the Roller Costers and other rides. Haha My buddies split and we each did one thing met up in one place, copied each other and got it done in 35 minutes.

    Then I got to ride roller coasters with my girlfriend and all my buddies. Was a moment worth remembering. We might do this again this spring break, to disney though. No teachers and math shit. My dad ain't going to be home either. W00t. I'll have to start bribing my cousins to drive us. Pleh I wish I could drive.

  8. #8
    Join Date
    Feb 2006
    Location
    Australia
    Posts
    628
    Mentioned
    15 Post(s)
    Quoted
    105 Post(s)

    Default

    Good work sdcit! Do you know anything about simultaneous equations? I'd like to see a script which worked out the side lengths of a rectangle given the perimeter and area.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Wierd Ads?
    By cause in forum The Bashing Club / BBQ Pit
    Replies: 10
    Last Post: 11-09-2008, 12:05 AM
  2. Wierd ad!?!?
    By cause in forum Semi Stupid Pictures
    Replies: 18
    Last Post: 03-25-2007, 02:25 AM
  3. Sdcits pictures :D
    By Sdcit in forum Semi Stupid Pictures
    Replies: 64
    Last Post: 09-26-2006, 11:38 PM
  4. Sdcits Paradox Corner
    By Sdcit in forum News and General
    Replies: 24
    Last Post: 03-11-2006, 04:29 AM

Posting Permissions

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