Opened 15 years ago

Closed 15 years ago

#1859 closed enhancement (fixed)

[with patch; positive review] 3d and 2d graphics -- some unification

Reported by: William Stein Owned by: Robert Bradshaw
Priority: major Milestone: sage-2.10.1
Component: graphics Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

Make it so that the following sort of thing works:

sage: sphere() + plot(sin(x), (x,0,10))
sage: plot(sin(x), (x,0,10)).graphic3d()

and

sage: plot(sin(x), (x,0,10)).show(viewer='jmol')

In each case the plot would be rendered using 3d primitives instead of 2d primitives, when possible -- primitives that aren't implemented in 3d would degrade or be removed. Basically make a way of coercing 2d plots into the world of 3d plots.

This would make it possible to view whole arrays, groups, whatever of 2d plots all organized in some spatial way in 3d, and also to zoom in very close, etc., on 2d plots.

Attachments (1)

1859-2d-3d.diff (11.0 KB) - added by Robert Bradshaw 15 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 15 years ago by Robert Bradshaw

Owner: changed from William Stein to Robert Bradshaw
Status: newassigned

Changed 15 years ago by Robert Bradshaw

Attachment: 1859-2d-3d.diff added

comment:2 Changed 15 years ago by Robert Bradshaw

Summary: 3d and 2d graphics -- some unification[with patch] 3d and 2d graphics -- some unification

I've implemented turning most 2d primitives into 3d primitives, e.g.

sage: sphere(aspect_ratio=[1,1,1]) + plot(sin(x), 0, 10)
sage: sum([plot(z*sin(x), 0, 10).plot3d(z) for z in range(10)])

comment:3 Changed 15 years ago by William Stein

Summary: [with patch] 3d and 2d graphics -- some unification[with patch; positive review] 3d and 2d graphics -- some unification

AWESOME!!

Just playing around

sage: var('x y'); p1 = parametric_plot3d((x,y,0), (x,-2,2), (y,-2,2), color='red', opacity=0.5)
(x, y)
sage: p2 = plot(sin(x),(-2,2)).plot3d().translate(0,0,0.1)
sage: p1 + p2 + sphere((0,0,1),0.01) + polygon([(0,0), (0,1), (1,2), (2,0)]).plot3d().translate((0,0,-0.1)) + sphere((0,0,-1),0.1)

comment:4 Changed 15 years ago by Michael Abshoff

Resolution: fixed
Status: assignedclosed

Merged in Sage 2.10.1.alpha0

Note: See TracTickets for help on using tickets.