Re: 回复: [sage-support] Re: 3D plot in sage

2010-03-17 Thread wxuyec
Thank you! - 原文 - 发件人: Jaap Spies 主 题: Re: 回复: [sage-support] Re: 3D 
plot in sage时 间: 2010年3月16日  05:43:18wxu...@sohu.com wrote:gt; Thank you very 
much!gt;gt; I will try this.gt;You could try the experimental version found 
here:http://sage.math.washington.edu/home/jsp/SPKGS/ETS/Jaap-- To post to this 
group, send email to sage-supp...@googlegroups.comto unsubscribe from this 
group, send email to sage-support+unsubscr...@googlegroups.comfor more options, 
visit this group at http://groups.google.com/group/sage-supportURL: 
http://www.sagemath.org

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Re: 回复: [sage-support] Re: 3D plot in sage

2010-03-16 Thread wxuyec
Hi Jason and everyone,Thank you very much for your reply.Now I have a function 
or a set of data depending all the three coordinates x, y, z.In other words, 
there is a corresponding value at every point in 3 dimensional space, which 
maybevaries from -1 to 1. I want use color to represent the values in every 
point in 3D space.For example in a room there is a temperature value at every 
point in 3D space of the room, I want describe the temperature value by color 
for every point in the room.I really haven't find a proper example figure from 
internet.thanks,YC - 原文 - 发件人: Jason Grout 主 题: Re: 回复: [sage-support] 
Re: 3D plot in sage时 间: 2010年3月16日  05:19:05On 03/12/2010 05:43 AM, 
wxu...@sohu.com wrote:gt; Actually I do need them to be plotted by color.gt; 
it seems that sage is not designed for this way.gt; could anyone give some 
information aboutgt; what open source software can do this?gt; I really don't 
understand what sort of plot you want.  Can you post somepictures giving 
examples of what sort of plot you want, or be extremelyprecise in describing 
*exactly* how you want to visually represent thisfunction?  There are lots of 
ways to represent a 4d function like this.Thanks,Jason-- Jason Grout-- To post 
to this group, send email to sage-supp...@googlegroups.comto unsubscribe from 
this group, send email to sage-support+unsubscr...@googlegroups.comfor more 
options, visit this group at http://groups.google.com/group/sage-supportURL: 
http://www.sagemath.org

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


Re: 回复: [sage-support] Re: 3D plot in sage

2010-03-16 Thread wxuyec
Thank you very much! I will try this.regards,YC - 原文 - 发件人: Jason Grout 
主 题: Re: 回复: [sage-support] Re: 3D plot in sage时 间: 2010年3月16日  03:36:36On 
03/16/2010 02:24 AM, wxu...@sohu.com wrote:gt; Hi Jason and everyone,gt; gt; 
Thank you very much for your reply.gt; gt; Now I have a function or a set of 
data depending all the three gt; coordinates x, y, z.gt; In other words, 
there is a corresponding value at every point in 3 gt; dimensional space, 
which maybegt; varies from -1 to 1. I want use color to represent the values 
in every gt; point in 3D space.gt; gt; For example in a room there is a 
temperature value at every point in 3D gt; space of the room, Igt; want 
describe the temperature value by color for every point in the room.gt; gt; I 
really haven't find a proper example figure from internet.Mayavi2 might be the 
best tool for this job.  
Seehttp://code.enthought.com/projects/mayavi/docs/development/html/mayavi/mlab.html#visualizing-volumetric-scalar-datafor
 some examples.Thanks,Jason-- Jason Grout-- To post to this group, send email 
to sage-supp...@googlegroups.comto unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.comfor more options, visit this group at 
http://groups.google.com/group/sage-supportURL: http://www.sagemath.org

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


[sage-support] help with chanin dirivatives

2010-03-15 Thread wxuyec
Hi everyone,I have a function f=f(eta, bx, bt), in which diff(eta,x)=k(bx,bt) 
and diff(eta,t)=-omega(bx,bt) withbx=delta*x and bt=delta^2*t. I want to 
calculate the second order derivative diff(diff(f,x)). Theresult should be 
k^2*D[0,0](f)+2*delta*k*D[0,1](f)+delta*D[0](k)*D[0](f)+delta^2*D[1,1](f).but 
when I did as 
follows:var('x,t,bx,bt,delta')bx=function('bx',x)bx=delta*xbt=function('bt',t)bt=delta^2*tk=function('k',bx,bt)omega=function('omega',bx,bt)eta=function('eta',x,t)f=function('f',eta,bx,bt)it
 does not work. could anyone help me with that?Tanks in advanced!regards,YC

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


Re: 回复: [sage-support] Re: 3D plot in sage

