MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

several plots in manipulate

  • To: mathgroup at smc.vnet.net
  • Subject: [mg90754] several plots in manipulate
  • From: "Cristina Ballantine" <cballant at holycross.edu>
  • Date: Wed, 23 Jul 2008 05:56:46 -0400 (EDT)

Hi,

I would like to manipulate a plot created from three different parametric 
plots. I display the plot with Show[plot1,plot2,plot3] (see code below). 
If I try this in Manipulate, the plots are displayed next to each other. I 
need them in a single plot. I cannot combine them in a single ParameterPlot
 because the options are different.

Any help is very much appreciated.

Cristina

---------------------------------------------------------------------------=
--------------

In the plot r2=2/3. In Manipulate r2 should be between r1 and 1.

r1 := 1/4
r2 := 2/3
u := Pi/3

plot1 := ParametricPlot[{{Re[
     1*Exp[I*u]*(((r1^4 + r2^4)*(1 - r*Exp[I*t]) +
           Sqrt[(r1^4 + r2^4)^2*(1 - r*Exp[I*t])^2 -
             4*(1 - r1^4*r2^4  *r*Exp[I*t])*(r1^4*r2^4 -
                r*Exp[I*t])])/(2*(1 - r1^4*r2^4*r*Exp[I*t])))^(1/4)],
    Im[1*Exp[
       I*u]*(((r1^4 + r2^4)*(1 - r*Exp[I*t]) +
           Sqrt[(r1^4 + r2^4)^2*(1 - r*Exp[I*t])^2 -
             4*(1 - r1^4*r2^4  *r*Exp[I*t])*(r1^4*r2^4 -
                r*Exp[I*t])])/(2*(1 - r1^4*r2^4*r*Exp[I*t])))^(1/
         4)]}, {Re[
     1*Exp[I*u]*(((r1^4 + r2^4)*(1 - r*Exp[I*t]) -
           Sqrt[(r1^4 + r2^4)^2*(1 - r*Exp[I*t])^2 -
             4*(1 - r1^4*r2^4  *r*Exp[I*t])*(r1^4*r2^4 -
                r*Exp[I*t])])/(2*(1 - r1^4*r2^4*r*Exp[I*t])))^(1/4)],
    Im[1*Exp[
       I*u]*(((r1^4 + r2^4)*(1 - r*Exp[I*t]) -
           Sqrt[(r1^4 + r2^4)^2*(1 - r*Exp[I*t])^2 -
             4*(1 - r1^4*r2^4  *r*Exp[I*t])*(r1^4*r2^4 -
                r*Exp[I*t])])/(2*(1 - r1^4*r2^4*r*Exp[I*t])))^(1/
         4)]}, {Re[
     I*Exp[I*u]*(((r1^4 + r2^4)*(1 - r*Exp[I*t]) +
           Sqrt[(r1^4 + r2^4)^2*(1 - r*Exp[I*t])^2 -
             4*(1 - r1^4*r2^4  *r*Exp[I*t])*(r1^4*r2^4 -
                r*Exp[I*t])])/(2*(1 - r1^4*r2^4*r*Exp[I*t])))^(1/4)],
    Im[I*Exp[
       I*u]*(((r1^4 + r2^4)*(1 - r*Exp[I*t]) +
           Sqrt[(r1^4 + r2^4)^2*(1 - r*Exp[I*t])^2 -
             4*(1 - r1^4*r2^4  *r*Exp[I*t])*(r1^4*r2^4 -
                r*Exp[I*t])])/(2*(1 - r1^4*r2^4*r*Exp[I*t])))^(1/
         4)]}, {Re[
     I*Exp[I*u]*(((r1^4 + r2^4)*(1 - r*Exp[I*t]) -
           Sqrt[(r1^4 + r2^4)^2*(1 - r*Exp[I*t])^2 -
             4*(1 - r1^4*r2^4  *r*Exp[I*t])*(r1^4*r2^4 -
                r*Exp[I*t])])/(2*(1 - r1^4*r2^4*r*Exp[I*t])))^(1/4)],
    Im[I*Exp[
       I*u]*(((r1^4 + r2^4)*(1 - r*Exp[I*t]) -
           Sqrt[(r1^4 + r2^4)^2*(1 - r*Exp[I*t])^2 -
             4*(1 - r1^4*r2^4  *r*Exp[I*t])*(r1^4*r2^4 -
                r*Exp[I*t])])/(2*(1 - r1^4*r2^4*r*Exp[I*t])))^(1/
         4)]}, {Re[(-1)*
      Exp[I*u]*(((r1^4 + r2^4)*(1 - r*Exp[I*t]) +
           Sqrt[(r1^4 + r2^4)^2*(1 - r*Exp[I*t])^2 -
             4*(1 - r1^4*r2^4  *r*Exp[I*t])*(r1^4*r2^4 -
                r*Exp[I*t])])/(2*(1 - r1^4*r2^4*r*Exp[I*t])))^(1/4)],
    Im[(-1)*Exp[
       I*u]*(((r1^4 + r2^4)*(1 - r*Exp[I*t]) +
           Sqrt[(r1^4 + r2^4)^2*(1 - r*Exp[I*t])^2 -
            
             4*(1 - r1^4*r2^4  *r*Exp[I*t])*(r1^4*r2^4 -
                r*Exp[I*t])])/(2*(1 - r1^4*r2^4*r*Exp[I*t])))^(1/
         4)]}, {Re[(-1)*
      Exp[I*u]*(((r1^4 + r2^4)*(1 - r*Exp[I*t]) -
           Sqrt[(r1^4 + r2^4)^2*(1 - r*Exp[I*t])^2 -
             4*(1 - r1^4*r2^4  *r*Exp[I*t])*(r1^4*r2^4 -
                r*Exp[I*t])])/(2*(1 - r1^4*r2^4*r*Exp[I*t])))^(1/4)],
    Im[(-1)*Exp[
       I*u]*(((r1^4 + r2^4)*(1 - r*Exp[I*t]) -
           Sqrt[(r1^4 + r2^4)^2*(1 - r*Exp[I*t])^2 -
             4*(1 - r1^4*r2^4  *r*Exp[I*t])*(r1^4*r2^4 -
                r*Exp[I*t])])/(2*(1 - r1^4*r2^4*r*Exp[I*t])))^(1/
         4)]}, {Re[(-I)*
      Exp[I*u]*(((r1^4 + r2^4)*(1 - r*Exp[I*t]) +
           Sqrt[(r1^4 + r2^4)^2*(1 - r*Exp[I*t])^2 -
             4*(1 - r1^4*r2^4  *r*Exp[I*t])*(r1^4*r2^4 -
                r*Exp[I*t])])/(2*(1 - r1^4*r2^4*r*Exp[I*t])))^(1/4)],
    Im[(-I)*Exp[
       I*u]*(((r1^4 + r2^4)*(1 - r*Exp[I*t]) +
           Sqrt[(r1^4 + r2^4)^2*(1 - r*Exp[I*t])^2 -
             4*(1 - r1^4*r2^4  *r*Exp[I*t])*(r1^4*r2^4 -
                r*Exp[I*t])])/(2*(1 - r1^4*r2^4*r*Exp[I*t])))^(1/
         4)]}, {Re[(-I)*
      Exp[I*u]*(((r1^4 + r2^4)*(1 - r*Exp[I*t]) -
          
           Sqrt[(r1^4 + r2^4)^2*(1 - r*Exp[I*t])^2 -
             4*(1 - r1^4*r2^4  *r*Exp[I*t])*(r1^4*r2^4 -
                r*Exp[I*t])])/(2*(1 - r1^4*r2^4*r*Exp[I*t])))^(1/4)],
    Im[(-I)*Exp[
       I*u]*(((r1^4 + r2^4)*(1 - r*Exp[I*t]) -
           Sqrt[(r1^4 + r2^4)^2*(1 - r*Exp[I*t])^2 -
             4*(1 - r1^4*r2^4  *r*Exp[I*t])*(r1^4*r2^4 -
                r*Exp[I*t])])/(2*(1 - r1^4*r2^4*r*Exp[I*t])))^(1/
         4)]}}, {t, 10^(-10), 2*Pi - 10^(-10)}, {r, 0,
   r1^4*r2^4 - 10^(-6)}, PlotRange -> All,
  ColorFunction -> Function[{x, y, t, r}, Hue[.5, t, r]],
  PlotPoints -> 25, Mesh -> False]



