hey wer bin ich denn ich würd nie aufgeben

Zitat von
AndY92:
...also lass ichs mit der mprojekt erstmal sein und mach an was anderem weiter...
Edit:
mom hier mal der Problematische Teil
Delphi-Quellcode:
procedure TForm1.Timer1Timer(Sender: TObject);
var anz: Integer;
begin
Scr.Canvas.Rectangle(0,0,Scr.Width,Scr.Height);
Scr.Canvas.Pen.Color := clBlack;
/////Auto zeichnen////
psi := pi * (ZAxe / 180);
theta := pi *(YAxe / 180);
phi := pi * (XAxe / 180);
for anz := 1 to 21 do
begin
X := cos(psi) * Xa[anz] + sin(psi) * Ya[anz];
Y := -sin(psi) * Xa[anz] + cos(psi) * Ya[anz];
Z := Za[anz];
Xalt := X;
Yalt := Y;
Zalt := Z;
X := cos(theta) * XAlt - sin(theta) * ZAlt;
Z := sin(theta) * XAlt + cos(theta) * ZAlt;
Xalt := X;
Yalt := Y;
Zalt := Z;
Y := cos(phi) * Yalt + sin(phi) * Zalt;
Z := -sin(phi) * Yalt + cos(phi) * Zalt;
If anz = 1 then
begin
XBew[0] := X;
YBew[0] := Y;
ZBew[0] := Z;
end;
X2D := X*e11 + Y*e12 + Z*e13;
X2Db := trunc(faktor * X2D + PosX2D);
Y2D := X*e21 + Y*e22 + Z*e23;
Y2Db := trunc(PosY2D - faktor * Y2D);
Scr.Canvas.MoveTo(X2Db,Y2Db);
X := cos(psi) * Xb[anz] + sin(psi) * Yb[anz];
Y := -sin(psi) * Xb[anz] + cos(psi) * Yb[anz];
Z := Zb[anz];
Xalt := X;
Yalt := Y;
Zalt := Z;
X := cos(theta) * Xalt - sin(theta) * ZAlt;
Z := sin(theta) * Xalt + cos(theta) * ZAlt;
Xalt := X;
Yalt := Y;
Zalt := Z;
Y := cos(phi) * Yalt + sin(phi) * Zalt;
Z := -sin(phi) * Yalt + cos(phi) * Zalt;
if anz = 1 then
begin
XBew[1] := X;
YBew[1] := Y;
ZBew[1] := Z;
end;
X2D := X*e11 + Y*e12 + Z*e13;
X2Db := trunc(faktor * X2D + PosX2D);
Y2D := X*e21 + Y*e22 + Z*e23;
Y2Db := trunc(PosY2D - faktor * Y2D);
Scr.Canvas.LineTo(X2Db,Y2Db);
end;
//////Differenzvektor//////
XBew[2] := XBew[1] - XBew[0];
YBew[2] := YBew[1] - YBew[0];
ZBew[2] := ZBew[1] - ZBew[0];
//////////////////////////
so aus dem differenzvektor wird jetz die bewegung ausgerechnet:
Delphi-Quellcode:
XVer := XVer - XBew[2] * Speed;
YVer := YVer - YBew[2] * Speed;
ZVer := ZVer - ZBew[2] * Speed;
kein plan... EIGENDLICH müsste es funktionieren