Ticket #9484 (needs_work enhancement)

Opened 3 years ago

Last modified 3 years ago

add demos for implicit_plot3d that show how to do CSG (constructive solid geometry)

Reported by: cwitty Owned by: cwitty
Priority: minor Milestone: sage-5.11
Component: graphics Keywords:
Cc: Work issues: Very minor doc formatting
Report Upstream: N/A Reviewers: Karl-Dieter Crisman
Authors: Carl Witty Merged in:
Dependencies: Stopgaps:

Description

See  http://groups.google.com/group/sage-support/browse_thread/thread/e05229d90733c78d for an example of how to do CSG (intersections and unions of solid objects) with implicit_plot3d; I think the given example:

sage: var('x,y,z')
(x, y, z)
sage: implicit_plot3d(max_symbolic(min_symbolic(x*x+y*y-1, x*x+z*z-2), x-1.8, y-1.8, z-1.8, -x-1.8, -y-1.8, -z-1.8), (x, -2, 2), (y, -2, 2), (z, -2, 2), smooth=False)

(along with some explanation) should be added to the implicit_plot3d docstring.

Attachments

trac_9484-implicit-plot3d-csg-example.patch Download (1.5 KB) - added by cwitty 3 years ago.

Change History

Changed 3 years ago by cwitty

comment:1 Changed 3 years ago by cwitty

  • Status changed from new to needs_review
  • Milestone set to sage-4.5.1
  • Authors set to Carl Witty

I picked a slightly different example.

comment:2 Changed 3 years ago by kcrisman

Probably depends on #9482 and #9483.

comment:3 Changed 3 years ago by kcrisman

After #9483, I go from error message to no error message with this example as expected. Can't test the actual view for some reason :(

comment:4 Changed 3 years ago by cwitty

I apologize for not marking the dependency in my comment.

By the way, you could see a version of the plot by adding a viewer='tachyon' keyword argument to the implicit_plot3d call.

comment:5 Changed 3 years ago by kcrisman

  • Status changed from needs_review to needs_work
  • Reviewers set to Karl-Dieter Crisman
  • Work issues set to Very minor doc formatting

This looks fine, except probably one should put commands like implicit_plot3d in double ticks like ``implicit_plot3d``, or in that case you might even be able to use :meth: or something like that. Very interesting example!

Note: See TracTickets for help on using tickets.