Opened 12 years ago

Closed 12 years ago

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

Reported by: Owned by: was robertwb major sage-2.10.1 graphics

### 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.

### comment:1 Changed 12 years ago by robertwb

• Owner changed from was to robertwb
• Status changed from new to assigned

### comment:2 Changed 12 years ago by robertwb

• Summary changed from 3d and 2d graphics -- some unification to [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 12 years ago by was

• Summary changed from [with patch] 3d and 2d graphics -- some unification to [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 12 years ago by mabshoff

• Resolution set to fixed
• Status changed from assigned to closed

Merged in Sage 2.10.1.alpha0

Note: See TracTickets for help on using tickets.