2010-03-12 Thread wxuyec
Actually I do need them to be plotted by color.it seems that sage is not 
designed for this way.could anyone give some information aboutwhat open source 
software can do this?Thanks a lot!YC - 原文 - 发件人: Jason Grout 主 题: Re: 
回复: [sage-support] Re: 3D plot in sage时 间: 2010年3月12日  01:26:30On 03/12/2010 
03:51 AM, Marshall Hampton wrote:gt; One option is several implicit plots, 
colored by value, i.e. somethinggt; like:gt; gt; var('x,y,z')gt; 
f=cos(x)*cos(y)+cos(y)*cos(z)+cos(z)*cos(x)gt; gt; imps = []gt; plot_range = 
srange(0,3,.75)gt; color_range = [i/N(len(plot_range)) for i in 
range(len(plot_range))]gt; gt; for i,q in enumerate(plot_range):gt;  red 
= color_range[i]gt;  imps.append(implicit_plot3d(f-q==0, (x, -2, 2), (y, 
-2, 2), (z,gt; -2, 2), opacity = .5, rgbcolor = (red,0,1-red)))gt; gt; 
show(sum(imps))gt; If you didn't need them to be plotted by color, then you 
could use thecontour option, like in the doc examples:sage: 
implicit_plot3d((x^2 + y^2 + z^2), (x, -2, 2), (y, -2, 2), (z, -2,2), 
plot_points=60, contour=[1,3,5])Jason-- To post to this group, send email to 
sage-supp...@googlegroups.comto unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.comfor more options, visit this group at 
http://groups.google.com/group/sage-supportURL: http://www.sagemath.org

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


回复: [sage-support] Re: 3D plot in sage

2010-03-11 Thread wxuyec
I don't want to plot f(x,y,z)=0.Yes, it should a 4d plot as you said.can that 
be done in sage?Thanks!YC - 原文 - 发件人: John H Palmieri 主 题: 
[sage-support] Re: 3D plot in sage时 间: 2010年3月10日  07:04:29On Mar 10, 
9:39nbsp;am, wxu...@sohu.com wrote:gt; Hi everyone,I want do this thing as 
follows in sage, is that 
OK?var('x,y,z')f=cos(x)*cos(y)+cos(y)*cos(z)+cos(z)*cos(x)and then I want to 
plot f. how can do it in sage?Thanks in advance!regards,YCIsn't this a 4d plot? 
 Or do you want to plot f(x,y,z)=0?   In thatcase, you could dosage: 
implicit_plot3d(f == 0, (x, -2, 2), (y, -2, 2), (z, -2, 2))--John-- To post to 
this group, send email to sage-supp...@googlegroups.comto unsubscribe from this 
group, send email to sage-support+unsubscr...@googlegroups.comfor more options, 
visit this group at http://groups.google.com/group/sage-supportURL: 
http://www.sagemath.org

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


[sage-support] 3D plot in sage

2010-03-10 Thread wxuyec
Hi everyone,I want do this thing as follows in sage, is that 
OK?var('x,y,z')f=cos(x)*cos(y)+cos(y)*cos(z)+cos(z)*cos(x)and then I want to 
plot f. how can do it in sage?Thanks in advance!regards,YC

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


[sage-support] for help with partial differencial equations

2010-03-03 Thread wxuyec
Hi everyone,I want to use sage to solve the partial differentialnbsp; 
equations analytically.can anyone help to point out where I can find the 
documents about that?Thank you very much!YC

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


[sage-support] about diff

2010-02-22 Thread wxuyec
Hi everyone,

I have a question for help. I define
phi1=function('phi1',x,y,t)
phi2=function('phi2',x,y,t)
phi3=function('phi3',x,y,t)
psi=function('psi',x,y,t)
x0=function('x0',x,y,t)
y0=function('y0',x,y,t)
theta=function('theta',x,y,t)
phi1=cos(theta)*(x-x0)+sin(theta)*(y-y0)
phi2=((-cos(theta)+sqrt(3)*sin(theta))*(x-x0)+(-sqrt(3)*cos(theta)-sin(theta))*(y-y0))/2
phi3=((-cos(theta)-sqrt(3)*sin(theta))*(x-x0)+(sqrt(3)*cos(theta)-sin(theta))*(y-y0))/2
then I define a set equations of:
eq1=diff(phi1,t)==diff(psi,x)*diff(phi1,x)+diff(psi,y)+diff(phi1,y)...
which are too long, I don't list them here.
then I use
eq1.subsitute.expression(diff(theta,t)==tt,diff(x0,t)==xt,diff(y0,t)==yt)
solve([eq1,eq2,eq3],tt,xt,yt)
to get the equations of tt, xt and yt.
the results are
[tt=r1, xt=(D[0](theta)(t, x, y)^2)]
my question is, here the D[0](theta)(t,x,y)^2 is the derivative to
t or to x? I guess it is still the derivative to x, because 
diff(theta(t,x,y),x) still got D[0](theta)(x,y,t),
but I am not sure. So can anyone help me with that?
thanks in advance!

YC 

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org


[sage-support] help about the function diff()

