Graphics3D

Graphics3D[primitives,options]

represents a three-dimensional graphical image.

Details and Options

Examples

open allclose all

Basic Examples  (3)

Use lines, polygons, cylinders, spheres, etc. to build up a 3D graphics scene:

Use plot functions to automatically create Graphics3D from different types of data:

Use built-in polyhedron data:

Scope  (14)

Primitives  (2)

Three-dimensional planar polygons can fold over themselves:

Vertices can be shared by using GraphicsComplex:

Directives  (5)

Directives can specify color, opacity, and specularity of faces:

Specify the specular exponent:

Colors, thickness, and dashing directives affect lines and edges:

Specify different properties for front and back of faces:

Graphics directives normally remain in effect only until the end of the list that contains them:

Coordinates  (2)

Use an ordinary coordinate system:

Specify coordinates by fractions of the plot range:

Lighting and Camera  (5)

Default lighting on a gray specular sphere:

Different light source for each sphere:

Specify the view point using special scaled coordinates:

Specify orthographic views:

Specify the view vectors using ordinary coordinates:

Options  (86)

AlignmentPoint  (1)

Specify the position to be aligned in 3D Inset, using coordinates:

AspectRatio  (1)

In 3D, the aspect ratio determines the ratio of the final displayed 2D image:

Axes  (2)

Draw all the axes:

Draw only the axis:

AxesEdge  (3)

Choose the bounding box edges automatically to draw the axes:

Draw the axis edge that is the intersection of the plane and the plane:

Draw the axis edge that is the intersection of the plane and plane:

Four different positions for the axis:

AxesLabel  (2)

Place a label for the axis in 3D:

Specify a label for each axis:

AxesStyle  (1)

Specify overall axes style, including the ticks and the tick labels:

Specify the style for each axis:

Background  (1)

Specify a background color:

BaselinePosition  (2)

Align the center of a graphic with the baseline of the text:

Specify the baseline of a graphic as a fraction of the height by using Scaled:

BaseStyle  (2)

Set the starting style:

Set multiple starting styles:

Boxed  (1)

Draw the edges of the bounding box:

Do not draw the edges of the bounding box:

BoxRatios  (2)

Specify the ratios between the bounding box edges:

Use the actual coordinate values for the ratios:

BoxStyle  (1)

Use dashed lines for the bounding box:

ClipPlanes  (1)

Specify a clipping plane:

ClipPlanesStyle  (1)

Visualize the styled clipping plane:

Epilog  (1)

Place text at the right bottom corner of the 3D graphic:

FaceGrids  (4)

Put grids on every face of a 3D graphic:

Put grids on both faces:

Put face grids on the plane:

On the plane, put grid lines on , , and :

FaceGridsStyle  (1)

Specify the overall style of face grids:

FormatType  (2)

By default, expressions are displayed using TraditionalForm in graphics:

Display expressions using StandardForm:

ImageMargins  (2)

Have 30-point margins on all sides:

Leave different margins on each side:

ImagePadding  (4)

Thick lines and labels outside of the bounding box can be clipped without ImagePadding:

Leave enough padding for labels:

Specify the same padding for all sides in printer's points:

Specify different padding on different sides:

ImageSize  (3)

Use predefined symbolic sizes in 3D:

Use an explicit image width:

Use an explicit image width and height:

LabelStyle  (1)

Specify overall style of all the label-like elements:

Lighting  (4)

Ambient light is uniformly applied to all the surfaces in the scene:

Directional lights with different colors:

Point lights with different colors:

Spotlights with different colors:

Method  (14)

"AxesDuringInteraction"  (1)

Set the dynamic display layout of axes during 3D rotation.

The default "AxesDuringInteraction"->"Lock" locks axes in place during 3D rotation:

"ContinuousUpdate" causes the axes to move to the best location during 3D rotation:

"Hide" hides the axes instead of moving them:

"ConePoints"  (1)

Use the "ConePoints" setting to render cones with fewer polygons:

"CylinderPoints"  (1)

Use the "CylinderPoints" setting to render cylinders with fewer polygons:

"EdgeDepthOffset"  (1)

"EdgeDepthOffset"->True ensures that edges placed near faces are not obscured:

"InvertSurfaceNormals"  (1)

Invert the direction of the surface normals of a BSplineSurface:

"OneLayer"  (1)

The rendering system uses layers to order and render polygons:

Specifying {"Color",1} renders the topmost layer as if nothing lay behind it:

Use other numbers to selectively display each layer:

