Items tagged with plot3d plot3d Tagged Items Feed

Hi guys!

 

I want to do a fractalzoom into the mandelbrot fractal. The basic idea was to produce all single plot pictures, and then display/animate the zoom by iterate through the list. But I cant find a solution that really works. Any help would be very appreciated :)

 

So where am I? A single picture is made like this: (Sorry math tool didnt take it)

 

plot3d(0, -2 .. 1, -1.5 .. 1.5, orientation = [-90, 0], grid = [250, 250], style = patchnogrid, color = mandelbrot, lightmodel = None):

As u can see, I use the colorfunc property to color the plane. The mandelbrot procedure evalueates how many iterations are needed to go beyond 2 (> 2).

I cant post pictures, so heres the code if u want to reproduce some:

mandelbrot := proc (x, y)

local c, z, iterationCount, position, iterations;

z := 0; iterations := 0; iterationCount := 35;

position := Complex(x, y);

c := evalf(position);

while iterations < iterationCount do

    if 2 <= abs(z) then return iterations;

    else z := z^2+c; iterations := iterations+1;

    end if

od;

return iterations

end:

 

As you can see i get a list of PLOT3D structures, each with different axis sizes or views. The problem now is when i use the straightforward way:

display(plots, insequence=true);

the animated frames get smaller and smaller, because the frame is set to the same size as the first frame. 

Do you have any idea how I can make the axis somewhat dynamic, or do you see a better approach?

 

Here's the rest of the code to produce the effect. Its nearly hardcoded, because its still in experimental phase, sorry for that :P

The test does the following: Start with window -2 .. 1, -1.5 .. 1.5 and with linear interpolation zoom in to the window -0.82 .. -0.7, -0.2 .. -0.08.

 v is used to store the view explicitely, is explained afterwards

 

steps := 3:

d1 := (2-0.82)/steps:

d2 := (1+0.7)/steps:

d3 := (1.5-0.2)/steps:

d4 := (1.5+0.08)/steps:

l := Array(1 .. 4):

v := Array(1 .. 4):

for i from 0 to steps do

    v(i+1) := [d1*i-2 .. -d2*i+1, -1.5+d3*i .. 1.5-d4*i, 0 .. 0];

    l(i+1) := plot3d(0, d1*i-2 .. -d2*i+1, -1.5+d3*i .. 1.5-d4*i, orientation = [-90, 0], grid = [100, 100], style = patchnogrid, color = mandelbrot, lightmodel = None);

od:

 

display a single picture:

display(l(4));

 

create the animation:

ll := convert(l, list):

display(ll, insequence = true);

 

Another approach:

I tried to explicitely give the view as argument:

display(l(i), view = v(i)), v(i) stored in previous render loop. This works, but then the question to resolve is how to draw each frame into the same plot figure and not creating a new plot window for each one?

 

Now you should have all informations, any help is very welcome!

Thanks in advance,

Cheers,

geischtli

Hi,

thank for any  help.

I need you help to make a movies ( animation)  according to the index k=1..10.  k is used in Vect_T[k], vector of time to make an animation of the true solution, and it's also used in Matrix(M[..,..,k]), h

True solution:ow can I make a seq of plots for different value of k. 

 

plot3d(True_solution(x,y,Vect_T[k]),x=0..a,y=0..b,axes=boxed,grid= [11,11]);

Analytic solution

plots:-matrixplot(Matrix(M[..,..,k]),axes=boxed,tickmarks= [[1="0", 2=" ", 3=" ", 4=" ", 5=".4", 6=" ", 7=" 0.6", 8=" ", 9=".8", 10=" ", 11="1"],[1="0", 2=" ", 3=" ", 4=" ", 5=".4", 6=" ", 7=" 0.6", 8=" ", 9=".8", 10=" ", 11="1"],default],labels=[x,y,u],axes = boxed);

I tried, this:

S:=seq(plots:-matrixplot(Matrix(M[..,..,i]),labels=[x,y,u],axes = boxed),i=1..10):
plots:-display(S);
 But I get only one figure.

 also,

I tried

BoxTrue:=Null;
for k from 1 to 10 do
BoxTrue:=BoxTrue, plot3d(True_solution(x,y,Vector_time[k]),x=0..a,y=0..b,axes=boxed,grid= [11,11]): od:
display(BoxTrue, insequence=true);
also, no display

 

