Autor Beitrag
F34r0fTh3D4rk
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 5285
Erhaltene Danke: 29

Win Vista (32), Win 7 (64)
Eclipse, SciTE, Lazarus
BeitragVerfasst: Mi 01.03.06 16:58 
Also ich habe eine Gerade (eigentlich eine Strecke) durch 2 punkte definiert, wie kann ich jetzt am besten, an einem bestimmten x punkt die y koordinate berechen ?

und zwar so, dass das ganze auch in delphi machbar ist, ohne termumformungen und dergleichen.



vielen dank schonmal ;)
DaRkFiRe
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 526

WinXP Home & Professional
C, C++, Delphi
BeitragVerfasst: Mi 01.03.06 17:19 
dx = x2-x1
dy = y2-y1

m=dy/dx (sofern dx <> 0)

nx = x1+dx*(0.0-1.0)
ny = y1+dy*(0.0-1.0)

Vektor n = Stützvektor a (x1,y1) + t (Skalar) * Vektor (b-a)

Ohne das jetzt nachgerechnet zu haben, sollte das stimmen - ist eine ÄUßERST EINFACHE Sache.
Ich meine: lineare Funktionen hat man wann in der Schule!?

_________________
Lang ist der Weg durch Lehren - kurz und wirksam durch Beispiele! Seneca
MSCH
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1448
Erhaltene Danke: 3

W7 64
XE2, SQL, DevExpress, DevArt, Oracle, SQLServer
BeitragVerfasst: Mi 01.03.06 17:20 
das ist so nicht möglich!!
Um Y zu finden, brauchst du eine Funktion, die Y definiert!

z.b. Y= sqrt(x) was eine quadratische Funktion ist.
oder Y=log(x) was natürlemente eine Logarithmische Funktion ist.

grez
msch

_________________
ist das politisch, wenn ich linksdrehenden Joghurt haben möchte?
DaRkFiRe
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 526

WinXP Home & Professional
C, C++, Delphi
BeitragVerfasst: Mi 01.03.06 17:28 
Für mich ist ny=y1+t*dy eindeutig eine Funktion

_________________
Lang ist der Weg durch Lehren - kurz und wirksam durch Beispiele! Seneca
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 481

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Mi 01.03.06 17:33 
Schnell mal in die Formelsammlung geguckt:

Die beiden Punkte sind (x1,y1), (x2,y2). x ist der neue Wert, y die zugehörige y-Koordinate.
ausblenden Quelltext
1:
2:
3:
     y2 - y1
y = --------- * (x - x1) + y1
     x2 - x1
Das geht jetzt aber in Delphi, oder? ;-)

_________________
We are, we were and will not be.
F34r0fTh3D4rk Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 5285
Erhaltene Danke: 29

Win Vista (32), Win 7 (64)
Eclipse, SciTE, Lazarus
BeitragVerfasst: Mi 01.03.06 18:05 
danke, ich stand grad aufm schlauch, wenn man dinge macht, die komplizierter sind, dann kommt man einfach nicht auf sowas einfaches ^^ schon garnet nach 4 doppelstunden schule (=8 stunden) einer klausur, und zeitungen austeilen :P wobei die frage mehr zwischendrin entstanden ist, weil ich grad ne idee für ein programm gehabt habe (in der wipo klausur) ^^