#5514: [with patch, needs work] implement exclusions for parametric 3d plots
-------------------------+--------------------------------------------------
 Reporter:  wcauchois    |       Owner:  wcauchois
     Type:  enhancement  |      Status:  new      
 Priority:  major        |   Milestone:  sage-4.0 
Component:  graphics     |    Keywords:           
-------------------------+--------------------------------------------------

Comment(by rbeezer):

 Great progress on this, Bill and Jason!  I had a go with a few of the
 commands in the doctests and a couple of my own.  Two thoughts.

 1.  The JMOL bounding box may be computed pre-clip?  Compare[[BR]]
 {{{plot3d(6-2*x^2-5*y^2, (x, -10, 10), (y, -10, 10),
 region_function=lambda x,y: 6-2*x^2-6*y^2>0)}}}[[BR]]
 with[[BR]]
 {{{plot3d(6-2*x^2-5*y^2, (x, -sqrt(3), sqrt(3)), (y, -1, 1),
 region_function=lambda x,y: 6-2*x^2-6*y^2>0)}}}

 The former would seem to use the unseen faces near inputs like (-10,10) to
 compute the vertical axis and the plot is then a really, really
 insignificant portion of the bounding box.

 2.  I thought maybe something like[[BR]]
 {{{plot3d(sqrt(6-2*x^2-5*y^2), (x, -sqrt(3), sqrt(3)), (y, -1, 1),
 region_function=lambda x,y: 6-2*x^2-6*y^2>0)}}}[[BR]]
 would now be possible, but it appears the clip comes after the
 evaluations, thus this raises an error for the negatives in the square
 root.  So maybe this should be handled with some sort of piecewise
 definition for the function and then the excess would be clipped by a
 {{{region_function}}} before showing it.

 OK, thinking while I write - here's a hack - insert an absolute value,
 then trim:[[BR]]
 {{{plot3d(sqrt(abs(6-2*x^2-5*y^2)), (x, -sqrt(3), sqrt(3)), (y, -1, 1),
 region_function=lambda x,y: 6-2*x^2-6*y^2>0)}}}

 Nicely done.  Holler if I can provide more testing as you finish this up.

 Rob

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5514#comment:12>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of 
Reinventing the Wheel

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to