On Fri, Jul 18, 2008 at 6:01 PM, Rose <[EMAIL PROTECTED]> wrote:
>
>
>
> On Jul 18, 12:37 am, "William Stein" <[EMAIL PROTECTED]> wrote:
>> On Fri, Jul 18, 2008 at 3:04 AM, David Joyner <[EMAIL PROTECTED]> wrote:
>>
>> > Could you be more specific? When I do something like
>>
>> > sage: u,v=var("u,v")
>> > sage: parametric_plot3d((cos(u), sin(u) + cos(v), sin(v)), (u, 0,
>> > 2*pi), (v, -pi, pi), color='green', opacity=0.1, plot_points=[30,30])
>>
>> > I think get the [x,y,z] limits on the framed axes, which seems to be
>> > what you are saying
>> > you want.
>
> I think what I want to do is not to bound but to clip the plot to a
> specific (3D) window, smaller than the entire plot.
>
>>
>> Yes, Rose, could you be more specific?  E.g., give a particular
>> example of code that draws a 3d plot,
>
> For exemple:
>
> t1, t2 = var('t1,t2')
> r=1/sqrt(2)
> w=r*cos(t2)
> fx=sqrt(1-r^2)*sin(t1)/(w+1)
> fy=sqrt(1-r^2)*cos(t1)/(w+1)
> fz=r*sin(t2)/(w+1)
> A=parametric_plot3d([fx,fy,fz], (t1,0,2*pi), (t2,0,2*pi),
> rgbcolor=(0,0,1), opacity=0.4)
>
> r, t2 = var('r,t2')
> t1=0
> w=sqrt(1-r^2)*cos(t2)
> fx=r*sin(t1)/(w+1)
> fy=r*cos(t1)/(w+1)
> fz=sqrt(1-r^2)*sin(t2)/(w+1)
> B=parametric_plot3d([fx,fy,fz], (r,0.001,1/sqrt(2)), (t2,0,2*pi),
> color=hue(0), opacity=0.8)
>
> (A+B).show()
>
>> and what you *wish*
>> it would draw instead.
>
> I would like to clip this in a box of side of length 4. I want the
> torus to be in the center of the image even if I lose a part of the
> other object.
>
> Rose

Amazingly, it looks like we never implemented this capability.
Moreover, I don't see an easy way to do it, though maybe carefully
reading the jmol scripting language docs (which sage uses):
               http://jmol.sourceforge.net/
would yield a command for clipping a scene.  If so, then I bet
we could very easily add this functionality to Sage.

Robert Bradshaw -- any thoughts?

 -- William

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

Reply via email to