[sage-support] Re: Drawing points on a sphere

2008-11-24 Thread William Stein
On Mon, Nov 24, 2008 at 9:00 PM, acardh <[EMAIL PROTECTED]> wrote: > > Hi > > When I call, > > world + sum([point3d(v, color='red') for v in city_coords]) + sum > ([point3d(v, size=2, color='green') for v in mydots]) > > from within a file it does not work. I do not get an error message, it > is j

[sage-support] Re: Drawing points on a sphere

2008-11-24 Thread acardh
Hi When I call, world + sum([point3d(v, color='red') for v in city_coords]) + sum ([point3d(v, size=2, color='green') for v in mydots]) from within a file it does not work. I do not get an error message, it is just that the Jmol 3D image viewer never appears. That line of code call Jmol only wh

[sage-support] Re: Drawing points on a sphere

2008-11-12 Thread acardh
I change the sequence of dots to size=2 and now the line looks better. world + sum([point3d(v, color='red') for v in city_coords]) + sum ([point3d(v, size=2, color='green') for v in mydots]) The parametric_plot3d command seems a better way to do this but I am not sure yet how to use it. I am wor

[sage-support] Re: Drawing points on a sphere

2008-11-11 Thread John H Palmieri
On Nov 11, 9:01 pm, Robert Bradshaw <[EMAIL PROTECTED]> wrote: > You can pass a "radius" or "size" parameter to the point command,   > which will make them smaller or larger. Also, you can look at the   > line3d command (pass it a list of points to get a curved line). Also the parametric_plot3d c

[sage-support] Re: Drawing points on a sphere

2008-11-11 Thread Robert Bradshaw
You can pass a "radius" or "size" parameter to the point command, which will make them smaller or larger. Also, you can look at the line3d command (pass it a list of points to get a curved line). On Nov 11, 2008, at 8:11 PM, acardh wrote: > I am drawing the line in this way: > > res=100 > th

[sage-support] Re: Drawing points on a sphere

2008-11-11 Thread acardh
I am drawing the line in this way: res=100 theta1=38.7598 phi1=-121.294 theta2=40.3503 phi2=-74.6594 myline=[] for i in range(1,100): myline[i] = ((i/res)*theta1 + ((res-i)/res)*theta2, (i/res) *phi1 + ((res-i)/res)*phi2) mydots = [(cos(t*theta)*cos(t*phi), sin(t*theta)*cos(t*phi), sin (t

[sage-support] Re: Drawing points on a sphere

2008-11-11 Thread Marshall Hampton
It might be a little easier to generate a straight-line list of points and then normalize them to length 1. -M. Hampton On Nov 10, 4:44 pm, Robert Bradshaw <[EMAIL PROTECTED]> wrote: > On Nov 10, 2008, at 12:57 PM, acardh wrote: > > > > > > > One more question about this. How can I draw a line b

[sage-support] Re: Drawing points on a sphere

2008-11-10 Thread Robert Bradshaw
On Nov 10, 2008, at 12:57 PM, acardh wrote: > > One more question about this. How can I draw a line between any two > given points? > > I am doing this > world = sphere((0,0,0), size=1, color='blue') > cities = [(38.7598, -121.294),(40.3503, -74.6594),(27.959, -82.4821)] > t = RDF(pi/180) > city_

[sage-support] Re: Drawing points on a sphere

2008-11-10 Thread acardh
One more question about this. How can I draw a line between any two given points? I am doing this world = sphere((0,0,0), size=1, color='blue') cities = [(38.7598, -121.294),(40.3503, -74.6594),(27.959, -82.4821)] t = RDF(pi/180) city_coords = [(cos(t*theta)*cos(t*phi), sin(t*theta)*cos(t*phi), s

[sage-support] Re: Drawing points on a sphere

2008-11-09 Thread acardh
Thanks Robert, it's exactly what I needed. It was so easy for you, I guess. :o) On Nov 9, 12:28 am, Robert Bradshaw <[EMAIL PROTECTED]> wrote: > On Nov 8, 2008, at 7:52 PM, acardh wrote: > > > Hi, > > Plotting an sphere is straightforward but I need help in how to draw > > points on the sphere.

[sage-support] Re: Drawing points on a sphere

2008-11-08 Thread Robert Bradshaw
On Nov 8, 2008, at 7:52 PM, acardh wrote: > Hi, > Plotting an sphere is straightforward but I need help in how to draw > points on the sphere. The sphere will represent the Earth and the > points will be some geo-coordinates . > > Thanks!!! This depends on how your points are given. I'm going to