y = -x+sqrt(-5*x)

how to plot this in 2d or 3d graph

restart:with(plots):

TSol:= f(x,y,Q); # The actual funtion is in the attached maple sheet because of its size.

animate( plot3d, [TSol,y=-1..1,x=0..1], Q=0..2,contours=65,style=patchnogrid, grid=[80,80], orientation=[-360,-180], lightmodel=light4, shading=zhue, transparency=0.3,style=contour);

 

 

plot3d(subs(Q=2,TSol),y=-1..1,x=0..1,contours=65,style=patchnogrid, grid=[80,80], orientation=[-360,-180], lightmodel=light4, shading=zhue, transparency=0.3,style=contour);

 

For Q = 2, why there is a big difference between these two ouputs?

 3d_anim_try.mw (If the maple sheet is not accessible then let me know, I will copy past the function (f(x,y,Q))?)

Hello my friends

I have a problem in displaying the mesh grid in my plot3d graphs in maple 17. For instance, I when I type:

plot3d(x^2-y^2, x = -1 .. 1, y = -1 .. 1)

The graph has no mesh grid on it. I mean I am not seeing the black lines on the 3d surface. Can anyone help me to display the mesh grid please? Thanks. 

I'm trying to animate transparency, here's are the plots:

A :=tranz-> plot3d(-2/sqrt(x^2+y^2)+5/sqrt((x-1.6)^2+y^2), x = -5 .. 5, y = -5 .. 5, view = [-5 .. 5, -5 .. 5, -5 .. 5], transparency = tranz) end proc;
B := sphere([0, 0, 0], 2*(1/10), color = magenta, style = patchnogrid):
C := sphere([1.6, 0, 0], 5*(1/10), color = green, style = patchnogrid);
E := plot3d(0, x = -5 .. 5, y = -5 .. 5, view = [-5 .. 5, -5 .. 5, -5 .. 5], style = wireframe, shading = zgrayscale):

here I am displaying them without a problem:

display(A(.5), B, C, E, scaling = constrained, view = [-5 .. 5, -5 .. 5, -5 .. 5], axes = normal)

