Computer Science Canada Programming C, C++, Java, PHP, Ruby, Turing, VB   Username:   Password: Wiki   Blog   Search   Turing   Chat Room  Members
cetroid finder
Author Message
Jimbo 420

Posted: Thu Jun 08, 2006 11:46 am   Post subject: cetroid finder

this program is suposed to find the centroid of a triangle i can get 2 line eqasions but can't get it to find the centroid need help

centroid finder.t
Description:
Filename:  centroid finder.t
Filesize:  1.6 KB

upthescale

Posted: Thu Jun 08, 2006 7:37 pm   Post subject: (No subject)

are you asking for help? go the the main menu, and go in Turing Help, and post this same post there, because this is users submisions, not help quesitons!
Delos

Posted: Thu Jun 08, 2006 9:11 pm   Post subject: (No subject)

Moved.
And Jimbo 420, please change your sig. Statements promoting negative stereotypes, racism, or any other form of discriminatory thought are not tolerated. Even in a humorous form. I'm sure you did not mean any harm by it, but it still is really pushing the envelope.
upthescale

Posted: Thu Jun 08, 2006 10:00 pm   Post subject: (No subject)

how is that sterotype delos?
Clayton

Posted: Thu Jun 08, 2006 10:09 pm   Post subject: (No subject)

^the above post is spam^ you have been warned too many times to count and it is really annoying plz stop, it is a stereotype because it is using Jews (joo) as a point of humour (and improperly i might add)
Jimbo 420

Posted: Mon Jun 12, 2006 11:48 am   Post subject: (No subject)

any1 know how to finish this program it gives the 2 lines and the 2 lines must be solved to find the answer
TheOneTrueGod

Posted: Mon Jun 12, 2006 1:07 pm   Post subject: (No subject)

Theres two methods.

A) Substitution

L1: 2X + 4Y = 6
L2: 3X - 6Y = 12

from L1: X = (6-4Y)/2
X = 3 - 2Y

sub into L2:

3(3-2Y) - 6Y = 12
9 - 6Y - 6Y = 12
-6Y = 3
Y = -1/2

Sub back into the L1 eqn
2X + 4(-1/2) = 6
2X - 2 = 6
2X = 8
X = 4

so the point of intersection is (4,-1/2)

L1: X + 3Y = 5
L2: X - 4Y = 3

L1 - L2 : X-X + 3Y - (-4Y) = 5 - 3
3Y + 4Y = 2
7Y = 2
Y = 2/7

Now continue by subbing it in to the equations.

Summary

You'd probably be better off using the first method, though you'd have to be specific as to the input.
Jimbo 420

Posted: Wed Jun 14, 2006 11:59 am   Post subject: Nice

yeh i had something like that going on thanks for the help tho im pretty sure it works good now thanks man
Jimbo 420

Posted: Wed Jun 14, 2006 12:06 pm   Post subject: more help

ok i can't seem to figure out how to code the substitution equasions? would it work easier using a procedure(which i havent used many of:|)
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First

Page 1 of 1  [ 9 Posts ]
 Jump to:  Select a forum  CompSci.ca ------------ - Network News - General Discussion     General Forums   -----------------   - Hello World   - Featured Poll   - Contests     Contest Forums   -----------------   - DWITE   - [FP] Contest 2006/2008   - [FP] 2005/2006 Archive   - [FP] 2004/2005 Archive   - Off Topic     Lounges   ---------   - User Lounge   - VIP Lounge     Programming -------------- - General Programming     General Programming Forums   --------------------------------   - Functional Programming   - Logical Programming   - C     C   --   - C Help   - C Tutorials   - C Submissions   - C++     C++   ----   - C++ Help   - C++ Tutorials   - C++ Submissions   - Java     Java   -----   - Java Help   - Java Tutorials   - Java Submissions   - Ruby     Ruby   -----   - Ruby Help   - Ruby Tutorials   - Ruby Submissions   - Turing     Turing   --------   - Turing Help   - Turing Tutorials   - Turing Submissions   - PHP     PHP   ----   - PHP Help   - PHP Tutorials   - PHP Submissions   - Python     Python   --------   - Python Help   - Python Tutorials   - Python Submissions   - Visual Basic and Other Basics     VB   ---   - Visual Basic Help   - Visual Basic Tutorials   - Visual Basic Submissions     Education ----------- - Student Life   Graphics and Design ----------------------- - Web Design     Web Design Forums   ---------------------   - (X)HTML Help   - (X)HTML Tutorials   - Flash MX Help   - Flash MX Tutorials   - Graphics     Graphics Forums   ------------------   - Photoshop Tutorials   - The Showroom   - 2D Graphics   - 3D Graphics     Teams ------ - dTeam Public

 Style: Appalachia blueSilver eMJay subAppalachia subBlue subCanvas subEmjay subGrey subSilver subVereor Search: