0
$\begingroup$

I want to draw 2D curves in a 3D plot. As an example, funkce[1, 2, 3, 1, 0, 1000, 0, 100] is one curve, funkce[1, 2, 3, 2, 0, 1000, 0, 100] the second one etc. Results need to be something like this: https://community.wolfram.com/groups/-/m/t/1028305

MyPoint[o_, w_, a_, b_, c_, t_] := {-(a*(o^2 - w^2) + b*o + c) + (2*a*o*w + b*w)*(w*Sin[w*t] - o*Cos[w*t])/(w*Cos[w*t] + o*Sin[w*t]), (o^2 + w^2)/(w*Cos[w*t] + o*Sin[w*t])*(2*a*o*w + b*w)*E^(t*o)}; MyPoint2[o_, r_, a_, b_, c_,t_] := {r, -o*(r + (a*o^2 + b*o + c)/1)*E^(t*o)}; funkce[A_, B_, C_, T_, X1_, XN_, Y1_, YN_] := Module[{a = A, b = B, c = C, t = T, x1 = X1, xn = XN, y1 = Y1, yn = YN}, (* d2 *)(*o = 0, w > 0, hranice*) d2 = ParametricPlot[MyPoint[0, w, a, b, c, t], {w, 0, 300}, PlotRange -> {{x1, xn}, {y1, yn}}, PlotStyle -> {Thickness[0.007], Red}]; (* d3 *)(*o > 0, w > 0*) d3 = {}; For[i = 0.0001, i < 30, i = i + 1, AppendTo[d3, ParametricPlot[MyPoint[i, w, a, b, c, t], {w, 0, 300}, PlotRange -> {{x1, xn}, {y1, yn}}, BoundaryStyle -> Black, PlotStyle -> {Thickness[0.0025], LightRed}]]]; (*d4*) (*o > 0, w = 0*) d4 = ParametricPlot[ MyPoint2[o, r, a, b, c, t], {o, 0, 30}, {r, x1, xn}, PlotRange -> {{x1, xn}, {y1, yn}}, PlotPoints -> 50, PlotStyle -> {Directive[LightBlue, Opacity[0.7]]}, Mesh -> Full, MeshStyle -> {Directive[LightBlue, Opacity[0.5]]}]; Show[d4, d3, d2, Frame -> True, LabelStyle -> None, LabelStyle -> {FontFamily -> "Times New Roman", FontSize -> 12, FontColor -> Black}, FrameLabel -> {"\!\(\*SubscriptBox[\(k\), \(p\)]\)", "\!\(\*SubscriptBox[\(k\), \(i\)]\)"}(*,PlotLabel->Style[ "The Stability Region in the (Subscript[k, p], Subscript[k, i]) Plane",Black,Bold,FontFamily->"Times New Roman",FontSize-> 12]*)]]; 

My problem is that I want to print in a 3D box several images that are the output of the function[a, b, c, t, x1, xn, y1, yn]. Which we can see in the picture below. Each image was created by combining three parametric plots. enter image description here

$\endgroup$
2
  • $\begingroup$ I guess this is closely related Map a 3D plot into plane. $\endgroup$ Commented Nov 6, 2022 at 19:54
  • $\begingroup$ Not clear what you try to achieve and how it is different from the post that you linked. $\endgroup$ Commented Nov 7, 2022 at 20:26

1 Answer 1

1
$\begingroup$

Maybe the following get you started. Here is a simple example of several 2D functions drawn in a 3D plot:

f[i_] := Sin[2 Pi i x]; funs = Table[{i, x, f[i]}, {i, 5}]; ParametricPlot3D[funs, {i, 1, 5}, {x, 0, 2}] 

enter image description here

Addendum

If you want to display several 2D graphics in a 3D plot you can proceed as in this example:

First we create a table of graphics:

graphics = Table[Plot[Sin[n x], {x, 0, 2 Pi}] , {n, 1, 3}]

enter image description here

Then we change this 2D graphics into 3D graphics by adding an additional coordinate of 1,2,3.. Finally we display all 3D graphics together using "Show":

Do[graphics[[i]] = graphics[[i]] /. {x1_Real, x2_Real} :> {x1, i, x2} /. Graphics -> Graphics3D, {i, Length[graphics]}]; Show[graphics, PlotRange -> All] 

enter image description here

$\endgroup$
3
  • $\begingroup$ My problem is that I want to print in a 3D box several images that are the output of the function[a, b, c, t, x1, xn, y1, yn]. Which we can see in the picture below. Each image was created by combining three parametric plots. $\endgroup$ Commented Nov 7, 2022 at 20:08
  • $\begingroup$ I added an example how you would proceed starting from several 2D graphics. $\endgroup$ Commented Nov 7, 2022 at 21:29
  • $\begingroup$ Thank you so much! $\endgroup$ Commented Nov 10, 2022 at 16:45

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.