here I am trying to animate the transparency in plot A to no avail :( :

animate(display, [A(tranz), B, C, E, scaling = constrained, view = [-5 .. 5, -5 .. 5, -5 .. 5], axes = normal], tranz = 0.1 .. 0.9)
Error, (in plot3d) expecting option transparency to be of type {"default", realcons} but received tranz

if you guys could help me find where I'm going wrong I'd be super grateful :D

thanks everyone.

Best,

-Mike

Hi everyone,

restart:with(plots):

lambda1:=(S+sqrt(S^2+4*alpha))/(2);

lambda2:=(S-sqrt(S^2+4*alpha))/(2);

plot3d({lambda1,lambda2}, S=-10..10, alpha=-5..5, contours=50,grid=[100,100]);

plot([subs(alpha=-5,lambda1),subs(alpha=-4,lambda1),subs(alpha=-3,lambda1),subs(alpha=-2,lambda1)

,subs(alpha=-1,lambda1),subs(alpha=-0.5,lambda1),subs(alpha=0.0,lambda1),subs(alpha=0.5,lambda1)

,subs(alpha=1,lambda1),subs(alpha=2,lambda1),subs(alpha=3,lambda1),subs(alpha=4,lambda1)

,subs(alpha=5,lambda1),subs(alpha=-5,lambda2),subs(alpha=-4,lambda2),subs(alpha=-3,lambda2)

,subs(alpha=-2,lambda2),subs(alpha=-1,lambda2),subs(alpha=-0.5,lambda2),subs(alpha=0.0,lambda2)

,subs(alpha=0.5,lambda2),subs(alpha=1,lambda2),subs(alpha=2,lambda2),subs(alpha=3,lambda2)

,subs(alpha=4,lambda2),subs(alpha=5,lambda2)],S=-10...10,axes=box,color=[red,green]);

contourplot({lambda1,lambda2}, S=-10..10, alpha=-5..5, contours=50,grid=[100,100]);

 

 

How to minimize the disconnect in the 3d plot and countourplot to get a smooth plot?

 

Plot3d color oddity...

December 28 2013 Julesp 30

Hello, I was trying to control color of a plot3d. 
I find this answer : http://www.mapleprimes.com/questions/148397-Plot3d-Color-Range
And this post of @Carl Love : 
"

Here's how to do it with a continuous transformation to your existing color function, which is presumed to return a value between 0 and 1 (the HUE color scale). Keeping it continuous is very very nice when you want colors to represent  numeric values. Let's say your existing color function is C, and your coordinate functions for a parametrized surface are FxFyFz.

Gamma:= 1.15:
plot3d(
     [Fx, Fy, Fz],  a..b, c..d,
     color=  [
          (x,y)-> (1-C(x,y))^Gamma/3, #Hue
          (x,y)-> 1-C(x,y)/4,         #Saturation
          (x,y)-> 1-C(x,y)/7,         #Value
          colortype= HSV
     ],
     lightmodel= NONE,
     style= patchnogrid     
);

There are several parameters that can be adjusted; I've chosen some of them by my personal taste for color .

  • Gamma controls the evenness of the distribution between red and green. I gave this one a name because this is a well-known concept (see the Wikipedia article "Gamma correction").
  • The 3 in the Hue selects the fraction (1/3 in this case) of the full color spectrum that you want. If you want green to red, it will need to be pretty close to 3.
  • The Hue value is subtracted from 1 to make the scale go green to red rather than red to green.
  • The 4 in the Saturation controls (to some extent) how "light" the light-green is.
  • The 7 in the Value controls (to some extent) how dark the dark-red is (lower values will make it darker).
  • lightmodel= NONE is used so that the colors will not change due to shadows when the plot is rotated. "


I made some test to see the impact of the Gamma parameter. 
And with Gamma = 1, it's odd. 

with(plots):

>

C := proc (x, y) x end proc;

proc (x, y) x end proc

(1)
>

Gamma := 1.15:

 
>

a := 1:

 

``


It looks like with gamma = 1, plot3d makes an automatic scaling of the colors.
But I don't understand why.
Does anyone know ?

Download oddity.mw

How to draw an object in 3d which is like a spring

3 layers of circle already enough

Is there some sort of analog of  option  discont=true  in  plot3d?  Can I remove these vertical cylindrical surfaces in the following example? They correspond to the zeros of the denominator:

plot3d((x^2+sin(x))/(y^2+cos(x)), x = -7 .. 7, y = -5 .. 5, view = [-7 .. 7, -6 .. 6, -1 .. 7], numpoints = 50000, scaling = constrained, axes = normal);

plots[implicitplot](y^2+cos(x), x = -7 .. 7, y = -5 .. 5, scaling = constrained, numpoints = 5000);

 

 

how to draw this...

November 06 2013 rit 200

with(LinearAlgebra):

n := 31;

h := 0;

c1 := Array(1 .. 100);

c2 := Array(1 .. 100);

c3 := Array(1 .. 100);

for tt from 0 to n-4 do

c1[tt+1] := ...

c2[tt+1] := ...

c3[tt+1] := ...

od;

plot3d([c1[x],c2[x],c3[x]], x=1..27, y=1..27);

I have to calculate and plot the volume of a cicloid where a equals 27. Now, the assisstant gave us the supposed code to work with, as most were having trouble with it. Here it is:

 

with(plots)

plot3d(27*(t-sin(t)),sqrt((27*(1-cos(t)))^2)*cos(s),sqrt((27*(1-cos(t)))^2)*sin(s),t=0..2*Pi,s=0..2*Pi);

 

However, this gives me the following error when trying to execute:

 

Error, (in plot3d) bad range arguments: ((27-27*cos(t...

Modifying a 3d plot...

September 10 2013 iligocki 5

I've plotted the solution to a GLM using the plot3d function, but a portion of the plot is irrelevant to the presentation of the results. I can define the portion of the plot I want to discard based on the x and y coordinates, but I've gotten errors for every if-then statement I've tried to include. Any suggestions on how to properly integrate an if-then statement into the syntax?

plot3d is patchy/bumpy...

August 31 2013 GGEZ 10

I'm trying to plot a function that is defined as an integral of another function. I know that the function is quite smooth with no singularities over the region that i'm plotting. However, the resultant surface plot is bumpy/has holes in it. I tried changing the integration method and lowering epsilon to increase the precision but it still is not working. Can anyone help? Thanks for your time.

Maple file:

1 2 3 4 5 Page 1 of 5