-
Creating a programm
Hey guys, I have a big big favor to ask. Im studying in Germany and have to do a programming homework. However programming is not a main part of our lessons and therefore I have received very little knowledge about programming with Java. Nonetheless our teacher expects that we write a full programm which I can understand. Bottom line, I would be very thankful if anyone of you could programm or at least help me programm the following assignment:
Write a programm that proves, that two straights cut each other in a threedimensional room.
If someone needs the maths to it I can give them. I would be really thankful if you could help me out here. I would do it myself if I actually knew how, but I simply have no clue at all.
Thanks in advance.
-
Re: Creating a programm
This isn't a homework service, and what you're asking for equates to academic dishonest, which we don't tolerate.
Instead, I suggest you read through the following article and post an SSCCE demonstrating where exactly you're stuck: http://www.javaprogrammingforums.com...e-posting.html
-
Re: Creating a programm
This is what I have till now. A friend of mine helped, but now I dont know what to do anymore or how to show that the two straights are actually cutting each other as the math shows.
class matrix
{
public static void main()
{
//Initialisierung von 4 Vektoren
double[] s1 = new double[3] ;
double[] s2 ;
double[] r1 ;
double[] r2 ;
//Eingabe der Vektoren
// "Bitte Vektoren eingeben"
System.out.println("text") ;
s1[0] = system.in.read();
s1[1] = get();
s1[2] = get();
s2[0] = get();
s2[1] = get();
s2[2] = get();
r1[0] = get();
r1[1] = get();
r1[2] = get();
r2[0] = get();
r2[1] = get();
r2[2] = get();
double[][]m = new double [3][3];
m[0][0] = r1[0];
m[0][1] = r1[1];
m[0][2] = r1[0];
m[1][0] = -r2[0];
m[1][1] = -r2[1];
m[1][2] = -r2[2];
m[2][0] = s2[0]-s1[0];
m[2][1] = s2[1]-s1[1];
m[2][2] = s2[2]-s1[2];
m[0][1] = m[0][1]-(m[0][0]*m[1][2]/m[0][2]);
}
}