Use {"Depth",layer} to display the depth map of a given layer:

"PerFragmentLighting"  (1)

The macOS Metal engine uses "PerFragmentLighting" by default, except during rotation:

Set "PerFragmentLighting"False:

"PerFragmentLighting"True interpolates normals at every pixel over the entire face:

"PerFragmentLighting" appears smooth even when there are few surface subdivisions:

"RelieveDPZFighting"  (1)

By default, z-fighting of coplanar polygons is typically resolved by the rendering system:

"RelieveDPZFighting"->False improves rendering performance at the cost of exposing z-fighting:

"RotationControl"  (1)

Set different rotation controllers for 3D graphics:

"RotationMode"  (1)

Normally, a 3D graphic in rotation changes its apparent size to accommodate its ImageSize:

"SphericalRegion" resizes the graphic to accommodate all orientations during rotation:

"ShrinkWrap"  (1)

By default, empty space may appear around a graphical image:

Use "ShrinkWrap" to prevent the inclusion of empty space:

"SpherePoints"  (1)

Use the "SpherePoints" setting to render spheres with fewer polygons:

"SplinePoints"  (1)

Subdivide each patch between knots using the default of {7,7} sample points:

Reduce the number of samples per patch to {1,1}:

"TubePoints"  (1)

Use the "TubePoints" setting to render tubes with fewer polygons:

PlotLabel  (2)

Display a label on the top of the graphic in TraditionalForm:

Use Style and other typesetting functions to modify how the label appears:

PlotRange  (3)

Display all objects:

Explicitly choose a range:

PlotRange->s is equivalent to PlotRange->{{-s,s},{-s,s},{-s,s}}:

PlotRangePadding  (3)

Include coordinate unit of padding on all sides:

Include of the image size as padding on all sides:

Specify different padding on each side:

PlotRegion  (3)

The contents of a graphic use the whole region:

Limit the contents of the graphic to the middle half of the region in each direction:

ImagePadding can also be used to add padding around a graphic:

Prolog  (1)

Draw a circumscribing disk that just touches a corner of the bounding box:

SphericalRegion  (1)

Make a sequence of images be consistently sized, independent of orientation:

Without SphericalRegion, each image is made as big as possible:

Ticks  (2)

Place tick marks automatically:

Draw tick marks at the specified positions:

TicksStyle  (2)

Specify the styles of the ticks and tick labels:

Specify the styles of the , , and axis ticks separately:

ViewAngle  (1)

Use a specific angle for a simulated camera:

ViewCenter  (2)

Place the top-right corner of the object at the center of the final image:

Use the ViewCenter->{vc,vp} to specify that 3D point vc gets mapped to the 2D point vp:

ViewMatrix  (1)

Orthographic view of a sphere from the negative direction:

ViewPoint  (3)

Specify the view point using the special scaled coordinates:

Use symbolic view points:

Specify orthographic views:

ViewRange  (2)

By default, the range is sufficient to include all the objects:

Specify the minimum and maximum distances from the camera to be included:

ViewVector  (1)

Specify the view vectors using ordinary coordinates:

ViewVertical  (2)

Use the axis direction as the vertical direction in the final image:

Various views of vertical directions:

Properties & Relations  (5)

The StandardForm of Graphics3D is its rendered form:

The InputForm is the textual expression form:

Graphics3D can be used as input to functions:

Three-dimensional plot functions return Graphics3D:

Several integrated data sources return Graphics3D:

Many Import and Export formats support Graphics3D:

Neat Examples  (1)

The RGB color cube:

Wolfram Research (1988), Graphics3D, Wolfram Language function, https://reference.wolfram.com/language/ref/Graphics3D.html (updated 2024).

Text

Wolfram Research (1988), Graphics3D, Wolfram Language function, https://reference.wolfram.com/language/ref/Graphics3D.html (updated 2024).

CMS

Wolfram Language. 1988. "Graphics3D." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2024. https://reference.wolfram.com/language/ref/Graphics3D.html.

APA

Wolfram Language. (1988). Graphics3D. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Graphics3D.html

BibTeX

@misc{reference.wolfram_2024_graphics3d, author="Wolfram Research", title="{Graphics3D}", year="2024", howpublished="\url{https://reference.wolfram.com/language/ref/Graphics3D.html}", note=[Accessed: 18-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_graphics3d, organization={Wolfram Research}, title={Graphics3D}, year={2024}, url={https://reference.wolfram.com/language/ref/Graphics3D.html}, note=[Accessed: 18-December-2024 ]}