Christopher2222

5785 Reputation

24 Badges

16 years, 349 days

MaplePrimes Activity


These are answers submitted by Christopher2222

Thanks PatrickT

Yes Bibinou, your mistake was in using the solution to the polynomial example I was using.

You would use your solution to your polynomial in your subs for P as PatrickT has shown.  ie the values you come up with in your answer at (1.4).

And so for your axis of rotation you would define it as    [ [ xsol , ysol , Psol ] , [ xsol , ysol , Psol+1] ]

where you set     Psol:=subs({x=xsol,y=ysol},P)     or if you want just substitute the actual numbers

As for your error you forgot to define r[0]:=PP

 

Not exactly. 

There are a few things to consider here ... the range, the view, projection ( and I think camera - I'm not too familiar with what's available in the newer versions)

range - specifying the x and/or y range adjusts the range of what you can see in the plot window.

view - selects a portion of your selected range to view which may be larger than your selected range which would give an appearance of zoomed out. 

projection - gives the appearance of view from different perspectives.

None of these really address the situation I believe you are looking for.  The camera option in the newer versions probably address that, I don't know.  I'm pretty sure you are looking for programatical way to zoom in the graph the same way as the mouse zoom option that is available once the graph is created.

That is one thing that I don't understand sometimes in Maple.  Not every option available in the plot menu is accessable via programming.  There may be some programming tricks to get them to work.  As an example using lprint to see how to programmatically create superscripts.  However it doesn't work so well on graphs, it works almost like op does which is another trick to used sometimes to extract information from graphs.  However I have digressed ... I don't think you can scale a graph the way you want.

 

Sure that's no problem.  Sorry late replying, but in any case.  Here's two similar ways, one way below or just modify Pagan's example a bit which is much simpler which I show at the end.

The help page on plottools[rotate] provides us with a little bit of help in the last example.  From the help page it states "If the calling sequence is of the form rotate(q,alpha,[pt_3d_1,pt_3d_2]), then pt_3d_1 and pt_3d_2 define the axis of rotation."  We can define our axis wherever we want.

Just to be explicit ...  In the polynomial we are using, we first need to find the minimum, or the point where the horizontal plane is tangent to the paraboloid surface in the x-y plane (that is independent of x and y).  We find that by setting both the partial derivatives in x and y equal to zero, then solve for x and y. 

restart; gc():
with(plots): with(plottools):

P := 1 + x + x^2 - y + y^2 + x*y

The partial derivatives

a := diff(P, x);
                              a := 1 + 2 x + y
b := diff(P, y);
                              b := -1 + 2 y + x
solve( {a,b} , {x,y} )  # solving for x and y
                               {x = -1, y = 1}
subs({x = -1, y = 1}, P)  # find the value of z at the x and y point
                                       0

Hence our minimum point (or vertex of our paraboloid) is [-1,1,0] and we'll need that so we can define our axis of rotation.  From here it's just a slight modification of the last example in the plottools[rotate] help page.

PP:=plot3d(P,x=-5..5,y=-5..5,axes=box,shading=zhue) # create our plot data structure
r[0]:=PP:
a:=Pi/20: c:=1:   # the Pi/20 is for more steps in our rotation
while evalf(a-2*Pi)<0 do
  r[c]:=rotate(r[0], a, [ [-1,1,0] , [-1,1,1] ] ):  # defining our offset axis of rotation
  a:=a+Pi/20:
  c:=c+1:
end do:

display([seq(r[i],i=0..c-1)],insequence=true, orientation=[45,45],shading=zhue,axes=box):


And modifying Pagans example which is a much simpler way, just substitute in the axis of rotation we already found.

P := 1 + x + 1*x^2-1*y + 1*y^2 + 1*x*y:
Q:=plot3d(P, x = -5 .. 5, y = -5 .. 5):
T:=[seq(plottools:-rotate(Q , A, [ [ -1 ,1 , 0 ] , [ -1 , 1 , 1 ] ] ),A=0..evalf(2*Pi),evalf(Pi/20))]:

plots:-display(T,insequence=true,axes=box,labels=[x,y,z]);


 

The reason for the orientation to be of type [realcons,realcons] error is because it is expecting only 2 arguments.

Maple 13 will not accept an orientation=[theta,phi,psi] that extra angle option wasn't available until Maple 14.

You can try this as an alternate for Maple 13.

plots:-animate(plot3d, [P, x = -5..5, y = -5..5, orientation=[ A, -47]], A=-360..360, axes=box, frames=100);

