Ticket #4604 (closed defect: fixed)

Opened 4 years ago

Last modified 3 years ago

Graphics() should work in 3d as a valid empty object

Reported by: mhampton Owned by: was
Priority: minor Milestone: sage-4.3.1
Component: graphics Keywords: graphics, 3d
Cc: Work issues:
Report Upstream: N/A Reviewers: Tim Dumol
Authors: Bill Cauchois Merged in: sage-4.3.1.rc1
Dependencies: Stopgaps:

Description

From sage-support (and this has bugged me too):

I'm not sure if this is a bug or just something I'm misunderstanding, but for 2D graphics I can write code like this.

g = Graphics()
g += line( [ [-1,-1], [1,1] ] )
g.show()

But in 3D if I do either

g = Graphics()
g += sphere( (1,1,1), 2 )
g.show()

or

g = sage.plot.plot3d.base.Graphics3dGroup()
g += sphere( (1,1,1), 2 )
g.show()

I get the error:

ValueError: min() arg is an empty sequence

Is there something I'm missing on how to create a graphics object and add 3D graphics to it like the way it's done in 2D?

Attachments

trac_4604.patch Download (725 bytes) - added by wcauchois 3 years ago.
based on sage 4.3.1.alpha1

Change History

Changed 3 years ago by wcauchois

based on sage 4.3.1.alpha1

comment:1 Changed 3 years ago by wcauchois

  • Status changed from new to needs_review
  • Report Upstream set to N/A

Robert and I confirmed this bug has been fixed in Sage 4.3. The attached patch implements a doctest for Graphics that implements this.

comment:2 Changed 3 years ago by timdumol

  • Status changed from needs_review to positive_review

LGTM.

comment:3 Changed 3 years ago by rlm

  • Status changed from positive_review to closed
  • Reviewers set to Tim Dumol
  • Resolution set to fixed
  • Merged in set to sage-4.3.1.rc1
  • Authors set to Bill Cauchois
Note: See TracTickets for help on using tickets.