Author: configedit
2848 (free hugs on planet earth)
2842 (some bugs eliminated, caught some special cases)
the following javaprogram decides whether two given lines in a twodimensional layer (defined by each two x- and y-coordinates) do cross or at least touch. precaution correct input (external input-method used). test it to crap.
import java.lang.Math;
class a0311b_cross {
public static void main (String[] args) {
double l1x1in,l1x2in,l1y1in,l1y2in,l2x1in,l2x2in,l2y1in,l2y2in,l1x1,l1x2,l1y1,l1y2,l2x1,l2x2,l2y1,l2y2,a,b,c,d,xs,ys;
boolean parallel, deckung, crossed;
int fall;
l1x1in = 0;
l1x2in = 0;
l1y1in = 0;
l1y2in = 0;
l2x1in = 0;
l2x2in = 0;
l2y1in = 0;
l2y2in = 0;
l1x1 = 0;
l1x2 = 0;
l1y1 = 0;
l1y2 = 0;
l2x1 = 0;
l2x2 = 0;
l2y1 = 0;
l2y2 = 0;
a = 0;
b = 0;
c = 0;
d = 0;
xs = 0;
ys = 0;
parallel = false;
deckung = false;
crossed = false;
fall = 0;
l1x1in = eingabe.readDouble ("Linie 1, x1:");
l1y1in = eingabe.readDouble ("Linie 1, y1:");
l1x2in = eingabe.readDouble ("Linie 1, x2:");
l1y2in = eingabe.readDouble ("Linie 1, y2:");
l2x1in = eingabe.readDouble ("Linie 2, x1:");
l2y1in = eingabe.readDouble ("Linie 2, y1:");
l2x2in = eingabe.readDouble ("Linie 2, x2:");
l2y2in = eingabe.readDouble ("Linie 2, y2:");
//l1, bottom to top
if ((l1x1in == l1x2in) && (l1y1in < l1y2in))
{
l1x1 = l1x1in;
l1x2 = l1x2in;
l1y1 = l1y1in;
l1y2 = l1y2in;
}
//l1, top to bottom
if ((l1x1in == l2x1in) && (l1y1in > l1y2in))
{
l1x1 = l1x2in;
l1y1 = l1y2in;
l1x2 = l1x1in;
l1y2 = l1y1in;
}
//l1, left to right
if ((l1x1in < l1x2in) && (l1y2in == l1y2in))
{
l1x1 = l1x1in;
l1x2 = l1x2in;
l1y1 = l1y1in;
l1y2 = l1y2in;
}
//l1, right to left
if ((l1x1in > l1x2in) && (l1y1in == l1y2in))
{
l1x1 = l1x2in;
l1y1 = l1y2in;
l1x2 = l1x1in;
l1y2 = l1y1in;
}
//l1, bottom left to top right
if ((l1x1in < l1x2in) && (l1y1in < l1y2in))
{
l1x1 = l1x1in;
l1x2 = l1x2in;
l1y1 = l1y1in;
l1y2 = l1y2in;
}
//l1, top right to bottom left
if ((l1x1in > l1x2in) && (l1y1in > l1y2in))
{
l1x1 = l1x2in;
l1y1 = l1y2in;
l1x2 = l1x1in;
l1y2 = l1y2in;
}
//l1, top left to bottom right
if ((l1x1in < l1x2in) && (l1y1in > l1y2in))
{
l1x1 = l1x1in;
l1x2 = l1x2in;
l1y1 = l1y1in;
l1y2 = l1y2in;
}
//l1, bottom right to top left
if ((l1x1in > l1x2in) && (l1y1in < l1y2in))
{
l1x1 = l1x2in;
l1y1 = l1y2in;
l1x2 = l1x1in;
l1y2 = l1y1in;
}
//l2, bottom to top
if ((l2x1in == l2x2in) && (l2y1in < l2y2in))
{
l2x1 = l2x1in;
l2x2 = l2x2in;
l2y1 = l2y1in;
l2y2 = l2y2in;
}
//l2, top to bottom
if ((l2x1in == l2x2in) && (l2y1in > l2y2in))
{
l2x1 = l2x2in;
l2y1 = l2y2in;
l2x2 = l2x1in;
l2y2 = l2y1in;
}
//l2, left to right
if (( l2x1in < l2x2in) && (l2y1in == l2y2in))
{
l2x1 = l2x1in;
l2x2 = l2x2in;
l2y1 = l2y1in;
l2y2 = l2y2in;
}
//l2, right to left
if ((l2x1in > l2x2in) && (l2y1in == l2y2in))
{
l2x1 = l2x2in;
l2y1 = l2y2in;
l2x2 = l2x1in;
l2y2 = l2y1in;
}
//l2, bottom left to top right
if ((l2x1in < l2x2in) && (l2y1in < l2y2in))
{
l2x1 = l2x1in;
l2x2 = l2x2in;
l2y1 = l2y1in;
l2y2 = l2y2in;
}
//l2, top right to bottom left
if ((l2x1in > l2x2in) && (l2y1in > l2y2in))
{
l2x1 = l2x2in;
l2y1 = l2y2in;
l2x2 = l2x1in;
l2y2 = l2y1in;
}
//l2, top left to bottom right
if ((l2x1in < l2x2in) && (l2y1in > l2y2in))
{
l2x1 = l2x1in;
l2x2 = l2x2in;
l2y1 = l2y1in;
l2y2 = l2y2in;
}
//l2, bottom right to top left
if ((l2x1in > l2x2in) && (l2y1in < l2y2in))
{
l2x1 = l2x2in;
l2y1 = l2y2in;
l2x2 = l2x1in;
l2y2 = l2y1in;
}
// | * | 1
if ((l1x1 == l1x2) && (l2x1 == l2x2)) { fall = 1; }
// | * - 2
else if ((l1x1 == l1x2) && (l2y1 == l2y2)) { fall = 2; }
// | * / 3
else if ((l1x1 == l1x2) && (l2y1 < l2y2)) { fall = 3; }
// | * \ 4
else if ((l1x1 == l1x2) && (l2y1 > l2y2)) { fall = 4; }
// - * | 5
else if ((l1y1 == l1y2) && (l2x1 == l2x2)) { fall = 5; }
// - * - 6
else if ((l1y1 == l1y2) && (l2y1 == l2y2)) { fall = 6; }
// - * / 7
else if ((l1y1 == l1y2) && (l2y1 < l2y2)) { fall = 7; }
// - * \ 8
else if ((l1y1 == l1y2) && (l2y1 > l2y2)) { fall = 8; }
// / * | 9
else if ((l1y1 < l1y2) && (l2x1 == l2x2)) { fall = 9; }
// / * - 10
else if ((l1y1 < l1y2) && (l2y1 == l2y2)) { fall = 10; }
// / * / 11
else if ((l1y1 < l1y2) && (l2y1 < l2y2)) { fall = 11; }
// / * \ 12
else if ((l1y1 < l1y2) && (l2y1 > l2y2)) { fall = 12; }
// \ * | 13
else if ((l1y1 > l1y2) && (l2x1 == l2x2)) { fall = 13; }
// \ * - 14
else if ((l1y1 > l1y2) && (l2y1 == l2y2)) { fall = 14; }
// \ * / 15
else if ((l1y1 > l1y2) && (l2y1 < l2y2)) { fall = 15; }
// \ * \ 16
else if ((l1y1 > l1y2) && (l2y1 > l2y2)) { fall = 16; }
switch (fall)
{
// hv * vh 1,2,5,6
case 1: case 2: case 5: case 6:
{
break;
}
// | * x 3,4
case 3: case 4:
{
c = (l2y2 - l2y1) / (l2x2 - l2x1);
d = l2y1 - (c * l2x1);
xs = l1x1;
ys = (c * xs) + d;
break;
}
// x * | 9,13
case 9: case 13:
{
a = (l1y2 - l1y1) / (l1x2 - l1x1);
b = l1y1 - (a * l1x1);
xs = l2x1;
ys = (a * xs) + b;
break;
}
case 7: case 8: case 10: case 11: case 12: case 14: case 15: case 16:
{
a = (l1y2 - l1y1) / (l1x2 - l1x1);
c = (l2y2 - l2y1) / (l2x2 - l2x1);
b = l1y1 - (a * l1x1);
d = l2y1 - (c * l2x1);
if (a == c)
{
if (b == d)
{ deckung = true; }
else { deckung = false;
parallel = true; }
}
else { xs = (d - b) / (a - c); }
ys = (a * xs) + b;
break;
}
default:
{
//cannot be reached
break;
}
}
switch (fall)
{
// | * | 1
case 1:
{
if ((l1x1 == l2x1) && (((l2y1 >= l1y1) && (l2y1 <= l1y2)) || ((l2y2 >= l1y1) && (l2y2 <= l1y2))))
{ crossed = true; }
else
{ crossed = false; }
break;
}
// | * - 2
case 2:
{
if (((l2y1 >= l1y1) && (l2y1 <= l1y2)) && ((l1x1 >= l2x1) && (l1x1 <= l2x2)))
{ crossed = true; }
else
{ crossed = false; }
break;
}
// - * | 5
case 5:
{
if (((l2x1 >= l1x1) && (l2x1 <= l1x2)) && ((l1y1 >= l2y1) && (l1y1 <= l2y2)))
{ crossed = true; }
else
{ crossed = false; }
break;
}
// - * - 6
case 6:
{
if ((l1y1 == l2y1) && (((l2x1 >= l1x1) && (l2x1 <= l1x2)) || ((l2x2 >= l1x1) && (l2x2 <= l1x2))))
{ crossed = true; }
else
{ crossed = false; }
break;
}
// | * / 3, | * \ 4
case 3: case 4:
{
if ((ys >= l1y1) && (ys <= l1y1))
{ crossed = true; }
else
{ crossed = false; }
break;
}
// / * | 9, \ * | 13
case 9: case 13:
{
if ((ys >= l2y1) && (ys <= l2y2))
{ crossed = true; }
else
{ crossed = false; }
break;
}
// up-up
case 10: case 7: case 11:
{
if (parallel) { crossed = false; }
else if (deckung)
{
if (((l2x1 >= l1x1) && (l2x1 <= l1x2)) || ((l2x2 >= l1x1) && (l2x2 <= l1x2)))
{ crossed = true; }
else { crossed = false; }
}
else
{
if ((((xs >= l1x1) && (xs <= l1x2)) && ((ys >= l1y1) && (ys <= l1y2))) &&
(((xs >= l2x1) && (xs <= l2x2)) && ((ys >= l2y1) && (ys <= l2y2))))
{ crossed = true; }
else
{ crossed = false; }
}
break;
}
// up-down
case 12:
{
if ((((xs >= l1x1) && (xs <= l1x2)) && ((ys >= l1y1) && (ys <= l1y2))) &&
(((xs >= l2x1) && (xs <= l2x2)) && ((ys <= l2y1) && (ys >= l2y2))))
{ crossed = true; }
else
{ crossed = false; }
break;
}
// down-up
case 15:
{
if ((((xs >= l1x1) && (xs <= l1x2)) && ((ys <= l1y2) && (ys >= l1y2))) &&
(((xs >= l2x1) && (xs <= l2x2)) && ((ys >= l2y1) && (ys <= l2y2))))
{ crossed = true; }
else
{ crossed = false; }
break;
}
// down-down
case 16: case 14: case 8:
{
if (parallel) { crossed = false; }
else if (deckung)
{
if (((l2x1 >= l1x1) && (l2x1 <= l1x2)) || ((l2x2 >= l1x1) && (l2x2 <= l1x2)))
{ crossed = true; }
else { crossed = false; }
}
else
{
if ((((xs <= l1x1) && (xs >= l1x2)) && ((ys <= l1y1) && (ys >= l1y2))) &&
(((xs <= l2x1) && (xs >= l2x2)) && ((ys <= l2y1) && (ys >= l2y2))))
{ crossed = true; }
else { crossed = false; }
}
break;
}
//zero
default:
{
//cannot be reached
break;
}
}
if (crossed)
{
System.out.println ("the lines do cross or at least touch");
}
else
{
System.out.println ("the lines neither cross nor touch");
}
}
}
2834 (yet another result protocol)
Anwesend: M.Lorenz, R.Ferrara, M.Evering
TOPs
1.Krebs
2.Steuer
3.Medis
4.SF
5.sonstiges
6.nächstes Treffen
1. keine Krebszellen in Sicht, nächste Blutuntersuchung Tumormarker suchen, regelmäßige Nachsorge
2. im Januar 2018 nächste Freistellung beantragen
3. Matrix veröffentlicht
4. Kasse +10, jetzt 20. Sparpotential ausschöpfen
5. a) vor einiger Zeit 7 Tage bierfrei.
b) Erlebnisbericht
c) kurz erwähnt und demonstriert
d) professionelle Programmierung, allerdings keine Berufserfahrung
e) Gesamtvermögen 1.9.2017 297,39 €, BaFöG offen, Seiler und Co. falls ohne Titel : verjährt
f) youporn.com offensichtlich legal, besser keine Downloads
6. nächstes Treffen 3.11.2017, 14:30 GMT+01
2827 (some more stuff)
2824 (sitemaps interna)
1.
serverproject de
,2.
about
,3.
bernie the rat
,4.
cv
,5.
fuhrparkverwaltung driveby
,6.
psych o rama monologue 17
,7.
t3 zero
,8.
t5 meisdata
,9.
also sprach gardobaldo
,10.
audio sugardope 0
,11.
blog
,12.
bookmarks
,13.
contact
,14.
experienced involvement
,15.
guestbook archive
,16.
hörprobe herr der gezeiten
,17.
my next opera
,18.
shopping
,19.
social
,20.
via
,21.
herr der gezeiten
,22.
order herr der gezeiten audio
,23.
http www serverproject de
,24.
http www serverproject de files readme txt
,25.
home
,26.
t7 project matrix
,27.
http serverproject de
,28.
www serverproject de
,29.
https www serverproject de
,30.
serverproject de t5
,31.
http evering eu
,32.
meisdata rootdir
,33.
credits to vachss com
,34.
http evering net
,35.
rootdir
,36.
evering eu
,37.
http serverproject de t5
,38.
evering net
,39.
start
,40.
pdf
,41.
previous
,42.
serverproject de links via ht m
,43.
also_sprach_gardobaldo pdf
,44.
bernie_the_rat pdf
,45.
serverproject de download als o sprach gardob aldo htm
,46.
t5
,47.
a
,48.
hier können sie eine bestell email schreiben
,49.
http serverproject de index htm
,50.
http www serverproject de download herr der gezeiten htm
,51.
http www serverproject de index htm
,52.
link1
,53.
link4
,54.
link5
,55.
serverproject de download aud io sugardope 0 htm
,56.
serverproject de download ber nie the rat htm
,57.
serverproject de download her r der gezeiten htm
,58.
serverproject de download psy ch o rama monol ogue 17 htm
,59.
serverproject de internal boo kmarks htm
,60.
serverproject de internal gue stbook archive htm
,61.
serverproject de internal my next opera slit az htm
,62.
serverproject de internal ord er herr der gez eiten audio htm
,63.
serverproject de links blog h tm
,64.
serverproject de links experi enced involveme nt htm
,65.
www evering eu
,66.
guestbook archive serverproject de
,67.
http www serverproject de internal bookmarks htm bookmarks
,68.
parent directory
,69.
readme txt
,70.
serverproject de about htm
,71.
serverproject de contact htm
,72.
serverproject de download hoe rprobe herr der gezeiten htm
,73.
serverproject de internal cur riculum vitae h tm
,74.
serverproject de links shoppi ng htm
,75.
serverproject de subsites dri veby htm
,76.
serverproject de subsites t3 zero htm
,77.
serverproject de subsites t5 meisdata htm
,78.
visit website
,79.
www evering net
2821 (2017-11-11 faust hannover)
2819 (bicycle repair man)
| item(de) | item(en) | item(fr) | no |
|---|---|---|---|
| fahrrad | bike | pelo | 1 |
| zu fuss | walk | a pied | 2 |
| bus | bus | bus | 3 |
| auto | car | voiture | 4 |
| flugzeug | plane | avion | 5 |
2817 (untitled, uk)
| item | no |
|---|---|
| charles bukowski | 1 |
| anna bell peaks | 2 |
| tool | 3 |
| ajzklo | 4 |
| c2h5oh | 5 |
2814 (the pepperladies e.v.)
| item | URL |
|---|---|
| lkg enger | http://www.lkg-enger.de |
| drk herford | http://drk-herford.de |
| neues forum enger | http://facebook.com/neuesforumenger |
| forum bielefeld | http://forum-bielefeld.com |
| ex-in deutschland | http://ex-in.de |