plot2 := ParametricPlot[{{Re[
     1*Exp[I*u]*(((r1^4 + r2^4)*(1 - r*Exp[I*t]) +
           Sqrt[(r1^4 + r2^4)^2*(1 - r*Exp[I*t])^2 -
             4*(1 - r1^4*r2^4  *r*Exp[I*t])*(r1^4*r2^4 -
                r*Exp[I*t])])/(2*(1 - r1^4*r2^4*r*Exp[I*t])))^(1/4)],
    Im[1*Exp[
       I*u]*(((r1^4 + r2^4)*(1 - r*Exp[I*t]) +
           Sqrt[(r1^4 + r2^4)^2*(1 - r*Exp[I*t])^2 -
             4*(1 - r1^4*r2^4  *r*Exp[I*t])*(r1^4*r2^4 -
                r*Exp[I*t])])/(2*(1 - r1^4*r2^4*r*Exp[I*t])))^(1/
         4)]}, {Re[
     1*Exp[I*u]*(((r1^4 + r2^4)*(1 - r*Exp[I*t]) -
           Sqrt[(r1^4 + r2^4)^2*(1 - r*Exp[I*t])^2 -
             4*(1 - r1^4*r2^4  *r*Exp[I*t])*(r1^4*r2^4 -
                r*Exp[I*t])])/(2*(1 - r1^4*r2^4*r*Exp[I*t])))^(1/4)],
    Im[1*Exp[
       I*u]*(((r1^4 + r2^4)*(1 - r*Exp[I*t]) -
           Sqrt[(r1^4 + r2^4)^2*(1 - r*Exp[I*t])^2 -
             4*(1 - r1^4*r2^4  *r*Exp[I*t])*(r1^4*r2^4 -
                r*Exp[I*t])])/(2*(1 - r1^4*r2^4*r*Exp[I*t])))^(1/
         4)]}, {Re[
     I*Exp[I*u]*(((r1^4 + r2^4)*(1 - r*Exp[I*t]) +
           Sqrt[(r1^4 + r2^4)^2*(1 - r*Exp[I*t])^2 -
             4*(1 - r1^4*r2^4  *r*Exp[I*t])*(r1^4*r2^4 -
                r*Exp[I*t])])/(2*(1 - r1^4*r2^4*r*Exp[I*t])))^(1/4)],
    Im[I*Exp[
       I*u]*(((r1^4 + r2^4)*(1 - r*Exp[I*t]) +
           Sqrt[(r1^4 + r2^4)^2*(1 - r*Exp[I*t])^2 -
             4*(1 - r1^4*r2^4  *r*Exp[I*t])*(r1^4*r2^4 -
                r*Exp[I*t])])/(2*(1 - r1^4*r2^4*r*Exp[I*t])))^(1/
         4)]}, {Re[
     I*Exp[I*u]*(((r1^4 + r2^4)*(1 - r*Exp[I*t]) -
           Sqrt[(r1^4 + r2^4)^2*(1 - r*Exp[I*t])^2 -
             4*(1 - r1^4*r2^4  *r*Exp[I*t])*(r1^4*r2^4 -
                r*Exp[I*t])])/(2*(1 - r1^4*r2^4*r*Exp[I*t])))^(1/4)],
    Im[I*Exp[
       I*u]*(((r1^4 + r2^4)*(1 - r*Exp[I*t]) -
           Sqrt[(r1^4 + r2^4)^2*(1 - r*Exp[I*t])^2 -
             4*(1 - r1^4*r2^4  *r*Exp[I*t])*(r1^4*r2^4 -
                r*Exp[I*t])])/(2*(1 - r1^4*r2^4*r*Exp[I*t])))^(1/
         4)]}, {Re[(-1)*
      Exp[I*u]*(((r1^4 + r2^4)*(1 - r*Exp[I*t]) +
           Sqrt[(r1^4 + r2^4)^2*(1 - r*Exp[I*t])^2 -
             4*(1 - r1^4*r2^4  *r*Exp[I*t])*(r1^4*r2^4 -
                r*Exp[I*t])])/(2*(1 - r1^4*r2^4*r*Exp[I*t])))^(1/4)],
    Im[(-1)*Exp[
       I*u]*(((r1^4 + r2^4)*(1 - r*Exp[I*t]) +
           Sqrt[(r1^4 + r2^4)^2*(1 - r*Exp[I*t])^2 -
            
             4*(1 - r1^4*r2^4  *r*Exp[I*t])*(r1^4*r2^4 -
                r*Exp[I*t])])/(2*(1 - r1^4*r2^4*r*Exp[I*t])))^(1/
         4)]}, {Re[(-1)*
      Exp[I*u]*(((r1^4 + r2^4)*(1 - r*Exp[I*t]) -
           Sqrt[(r1^4 + r2^4)^2*(1 - r*Exp[I*t])^2 -
             4*(1 - r1^4*r2^4  *r*Exp[I*t])*(r1^4*r2^4 -
                r*Exp[I*t])])/(2*(1 - r1^4*r2^4*r*Exp[I*t])))^(1/4)],
    Im[(-1)*Exp[
       I*u]*(((r1^4 + r2^4)*(1 - r*Exp[I*t]) -
           Sqrt[(r1^4 + r2^4)^2*(1 - r*Exp[I*t])^2 -
             4*(1 - r1^4*r2^4  *r*Exp[I*t])*(r1^4*r2^4 -
                r*Exp[I*t])])/(2*(1 - r1^4*r2^4*r*Exp[I*t])))^(1/
         4)]}, {Re[(-I)*
      Exp[I*u]*(((r1^4 + r2^4)*(1 - r*Exp[I*t]) +
           Sqrt[(r1^4 + r2^4)^2*(1 - r*Exp[I*t])^2 -
             4*(1 - r1^4*r2^4  *r*Exp[I*t])*(r1^4*r2^4 -
                r*Exp[I*t])])/(2*(1 - r1^4*r2^4*r*Exp[I*t])))^(1/4)],
    Im[(-I)*Exp[
       I*u]*(((r1^4 + r2^4)*(1 - r*Exp[I*t]) +
           Sqrt[(r1^4 + r2^4)^2*(1 - r*Exp[I*t])^2 -
             4*(1 - r1^4*r2^4  *r*Exp[I*t])*(r1^4*r2^4 -
                r*Exp[I*t])])/(2*(1 - r1^4*r2^4*r*Exp[I*t])))^(1/
         4)]}, {Re[(-I)*
      Exp[I*u]*(((r1^4 + r2^4)*(1 - r*Exp[I*t]) -
          
           Sqrt[(r1^4 + r2^4)^2*(1 - r*Exp[I*t])^2 -
             4*(1 - r1^4*r2^4  *r*Exp[I*t])*(r1^4*r2^4 -
                r*Exp[I*t])])/(2*(1 - r1^4*r2^4*r*Exp[I*t])))^(1/4)],
    Im[(-I)*Exp[
       I*u]*(((r1^4 + r2^4)*(1 - r*Exp[I*t]) -
           Sqrt[(r1^4 + r2^4)^2*(1 - r*Exp[I*t])^2 -
             4*(1 - r1^4*r2^4  *r*Exp[I*t])*(r1^4*r2^4 -
                r*Exp[I*t])])/(2*(1 - r1^4*r2^4*r*Exp[I*t])))^(1/
         4)]}}, {t, 10^(-10), 2*Pi - 10^(-10)}, {r,
   r1^4*r2^4 - 10^(-6), r1^4*r2^4 + 10^(-2)}, PlotRange -> All,
  ColorFunction -> Function[{x, y, t, r}, Hue[1, t, r]],
  PlotPoints -> 45, Mesh -> False]



