URL: https://www.overclockers.at/coding-stuff/linearinterpolation_99389/page_1 - zur Vollversion wechseln!
morgen leutelz!
i hätt ne frage und zwar: i hab x1, y1, x2, y2, x3 ABER ich suche y3
hat wer ne ahnung wie ich das lösen könnt?: x1:xy1=x2:y2=x3:y3 ... tjo wie komm i aufs y2? (bin leida in mathe a versager). x und y sind normale zahlen wobei x1:y1<=x2:y2<=x3:y3
sollte so wie ein diagramm aussehen
y3 y2 y1
|
| |
| | |
| | |
----------
x3 x2 x1
die länge vo da stützstelle x2 (y2) is halt gesucht, x2 weiß i ja...
greetz
Deine Angabe ist irgendwie widersprüchlich. Einmal schreibst du von y3, einmal von y2. Ich glaub du meinst sowas:
y2 = (y3*(x2-x1) - y1*(x2-x3))/(x3-x1)
wenn ich das richtig verstanden habe, ist deine lösung:
y2= y1+( ((x2-x1)/(x3-x1)) * (y3-y1) )
//edit: owned by ringding - kommt aber imho das selbe heraus.
overclockers.at v4.thecommunity
© all rights reserved by overclockers.at 2000-2026