?printlevel

Your printlevel is 1 change it to 2

printlevel:=2

I am going to say that fpghost is using {} brackets instead of [].   {} is a set where order is not specific.

ie plot({sin(x),cos(x)},color=[blue,red])

user might expect sin(x) to be blue, but in fact the {} set brackets have reshuffled the order and cos(x) is blue.  This is the problem why the user is getting confused.  I'm sure it's just a bracket issue.

Thanks, so this is how I ended up showing it.

It is essentially what you showed me, just a very slight variation.  The ``() helps quite a bit.  I wanted to use Maple and manipulate an answer Maple gave with minimal user modification afterwards to attain my output.   So after setting up the first step using delayed syntax, all that was needed were the simplify and expand commands to finish it off.



a := g^n/(g^n-1)

g^n/(g^n-1)

(1)

a1 := ``(numer(a)*``(1/g^n))/``(denom(a)*``(1/g^n))

``(g^n*``(1/g^n))/``((g^n-1)*``(1/g^n))

(2)

simplify(a1)

``(g^n*``(g^(-n)))/``(1-g^(-n))

(3)

expand(%)

g^n*``(g^(-n))/(1-g^(-n))

(4)

expand(%)

g^n*g^(-n)/(1-1/g^n)

(5)

expand(%)

1/(1-1/g^n)

(6)

``

``



Download numerdenom.mw

Thanks.  also found algsubs as another way

algsubs(1+i=g,h);

                      g2+g3*A+g4*B

I had actually wondered about something similar a while back. 

You can create a new style for the parts you want to hide and then just change the color to white when you want to hide those parts.  However, it is a bit clumpy and would be nice if a tickbox would do that for you.  I almost wonder if you could program a component toggle button to do that for you?  I don't know.

Also here's the other thread for more insight http://www.mapleprimes.com/questions/95745-How-Do-I-Hide-Text 

 

Really I think the trade offs are equal. 

On one hand you're deciding between 2 cores or 4 cores but also at the expense of processor speed 2.2Ghz. vs. 2.7Ghz, however the quad core is capable of setting up more threads, again it depends on the type of calculations and if they are seperable or not. 

The 2670QM has more cache available which would also decrease calculation times (cache memory is faster, hence the less time you spend reading and writing to main memory, the better)

The 2620M at 2.7Ghz will calculate quicker than the 2.2 Ghz 2670QM in consecutive calculations.  However on parallel calculations the 2670 is better and it's also newer.  It's a toss up really.

Personally I like a lot of screen real-estate, I would consider 15" and up.  I can't really offer any advice.

But read this thread as well http://www.mapleprimes.com/posts/35665-New-Laptop-Advice 

 

To fill the void of my own answer I deleted way back I will re-post my implicitplot method.  As pointed out, it is not the most effiecient way but merely one possible way of achieving background color.

with(plots):
a:=plot(x^3-4*x,numpoints=500,color=red): #color is explicitly shown, by default it is already red
b:=implicitplot(3,x=-5..5,y=-5..5,coloring=[black,black],filledregions=true): # 3 is just a dummy value for implicitplot command to be valid

display(a,b,view=[-5..5,-5..5],axis=[color=green])

 

You are correct, point size is not affected by symbolsize.  As it states in the Maple7 help.

Your alternative is to use symbol=circle or cross as you have already done.  The symbol=solidcircle would be the equivalent of increasing size of a symbol=point, however unfortunately the solidcircle option is not available in Maple7.  Besides even for Maple12  symbol=point symbolsize also has no effect, but the solidcircle would be the quick alternative.

It may be possible to create a custom symbol to bypass the lack of a solidcircle for Maple7, but I have not explored that option. 

That's an interesting question though.  Can we create custom symbols for pointplots?  I think most common user types are covered for newer versions of maple but I wonder how we could create a triangle or solid triangle to add into the symbol types? 

Maple 7?  It's good to hear people are still playing around on the older versions and also, I suppose, a bit surprising but not unexpected.

The method is similar and the still the same in the newer versions - just use display.

a:=plot(y(x),x=ug..og)
b:=pointplot([xs,ys])

plots[display]({a,b})

Do you mean something like using process[launch] to open a web browser?

for example opening internet explorer?
process[launch]("c:/Program Files/Internet Explorer/IEXPLORE.exe")

and then getting Maple to 'drive' the program from there?

First 24 25 26 27 28 29 30 Last Page 26 of 47