plot3 := ParametricPlot[{{Re[
     1*Exp[I*u]*(((r1^4 + r2^4)*(1 - r*Exp[I*t]) +
           Sqrt[(r1^4 + r2^4)^2*(1 - r*Exp[I*t])^2 -
             4*(1 - r1^4*r2^4  *r*Exp[I*t])*(r1^4*r2^4 -
                r*Exp[I*t])])/(2*(1 - r1^4*r2^4*r*Exp[I*t])))^(1/4)],
    Im[1*Exp[
       I*u]*(((r1^4 + r2^4)*(1 - r*Exp[I*t]) +
           Sqrt[(r1^4 + r2^4)^2*(1 - r*Exp[I*t])^2 -
             4*(1 - r1^4*r2^4  *r*Exp[I*t])*(r1^4*r2^4 -
                r*Exp[I*t])])/(2*(1 - r1^4*r2^4*r*Exp[I*t])))^(1/
         4)]}, {Re[
     1*Exp[I*u]*(((r1^4 + r2^4)*(1 - r*Exp[I*t]) -
           Sqrt[(r1^4 + r2^4)^2*(1 - r*Exp[I*t])^2 -
             4*(1 - r1^4*r2^4  *r*Exp[I*t])*(r1^4*r2^4 -
                r*Exp[I*t])])/(2*(1 - r1^4*r2^4*r*Exp[I*t])))^(1/4)],
    Im[1*Exp[
       I*u]*(((r1^4 + r2^4)*(1 - r*Exp[I*t]) -
           Sqrt[(r1^4 + r2^4)^2*(1 - r*Exp[I*t])^2 -
             4*(1 - r1^4*r2^4  *r*Exp[I*t])*(r1^4*r2^4 -
                r*Exp[I*t])])/(2*(1 - r1^4*r2^4*r*Exp[I*t])))^(1/
         4)]}, {Re[
     I*Exp[I*u]*(((r1^4 + r2^4)*(1 - r*Exp[I*t]) +
           Sqrt[(r1^4 + r2^4)^2*(1 - r*Exp[I*t])^2 -
             4*(1 - r1^4*r2^4  *r*Exp[I*t])*(r1^4*r2^4 -
                r*Exp[I*t])])/(2*(1 - r1^4*r2^4*r*Exp[I*t])))^(1/4)],
    Im[I*Exp[
       I*u]*(((r1^4 + r2^4)*(1 - r*Exp[I*t]) +
           Sqrt[(r1^4 + r2^4)^2*(1 - r*Exp[I*t])^2 -
             4*(1 - r1^4*r2^4  *r*Exp[I*t])*(r1^4*r2^4 -
                r*Exp[I*t])])/(2*(1 - r1^4*r2^4*r*Exp[I*t])))^(1/
         4)]}, {Re[
     I*Exp[I*u]*(((r1^4 + r2^4)*(1 - r*Exp[I*t]) -
           Sqrt[(r1^4 + r2^4)^2*(1 - r*Exp[I*t])^2 -
             4*(1 - r1^4*r2^4  *r*Exp[I*t])*(r1^4*r2^4 -
                r*Exp[I*t])])/(2*(1 - r1^4*r2^4*r*Exp[I*t])))^(1/4)],
    Im[I*Exp[
       I*u]*(((r1^4 + r2^4)*(1 - r*Exp[I*t]) -
           Sqrt[(r1^4 + r2^4)^2*(1 - r*Exp[I*t])^2 -
             4*(1 - r1^4*r2^4  *r*Exp[I*t])*(r1^4*r2^4 -
                r*Exp[I*t])])/(2*(1 - r1^4*r2^4*r*Exp[I*t])))^(1/
         4)]}, {Re[(-1)*
      Exp[I*u]*(((r1^4 + r2^4)*(1 - r*Exp[I*t]) +
           Sqrt[(r1^4 + r2^4)^2*(1 - r*Exp[I*t])^2 -
             4*(1 - r1^4*r2^4  *r*Exp[I*t])*(r1^4*r2^4 -
                r*Exp[I*t])])/(2*(1 - r1^4*r2^4*r*Exp[I*t])))^(1/4)],
    Im[(-1)*Exp[
       I*u]*(((r1^4 + r2^4)*(1 - r*Exp[I*t]) +
           Sqrt[(r1^4 + r2^4)^2*(1 - r*Exp[I*t])^2 -
            
             4*(1 - r1^4*r2^4  *r*Exp[I*t])*(r1^4*r2^4 -
                r*Exp[I*t])])/(2*(1 - r1^4*r2^4*r*Exp[I*t])))^(1/
         4)]}, {Re[(-1)*
      Exp[I*u]*(((r1^4 + r2^4)*(1 - r*Exp[I*t]) -
           Sqrt[(r1^4 + r2^4)^2*(1 - r*Exp[I*t])^2 -
             4*(1 - r1^4*r2^4  *r*Exp[I*t])*(r1^4*r2^4 -
                r*Exp[I*t])])/(2*(1 - r1^4*r2^4*r*Exp[I*t])))^(1/4)],
    Im[(-1)*Exp[
       I*u]*(((r1^4 + r2^4)*(1 - r*Exp[I*t]) -
           Sqrt[(r1^4 + r2^4)^2*(1 - r*Exp[I*t])^2 -
             4*(1 - r1^4*r2^4  *r*Exp[I*t])*(r1^4*r2^4 -
                r*Exp[I*t])])/(2*(1 - r1^4*r2^4*r*Exp[I*t])))^(1/
         4)]}, {Re[(-I)*
      Exp[I*u]*(((r1^4 + r2^4)*(1 - r*Exp[I*t]) +
           Sqrt[(r1^4 + r2^4)^2*(1 - r*Exp[I*t])^2 -
             4*(1 - r1^4*r2^4  *r*Exp[I*t])*(r1^4*r2^4 -
                r*Exp[I*t])])/(2*(1 - r1^4*r2^4*r*Exp[I*t])))^(1/4)],
    Im[(-I)*Exp[
       I*u]*(((r1^4 + r2^4)*(1 - r*Exp[I*t]) +
           Sqrt[(r1^4 + r2^4)^2*(1 - r*Exp[I*t])^2 -
             4*(1 - r1^4*r2^4  *r*Exp[I*t])*(r1^4*r2^4 -
                r*Exp[I*t])])/(2*(1 - r1^4*r2^4*r*Exp[I*t])))^(1/
         4)]}, {Re[(-I)*
      Exp[I*u]*(((r1^4 + r2^4)*(1 - r*Exp[I*t]) -
          
           Sqrt[(r1^4 + r2^4)^2*(1 - r*Exp[I*t])^2 -
             4*(1 - r1^4*r2^4  *r*Exp[I*t])*(r1^4*r2^4 -
                r*Exp[I*t])])/(2*(1 - r1^4*r2^4*r*Exp[I*t])))^(1/4)],
    Im[(-I)*Exp[
       I*u]*(((r1^4 + r2^4)*(1 - r*Exp[I*t]) -
           Sqrt[(r1^4 + r2^4)^2*(1 - r*Exp[I*t])^2 -
             4*(1 - r1^4*r2^4  *r*Exp[I*t])*(r1^4*r2^4 -
                r*Exp[I*t])])/(2*(1 - r1^4*r2^4*r*Exp[I*t])))^(1/
         4)]}}, {t, 10^(-10), 2*Pi - 10^(-10)}, {r,
   r1^4*r2^4 + 10^(-2), 1}, PlotRange -> All,
  ColorFunction -> Function[{x, y, t, r}, Hue[.1, t, r]],
  PlotPoints -> 25, Mesh -> False]


  • Prev by Date: Re: NDSolve[] with nested If[] and Piecewise[] usage:
  • Next by Date: Can't Simplify logical expression
  • Previous by thread: Re: NDSolve[] with error dsfun:
  • Next by thread: Re: several plots in manipulate