Schiefer Wurf mit Drehung (Rocket trajectory)
Show older comments
[Mechanical translation added below]
Guten Tag,
ich habe ein Problem bei folgender Aufgabe. Ich habe eine Parabel eines schiefen Wurfes und an dieser soll ich nun an zehn Punkten ein Objekt plotten. dieses Objekt sollte zum jeweiligen Zeitpunkt immer senkrecht zur Achse stehen. So dass ich am Ende einen Plott habe, in dem zehn Mal das Objekt, zB ein Rakete geplottet wurde und jeweils senkrecht zur Kurve steht. Ich habe bereits die Formeln für mein Objekt und auch die Drehung hinbekommen. Was mir aber jetzt noch fehlt, ist eine For-Schleife, in der sich das Objekt an der Kurve entlang dreht.
Das hier ist die Formel um die Rakete zu plotten:
cla
plot(1)
axis([-1 3 0 3])
grid on
rakete=[1 0 0 -.5 0 0 .5 1 1 1.5 1;0 0 .5 0 0 2 3 2 0 0 .5];
line(rakete(1,:),rakete(2,:))
Die Drehungsformel ist folgende:
RM= [ cos(pi/4), -sin(pi/4) ; sin(pi/4), cos(pi/4)]
rakete2=RM*rakete;
Dann habe ich das ganze geplottet:
plot(rakete2(1),rakete2(2))
line(rakete2(1,:),rakete2(2,:))
Und zu guter letzt die Wurfparabel:
t=0:0.1:4;
v=27.7;
g=9.81;
alpha=45;
winkel=alpha*(pi/180);
vx=cos(winkel)*v;
vy=sin(winkel)*v;
x=vx.*t;
y=vy.*t-g/2*t.^2;
axis equal;
plot(x,y)
Und jetzt komme ich nicht weiter, da ich leider ein Anfänger in Matlab bin. Meine Gedanken waren folgende. Zuerst erstelle ich einen Vektor mit zehn Schritten, die Länge des Vektors sollte zugleich die Länge der Wurfparabel sein. Dann lasse ich mir zu jedem Punkt des Vektors den passenden y-Wert der Parabel geben und versetze den unteren linken Punkt der Rakete (oder evtl. die Mitte der Rakete falls das geht) an diesen Punkt. Dann erstelle ich die erste Ableitung und bilde zu jedem der Zehn Punkte die Senkechte. anhand des Winkels zur y-Achse wollte ich dann die Rakete drehen.
Ich hoffe einer von euch kann mir helfen,
vielen Dank und ein schönes Pfingstwochenende
Mike
=====
[Mechanical translation -- flaws are likely]
Good day,
I have a problem with the following task. I have a parable of an oblique throw and this I shall now plotting to ten points an object. this object should always be perpendicular to each date to the axis. So I end up with a plot, in which ten times the object, for example, a rocket was plotted, and each is perpendicular to the curve. I've already hinbekommen (??) the formulas for my property and also the rotation. But what I still lacking is a For loop in which the object along the curve turns.
This is the formula for the rocket to plot:
cla
plot (1)
axis ([-1 3 0 3])
grid on
rocket = [1 0 0 - .5 0 0 .5 1 1 1.5 1; 0 0 .5 0 0 2 3 2 0 0 .5];
line (rocket (1, :), rocket (2, :))
The rotation formula is as follows:
RM = [cos (pi / 4),-sin (pi / 4) sin (pi / 4), cos (pi / 4)]
rakete2 = rocket * RM;
Then I plotted the whole:
plot (rakete2 (1), rakete2 (2))
line (rakete2 (1, :), rakete2 (2, :))
And finally, the trajectory:
t = 0:0.1:4;
v = 27.7;
g = 9.81;
alpha = 45;
angle = alpha * (Pi/180)
vx = cos (angle) * v;
vy = sin (angle) * v;
x = vx.*t;
y = vy.*t-g/2*t.^2;
axis equal;
plot(x,y)
And now I get no further, because I'm a beginner in Matlab, unfortunately. My thoughts were as follows. First, I create a vector with ten steps, the length of the vector should also be the length of the trajectory. Then I let myself to every point of the vector give the appropriate y-value of the parabola, whipping the lower left point of the rocket (or possibly the middle of the rocket if it can) at this point. Then I create the first derivative and form to each of the ten points Senkechte. basis of the angle to the y-axis, I wanted to turn the rocket.
I hope one of you can help me, thank you and a beautiful weekend of Pentecost
Mike
Answers (0)
Categories
Find more on Surface and Mesh Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!