2009-11-04 Thread wxuyec

Hi, all


I just saw that if I defined a function: f=f(e^t),

the f.diff(f,t) will give e^t*D[0](f)(e^t). and the

question is what is the meaning of D[0](f)(e^t)?

I can find that in the help of diff().

thanks in advance.



--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] why this is wrong

2009-10-31 Thread wxuyec

Hi, all


I typed the followings,

var('f,A,p,m')

f=A*p*(1+p)^m/[(1+p)^m-1]


but it produced a error as follows,

TypeError: unsupported operand parent(s) for '/': 'Symbolic Ring' and
'type 'list''


I am not clear about that. what is wrong?

Thanks in advance!


--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: why this is wrong

2009-10-31 Thread wxuyec

I am so sorry. I just typed the bracket wrong.

how can I delete the email?


wxu...@sohu.com 写道:

 Hi, all


 I typed the followings,

 var('f,A,p,m')

 f=A*p*(1+p)^m/[(1+p)^m-1]


 but it produced a error as follows,

 TypeError: unsupported operand parent(s) for '/': 'Symbolic Ring' and
 'type 'list''


 I am not clear about that. what is wrong?

 Thanks in advance!


 

   


--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] How to change the config of sage

2009-10-23 Thread wxuyec

Hi all,


when I use sage.4.0.2 to plot a picture, it use the eog

to show it in default. But the eog can't save a gif file.

so I want to know how to change the default config of

sage to show something like a picture or a dvi file, etc.


Thanks in advance!


--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] [sage-support]how to collect the same items

2009-10-12 Thread wxuyec

Hi, I have another question.

I have got the expression,

a^2*x^4+b*x^4+c*x+d*y*x^4...(many items)

I want to get the coefficient of all the x,x^2,x^3,x^4

here for x^4 is (a^2+b+d*y...)

how can I get it?

Thanks in advance!


YC Xu


--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: [sage-support]how to simply the equation

2009-10-12 Thread wxuyec

Thank you very much.



Mike Hansen 写道:

 Hello,

 2009/10/12  wxu...@sohu.com:
   
 Hi, everyone, I got the expression,

 sin(t)^8 + 4*sin(t)^6*cos(t)^2 + 6*sin(t)^4*cos(t)^4 +
 4*sin(t)^2*cos(t)^6 + cos(t)^8
 actually it is 1. how can I get it?
 

 Here you go:

 sage: t = var('t')
 sage: a = sin(t)^8 + 4*sin(t)^6*cos(t)^2 + 6*sin(t)^4*cos(t)^4 +
 4*sin(t)^2*cos(t)^6 + cos(t)^8
 sage: a.trig_simplify()
 1

 --Mike

 

   


--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: [sage-support]how to collect the same items

2009-10-12 Thread wxuyec

The same expression, How can I want to get

the coefficient of x^4*y?


Thank you!


Mike Hansen 写道:

 Hello,

 2009/10/12  wxu...@sohu.com:
   
 Hi, I have another question.

 I have got the expression,

 a^2*x^4+b*x^4+c*x+d*y*x^4...(many items)

 I want to get the coefficient of all the x,x^2,x^3,x^4

 here for x^4 is (a^2+b+d*y...)

 how can I get it?
 

 Something like this:

 sage: var('a,b,c,d,x,y')
 (a, b, c, d, x, y)
 sage: ex = a^2*x^4+b*x^4+c*x+d*y*x^4
 sage: ex.coefficient(x^4)
 a^2 + d*y + b

 --Mike

 

   


--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] a question about the plotting in sage

2009-07-03 Thread wxuyec

I have some data from finite element calculating. I record
the value of a variable at every node of each element.
and I had plotted in matlab using the fellowing sentences:
fill(X,Y,Stress_z);
here the X and Y are the arrays of the x and y coordinates.
and the Stress_z is the value of the variable at nodes.

I want to know whether there is a function or how to do
the same thing in Sage?

Thanks a lot!

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: a question about the plotting in sage

2009-07-03 Thread wxuyec

As you said, I read the help about the list_plot3d.
It seems to be but not exactly what I want.
I want the value of the variable to be draw by
different colors, which the list_plot3d can't do.

So can you give another favor? Thanks!



On 7月3日, 下午6时26分, David Joyner wdjoy...@gmail.com wrote:
 Maybe list_plot3d is what you want? Type list_plot3d? (without the
 quotes) at the prompt to see examples.

 On Fri, Jul 3, 2009 at 6:03 AM, wxuyecwxu...@sohu.com wrote:

  I have some data from finite element calculating. I record
  the value of a variable at every node of each element.
  and I had plotted in matlab using the fellowing sentences:
  fill(X,Y,Stress_z);
  here the X and Y are the arrays of the x and y coordinates.
  and the Stress_z is the value of the variable at nodes.

  I want to know whether there is a function or how to do
  the same thing in Sage?

  Thanks a lot!
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---