Function Repository Resource:

 MultiviewGraphics3D

Source Notebook

Show a 3D graphic from several standard views at a common scale, with linked pan and zoom

Contributed by: Maximilien Tirard

ResourceFunction["MultiviewGraphics3D"][g]

shows the 3D graphic g from above, the front and the right, plus a free view.

ResourceFunction["MultiviewGraphics3D"][g,layout]

arranges the views of g as given by layout.

Details and Options

All views show g at the same scale.
The input g can be a 3D graphic, a 3D region or a molecule, such as a Graphics3D object, Ball[], a MeshRegion, an Image3D object or a Molecule.
Possible values for layout are:
"QuadView"top, front and right views and a free view (default)
"ThreeView"top, front and right views
"Net"views along all six axis directions, arranged as an unfolded cube
"Isometric" or {"Isometric",Above}views from the four top corners of a cube around g
{"Isometric",Below}views from the four bottom corners of a cube around g
{"Isometric",All}views from all eight corners of a cube around g
{{s1,1, s1,2,…},…}a matrix of pane specifications si,j
Possible pane specifications are:
Above,Below,Front,Back,Left,Rightan orthographic view along a coordinate axis
{x,y,z}an orthographic view from direction {x,y,z}
"Free"a view set by the ViewPoint and ViewProjection options
Nonean empty cell
A layout can have at most one "Free" pane.
ResourceFunction["MultiviewGraphics3D"] has the same options as Graphics3D, with the following additions and changes:
"CameraInteraction""AxisLocked"how the panes respond to the mouse
"ProjectionConvention""ThirdAngle"arrangement of views in named layouts
"LightingAttachment"Automaticwhether lights are placed relative to each camera or to g
"ViewLabels"Automaticlabels above the views
LabelStyle{}style of the view labels
PreserveImageOptionsTruewhether to keep the explored view when the output is rebuilt
ViewPoint{1,-1,1}starting view point of the "Free" pane
ViewProjection"Orthographic"projection of the "Free" pane
ImageSizeAutomaticsize of the whole figure
Possible settings for "CameraInteraction" are:
"AxisLocked"panning or zooming one pane does so in all panes; only the "Free" pane rotates
"RigLocked"as "AxisLocked", and rotating any pane rotates all panes together
Nonea static Graphics object, suitable for Export
"ProjectionConvention" determines the arrangement of views in the "Net", "ThreeView" and "QuadView" layouts. Possible settings are:
"ThirdAngle"top view above the front view, right view to its right; used in North America
"FirstAngle"top view below the front view, left view to its right; used in most of Europe and Asia
"LightingAttachment" determines whether lights are placed relative to each camera or to g. Possible settings are:
"Camera"lights are placed relative to the camera of each pane
"Object"lights are placed relative to g, as they are in the view from ViewPoint
"Rig"lights are placed as with "Object", and rotate with the views in rig-locked output
Automatic"Rig" in rig-locked output, "Camera" otherwise
Lights given in scene coordinates, such as PointLight[col,{x,y,z}], are not affected by "LightingAttachment".
"ViewLabels" determines the labels above the views. Possible settings are:
Automaticdrafting names ("Top","Front","Right", etc.) for axis views, "Isometric" for corner views
Noneno labels
<|spec1 → lbl1, …|>label lbli for pane specification speci
flabel f[spec] for each pane specification spec
Other Graphics3D options given to ResourceFunction["MultiviewGraphics3D"] are passed to every pane.
Camera options, such as ViewVertical, ViewAngle and ViewCenter, and ImagePadding and ImageMargins are ignored, whether given to ResourceFunction["MultiviewGraphics3D"] or set in g. The ViewPoint, ViewProjection and ImageSize of g are also ignored.
PlotLabel and Background, and the wrappers Legended, Labeled, Framed and Style around g, apply once to the whole figure. When PlotLabel or Background is set both in g and in ResourceFunction["MultiviewGraphics3D"], the setting given to ResourceFunction["MultiviewGraphics3D"] is used.

Examples

Basic Examples (4) 

Show a 3D model from above, the front and the right, plus a free view:

In[1]:=
ResourceFunction["MultiviewGraphics3D"][
 ExampleData[{"Geometry3D", "SpaceShuttle"}]]
Out[1]=

Show only top, front and right views:

In[2]:=
ResourceFunction["MultiviewGraphics3D"][
 ExampleData[{"Geometry3D", "SedanCar"}], "ThreeView"]
