35 Reputation

4 Badges

5 years, 238 days

MaplePrimes Activity

These are replies submitted by JSalisbury

@Kitonum Hi again, I tried this same method with another graph I need to plot, but it didn't work unfortunately. I don't suppose you can spot what I've done wrong? Many thanks,


restart; with(plots);
theta := 70*Pi*(1/180);
alpha := sqrt(V^2-2*V*sin(theta)*(V*sin(theta)-1)+4*sin(theta)^2*(V*sin(theta))^2)/(-1/cos(theta)-2*cos(theta)*(V*sin(theta)-1));
for i from .1 by 0.5e-1 to .8 do Point[i] = [i, evalf(180*subs(V = i, alpha)/Pi-140)] end do;
Points := convert(Point, list); plot(Points, color = red);


@Kitonum That's brilliant, thank you very much. Very useful to know how to convert my data like that!

@acer Thank you, this is all very good to know. I am fairly new to Maple and am sort of stumbling my way through it, so information like this is very useful.

After a lot of trial and error (and error messages) please see below the code that creates the animation I was after, hopefully it will help someone else. I will also attach the GIF itself.


restart; with(VectorCalculus); with(Student[LinearAlgebra]); with(plots);
v[i] := 145000; thetabn := (1/8)*Pi; thetavn := (1/6)*Pi; k := 10; omegac := .5;
lrange := 6*Pi;
                         lrange := 6 Pi
v[b] := cos(2*thetabn)/cos(thetabn); v[g] := sin(2*thetabn)/cos(thetabn);
n := `<,>`(k*cos(thetabn), k*sin(thetabn), 0);
[v[b]*t, v[g]*sin(omegac*t)/omegac, v[g]*cos(omegac*t)/omegac];

lambda := v[i]*cos(thetavn)/cos(thetabn);
shockplot := PlanePlot(n, caption = "", planeoptions = [colour = blue, transparency = .5], normaloptions = [shape = cylindrical_arrow, colour = red]);

t1 := textplot3d([k*cos(thetabn), k*sin(thetabn), 0, 'n'], align = above);
B := animate(spacecurve, [[t, 0, v[g]/omegac], t = lrange .. A], A = lrange .. 0, axes = normal, thickness = 3);
C := animate(plot3d, [[v[b]*t, v[g]*sin(omegac*t)/omegac, v[g]*cos(omegac*t)/omegac], t = 0 .. x], x = 0 .. lrange, axes = normal, colour = red, labels = [" ", zeta, xi], thickness = 2, paraminfo = false);
reflection := display([B, display(op([1, -1, 1], B), C)], insequence, scaling = constrained, axes = normal, tickmarks = [0, 0, 0]);
display(shockplot, t1, reflection, axes = none);

@acer Thank you for your reply, however unfortunately I made a typo when writing the initial question and when corrected in maple, it just gives me a blank plot. I have included a factor of t outside the bracket and in the quotient with omegac to correct the typo. I have also revised my range after advice from my project supervisor. If you could help me understand why it will not plot now, I would be very grateful.

New code:


v := 145000;
thetavn := (1/6)*Pi;
omegac := 1/10;
s := v*cos(thetavn)*t*(cos(2*thetabn)*tan(thetabn)+sin(2*thetabn)*sin(omegac*t)/(omegac*t));
form := solve(s = 0, t);

plot(form, thetabn = 45*Pi*(1/180) .. 88*Pi*(1/180));

plot([(eval([thetabn, form], thetabn = (1/180)*Pi*k))[], k = 45 .. 88]);



@Kitonum Thank you for your reply.

This has given me a plot which looks as I would expect it to, and I've realised where I was going wrong, tweaked it and got the graph I was after. Thank you for your help.

Page 1 of 1