## 295 Reputation

16 years, 230 days

## No image produced...

I am interested in your procedure of plotting the Mobius strip. I copied your code in my computer, but no image was produced. ( I use Maple 8.)

with(plots):
ribbonVector := (phi) -> Vector([-sin(phi)*cos(phi),-sin(phi)*sin(phi),cos(phi)]):
p := (twist,theTitle,theOrientation) -> plot3d(
title=theTitle,orientation=theOrientation,grid=[100,10],scaling=constrained):
display(p(1/2,"Ribbon with 1/2 twist: The Mobius strip",[200,70]));

Plotting error, empty plot

## Image...

The correct image:

## Image with error...

Hope the administrator can delete the image with error (or this comment) for me. Thanks.

## A comparison...

I use the following simpler example to show the difference between the two definitions of M1, M2 and M3. It seems that my original definition produces expressions of Mi, while the definition using unapply produces operators of Mi.

with(linalg):
x:=(u,v)->cos(v)*u:
y:=(u,v)->sin(v)*u:
z:=(u,v)->u+v:
N:=crossprod([diff(x(u,v),u),diff(y(u,v),u),diff(z(u,v),u)],[diff(x(u,v),v),diff(y(u,v),v),diff(z(u,v),v)]):
M1:=(u,v)->N[1](u,v);
M2:=(u,v)->N[2](u,v);
M3:=(u,v)->N[3](u,v);
M11 := unapply(N[1],u,v);
M22:= unapply(N[2],u,v);
M33 := unapply(N[3],u,v);
-------------------------------------------------------------------

M1 := sin(v) - cos(v) u

M2 := -sin(v) u - cos(v)

2           2
M3 := cos(v)  u + sin(v)  u

M11 := (u, v) -> sin(v) - cos(v) u

M22 := (u, v) -> -sin(v) u - cos(v)

2           2
M33 := (u, v) -> cos(v)  u + sin(v)  u

>

## Good example...

Your example lets me better understand the meaning of unapply. Thank you.

## unapply: a hard term...

It seems that unapply is too hard for an ordinary Maple user like me. But I wiil learn to try it whenever necessary.

## Thanks...

Yes, the new definition of M1, M2 and M3 works perfectly well.
Thank you very much.
But I don't quite understand the meaning of unapply.

with(plots): with(linalg):
a:=2:b:=0.5:
x:=(u,v)->(a+u*cos(b*v))*cos(v):
y:=(u,v)->(a+u*cos(b*v))*sin(v):
z:=(u,v)->u*sin(b*v):
N:=crossprod([diff(x(u,v),u),diff(y(u,v),u),diff(z(u,v),u)],[diff(x(u,v),v),diff(y(u,v),v),diff(z(u,v),v)]):
surface:=plot3d([x(u,v),y(u,v),z(u,v)],u=-1..1,v=0..2*Pi):
curve:=spacecurve([x(0,v),y(0,v),z(0,v)],v=0..2*Pi,
thickness=2,color=red):
M1 := unapply(N[1],(u,v)):
M2 := unapply(N[2],(u,v)):
M3 := unapply(N[3],(u,v)):
K:=80:
for i from 1 to K do ti:=i*4*Pi/K:
normal_vector[i]:=spacecurve([x(0,ti)+s*M1(0,ti),y(0,ti)+s*M2(0,ti),z(0,ti)+s*M3(0,ti)],s=0..1,color=blue,thickness=4) od:
A:=display(seq(normal_vector[i],i=1..K),insequence=true):
display(A,surface,curve,scaling=constrained);

## gridrefine...

It seems that the option gridrefine is not available before Maple 11. With Maple 8, I can only increase the number of grid.

with(plots):
implicitplot(4*(x^2+y^2-2*x)^2+(x^2-y^2)*(x-1)*(2*x-3) = 0,
x=-1..2,y=-2..2, grid=[300,300] );

## Images...

Thanks for your reminder. I dont understand why the "block" happened. I can see the images well on my computer.
I have re-posted the images of this blog to MaplePrimes following your instruction. Hope they are OK now.
And i will post future images this way.

## good ideas...

Good ideas!
I will try to see if they work.
Thank you.

"The Maple Applications Center has some interesting articles and associated worksheets that go with them.  The following is directly related to the above thread and deals with a real world problem. "

## special case...

If the two surfaces of interest are expressed by explicit functions: z=f(x,y) and z=g(x,y), then we can use the following simpler procedure (following the idea of Robert Israel above) to plot the intesection curve.

with(plots):
f:=(x,y)->f(x,y):
g:=(x,y)->g(x,y):
XYplot:= implicitplot(f(x,y)=g(x,y), x=-2..2, y=-2..2):
display(plottools[transform](unapply([x,y,g(x,y)],(x,y)))
(XYplot));

Here is an example.
Plot the intersection curve of the surfaces z=4-x^2-2*y^2 and z=x^2+3*y^2:
with(plots):
f:=(x,y)->4-x^2-2*y^2:
g:=(x,y)->x^2+3*y^2:
XYplot:= implicitplot(f(x,y)=g(x,y), x=-2..2, y=-2..2):
display(plottools[transform](unapply([x,y,g(x,y)],(x,y)))
(XYplot),axes=box,thickness=3);

## Wonderful program!...

It is so wonderful.
Thank you very much, Robert Israel. It is very helpful.
I  am using Maple 8, so I am interested in the second program.
This problem troubles me for some time, and it is solved with your help.
One can get some real help in MaplePrimes.

By the way does this image appear properly (without error message)?

## Increase the numpoints...

Another way is to increase the number of points. Try this:

with(plots):
implicitplot(y = 1/18*(3*x+1)^2/x,  x = 1/4 .. 1/2,  y = 0..10, numpoints=20000);

## Image...

"Your images here all look like Chinese error messages"

Thanks for your kind reminder. Sorry  I didn't notice it. Yes my images are linked from a Chinese site. In my computer, I don't find any difference of your image and mine.
You mean that all the images I posted are unreadable?

I am now trying the way you suggested.

Tell me if these images/animations are OK now? Thank you.

 4 5 6 7 Page 6 of 7
﻿