Out[2]=

Show six views as an unfolded cube:

In[3]:=
ResourceFunction["MultiviewGraphics3D"][
 ExampleData[{"Geometry3D", "SedanCar"}], "Net"]
Out[3]=

Show a molecule:

In[4]:=
ResourceFunction["MultiviewGraphics3D"][
 Molecule["decalin"], "ThreeView"]
Out[4]=

Scope (8) 

Show isometric views from above:

In[5]:=
ResourceFunction["MultiviewGraphics3D"][
 ExampleData[{"Geometry3D", "Galleon"}], "Isometric"]
Out[5]=

Show isometric views from below:

In[6]:=
ResourceFunction["MultiviewGraphics3D"][
 ExampleData[{"Geometry3D", "Galleon"}], {"Isometric", Below}]
Out[6]=

Specify a custom layout as a matrix of named views, view directions and empty cells:

In[7]:=
ResourceFunction["MultiviewGraphics3D"][
 ExampleData[{"Geometry3D", "Cow"}], {{Front, {1, -2, 1}}, {Above, None}}]
Out[7]=

Show a region:

In[8]:=
ResourceFunction["MultiviewGraphics3D"][Tetrahedron[], "ThreeView"]
Out[8]=

Show a mesh region:

In[9]:=
ResourceFunction["MultiviewGraphics3D"][
 ExampleData[{"Geometry3D", "Horse"}, "MeshRegion"], "ThreeView"]
Out[9]=

Show a 3D image:

In[10]:=
ResourceFunction["MultiviewGraphics3D"][
 ImageResize[ExampleData[{"TestImage3D", "CTengine"}], 128], "ThreeView"]
Out[10]=

Show a 3D plot:

In[11]:=
ResourceFunction["MultiviewGraphics3D"][
 ContourPlot3D[
  x^3 + y^2 - z^2 == 0, {x, -2, 2}, {y, -2, 2}, {z, -2, 2}, Mesh -> None], "ThreeView"]
Out[11]=

Label the whole figure:

In[12]:=
ResourceFunction["MultiviewGraphics3D"][
 Labeled[ExampleData[{"Geometry3D", "Triceratops"}], "Triceratops"], "ThreeView"]
Out[12]=

Options (12) 

By default, the panes are linked for panning and zooming. Pan with Shift-drag, or zoom with Alt-drag (Cmd-drag on macOS), in any pane, and the other panes follow. Only the free pane rotates when you drag it:

In[13]:=
ResourceFunction["MultiviewGraphics3D"][
 ExampleData[{"Geometry3D", "SpaceShuttle"}]]
Out[13]=

With "RigLocked", dragging any pane rotates all panes together, so the views keep their relative directions:

In[14]:=
ResourceFunction["MultiviewGraphics3D"][
 ExampleData[{"Geometry3D", "SpaceShuttle"}], "CameraInteraction" -> "RigLocked"]
Out[14]=

Make a static figure:

In[15]:=
ResourceFunction["MultiviewGraphics3D"][
 ExampleData[{"Geometry3D", "SpaceShuttle"}], "CameraInteraction" -> None]
Out[15]=

Compare third-angle and first-angle projection:

In[16]:=
Table[Framed[
  ResourceFunction["MultiviewGraphics3D"][
   ExampleData[{"Geometry3D", "SedanCar"}], "ThreeView", "ProjectionConvention" -> c, PlotLabel -> c]], {c, {"ThirdAngle", "FirstAngle"}}]
Out[16]=

By default, each pane is lit from the viewer's side. Rotate the free pane, and the shading of each face changes with the rotation:

In[17]:=
ResourceFunction["MultiviewGraphics3D"][PolyhedronData["Dodecahedron"]]
Out[17]=

Fix the lights to the object, as they fall in the free view. Rotate the free pane, and each face keeps its shading:

In[18]:=
ResourceFunction["MultiviewGraphics3D"][PolyhedronData["Dodecahedron"], "LightingAttachment" -> "Object"]
Out[18]=

Specify custom labels:

In[19]:=
ResourceFunction["MultiviewGraphics3D"][
 ExampleData[{"Geometry3D", "SedanCar"}], "ThreeView", "ViewLabels" -> <|Above -> "Plan", Front -> "Elevation", Right -> "Side"|>]
Out[19]=

Label each view with its direction:

In[20]:=
ResourceFunction["MultiviewGraphics3D"][
 ExampleData[{"Geometry3D", "Cow"}], {{{1, -1, 1}, {-1, -1, 1}, {-1, 1, 1}, {1, 1, 1}}}, "ViewLabels" -> ToString]
Out[20]=

Omit labels:

In[21]:=
ResourceFunction["MultiviewGraphics3D"][
 ExampleData[{"Geometry3D", "SedanCar"}], "ThreeView", "ViewLabels" -> None]
Out[21]=

Style view labels:

In[22]:=
ResourceFunction["MultiviewGraphics3D"][Tetrahedron[], "ThreeView", LabelStyle -> Directive[Bold, 14, Gray]]
Out[22]=

Start the free pane low and looking along a wall:

In[23]:=
ResourceFunction["MultiviewGraphics3D"][
 ExampleData[{"Geometry3D", "CastleWall"}], ViewPoint -> {2.4, -1.2, 0.5}]
Out[23]=

Switch the free pane to a perspective projection, so the near tower looks larger than the far one:

In[24]:=
ResourceFunction["MultiviewGraphics3D"][
 ExampleData[{"Geometry3D", "CastleWall"}], ViewPoint -> {2.4, -1.2, 0.5}, ViewProjection -> "Perspective"]
Out[24]=

Other Graphics3D options apply to every pane:

In[25]:=
ResourceFunction["MultiviewGraphics3D"][Tetrahedron[], "ThreeView", Boxed -> False]
Out[25]=

Set the size of the whole figure:

In[26]:=
ResourceFunction["MultiviewGraphics3D"][Tetrahedron[], "Net", ImageSize -> 300]
Out[26]=

Applications (2) 

Model an angle bracket as a solid with holes:

Make a drawing with three views and a pictorial view:

In[27]:=
drawing = ResourceFunction["MultiviewGraphics3D"][bracket, "CameraInteraction" -> None]
Out[27]=

Export the drawing as a PDF:

In[28]:=
Export[FileNameJoin[{$TemporaryDirectory, "bracket.pdf"}], drawing]
Out[28]=

Explore a family of surfaces from several views:

In[29]:=
Manipulate[
 ResourceFunction["MultiviewGraphics3D"][
  Plot3D[Sin[a x] Cos[y], {x, -3, 3}, {y, -3, 3}, Mesh -> None]], {a, 0.5, 3}, SaveDefinitions -> True]
Out[29]=

Properties and Relations (2) 

Views made with Show are each scaled to fill their space:

In[30]:=
zeppelin = ExampleData[{"Geometry3D", "Zeppelin"}];
In[31]:=
GraphicsRow[{Show[zeppelin, ViewPoint -> Front], Show[zeppelin, ViewPoint -> Right]}]
Out[31]=

MultiviewGraphics3D shows all views at a common scale:

In[32]:=
ResourceFunction["MultiviewGraphics3D"][zeppelin, {{Front, Right}}]
Out[32]=

Possible Issues (2) 

Camera options set in the input are ignored:

In[33]:=
cow = ExampleData[{"Geometry3D", "Cow"}];
In[34]:=
ResourceFunction["MultiviewGraphics3D"][
 Show[cow, ViewPoint -> {-1, -1, 1}]]
Out[34]=

Set them in MultiviewGraphics3D instead:

In[35]:=
ResourceFunction["MultiviewGraphics3D"][cow, ViewPoint -> {-1, -1, 1}]
Out[35]=

Neat Examples (1) 

Make a solid whose top, front and right views are three different letters:

In[36]:=
letter[c_] := ImageData[
   Binarize[
    ImageResize[
     ImageCrop[
      ColorNegate[
       Rasterize[Style[c, 200, FontFamily -> "Arial Black"]]]], {20, 20}]]];
{front, right, top} = letter /@ {"G", "E", "B"};
ResourceFunction["MultiviewGraphics3D"][
 ArrayMesh[
  Table[front[[z, x]] right[[z, y]] top[[21 - y, x]], {x, 20}, {z, 20}, {y, 20}]], {{Front, Right}, {Above, "Free"}}]
Out[36]=

Publisher

Maximilien Tirard

Version History

  • 1.0.0 – 19 October 2026

Related Resources

Author Notes

The function has not been tested in the Wolfram Cloud.

Copy Graphic on interactive output copies the default view, not the view you have explored.

License Information