Graphics3D[primitives,options]
3Dのグラフィックス画像を表す.
Graphics3D
Graphics3D[primitives,options]
3Dのグラフィックス画像を表す.
詳細とオプション
- Graphics3DはStandardFormではグラフィックス画像として描画される.InputFormでは明示的なプリミティブのリストとして表示される.
- 以下のグラフィックスプリミティブを使用することができる.
-
Arrow[{pt1,pt2}] 矢印 Ball[{x,y,z},…] 充填されたボール BezierCurve[{pt1,pt2,…}] ベジエ(Bézier)曲線 BSplineCurve[{pt1,pt2,…}] Bスプライン曲線 BSplineSurface[array] Bスプライン曲面 Circumsphere[{pt1,…}] 4点で指定された球 Cone[{{x1,y1,z1},{x2,y2,z2}},r] 充填された円錐 ConicHullRegion[…] 充填された線形円錐 Cube[{x,y,z},…] 充填された立方体 Cuboid[{xmin,ymin,zmin},…] 充填された直方体 Cylinder[{{x1,x2,x3},…},…] 充填された円柱 Dodecahedron[{x,y,z},…] 充填された12面体 GraphicsComplex[pts,prims] グラフィックスオブジェクトの複合体 GraphicsGroup[{g1,g2,…}] グループとして扱われるオブジェクト HalfLine[{pt1,pt2}] 半無限線,あるいは光線 HalfPlane[{pt1,pt2},v] 半無限な平面 Hexahedron[{pt1,…}] 充填された六面体 Icosahedron[{x,y,z},…] 充填された20面体 InfiniteLine[{pt1,pt2}] 有限な線 InfinitePlane[{pt1,pt2,pt2}] 有限な平面 Inset[obj,…] 取込みオブジェクト JoinedCurve[{seg1,seg2,…}] 接続された曲線分 Line[{{x1,y1,z1},…}] 線 Octahedron[{x,y,z},…] 充填された八面体 Parallelepiped[pt,{v1,…}] 平行六面体 Point[{x,y,z}] 点 Polygon[{{x1,y1,z1},…}] 多角形 Polyhedron[{pt1,…}] 多面体 Prism[{pt1,…}] 角柱 Pyramid[{pt1,…}] 角錐 Raster3D[array] 灰色またはカラーのセルの立方体配列 Simplex[{pt1,…}] 単体 Sphere[{x,y,z},…] 球 Tetrahedron[{pt1,…}] 充填された四面体 Text[expr,{x,y,z}] テキスト Triangle[{pt1,…}] 三角形 Tube[{{x1,y1,z1},{x2,y2,z2},…}] 管 - 使用可能なグラフィックス指示子
-
AbsoluteDashing[{w1,…}] 絶対的な破線の指定 AbsolutePointSize[d] 絶対的な点の大きさの指定 AbsoluteThickness[w] 絶対的な線の太さの指定 Arrowheads[spec] 鏃指定 CMYKColor[c,m,y,k] 色指定 CapForm[type] 管と線のキャップ指定 Dashing[{w1,…}] 破線の指定 Directive[g1,g2,…] 複合グラフィックス指示子 EdgeForm[spec] 多角形の辺の指定 FaceForm[spec] 多角形の面の指定 Glow[c] 色の放光指定 GrayLevel[i] グレーレベルの指定 Hue[h] 色相の指定 JoinForm[type] 管と線の接続指定 Opacity[a] 不透明度指定 PointSize[d] 点の大きさの指定 RGBColor[r,g,b] 色指定 Specularity[s] 表面の鏡面性の指定 Texture[obj] テクスチャ指定 Thickness[w] 線の太さの指定 - 任意のレベルで使えるラッパー
-
Annotation[obj,label] 注釈を与える Button[obj,action] obj がボタンとして動くようにする Dynamic[obj] 動的にアップデートされた現在値を使用 EventHandler[obj,…] イベントハンドラを付加 Hyperlink[obj,URI] obj をハイパーリンクにする Mouseover[obj,over] マウスオーバーの形式を指定 PopupWindow[obj,cont] ポップアップウィンドウを付加 StatusArea[obj,label] ステータスエリアにラベルが現れるように指定 Style[obj,opts] スタイルを指定 Tooltip[obj,label] ツールチップを付加 - 指定可能なオプション
-
AlignmentPoint Center 整列の基準となるグラフィックス内のデフォルトの点 AspectRatio Automatic 縦横比 Axes False 座標軸を描くか描かないか AxesEdge Automatic 座標軸をいずれの辺に置くか AxesLabel None 座標軸のラベル AxesOrigin Automatic 座標軸がどこで交差するか AxesStyle {} 座標軸のスタイルを指定するグラフィックス指示子 Background None プロットの背景色 BaselinePosition Automatic 周囲のテキストのベースラインとの揃え方 BaseStyle {} グラフィックスのベーススタイル指定 Boxed True 境界ボックスを描くか描かないか BoxRatios Automatic 三次元の境界ボックスの比 BoxStyle {} ボックスのスタイル指定 ClipPlanes None 切取り平面 ClipPlanesStyle Automatic 切取り平面のスタイル指定 ContentSelectable Automatic コンテンツの選択を許容するかどうか ControllerLinking False いつ外部回転コントローラに接続するか ControllerPath Automatic どの外部コントローラを使ってみるか Epilog {} 主となるプロットの後に描く2Dグラフィックスプリミティブ FaceGrids None 境界ボックスの格子線 FaceGridsStyle {} 表面格子のスタイル指定 FormatType TraditionalForm テキストのデフォルトの書式 ImageMargins 0. グラフィックスの周囲の余白 ImagePadding All ラベル等にどの程度余分な充填を許すか ImageSize Automatic 描画するグラフィックスの絶対的サイズ LabelStyle {} ラベルのスタイル指定 Lighting Automatic 使用する擬似照明の光源 Method Automatic 使用する3Dグラフィックスメソッドの詳細 PlotLabel None プロット用ラベル PlotRange All 含める値の範囲 PlotRangePadding Automatic 値の範囲をどの程度充填するか PlotRegion Automatic 塗り潰す最終的な表示領域 PreserveImageOptions Automatic 同じ画像を新たに描画する際に画像のもとのオプションを保存するかどうか Prolog {} 主なプロットに先駆けて描かれる2Dグラフィックスプリミティブ RotationAction "Fit" インタラクティブな回転の後でどのように描画するか SphericalRegion Automatic 最終的な表示領域に外接球をフィットさせるかどうか Ticks Automatic 目盛の指定 TicksStyle {} 目盛マークのスタイル指定 TouchscreenAutoZoom False タッチスクリーン上でアクティベートされた場合にフルスクリーンにズームするかどうか ViewAngle Automatic 表示フィールドの角度 ViewCenter Automatic 表示領域の中心に置く点 ViewMatrix Automatic 明示的な変換行列 ViewPoint {1.3,-2.4,2.} 視点 ViewProjection Automatic ビューアから遠いオブジェクトを描画するための投影方法 ViewRange All 含むべき視距離の範囲 ViewVector Automatic 擬似カメラの位置と方向 ViewVertical {0,0,1} 垂直にする方向 - グラフィックスコンストラクトのネストしたリストを与えることができる.GrayLevelのような指示子指定は,これらを含むリストが終るまでだけ効果を保つ.
- Style[obj,opts]を使って,オプションあるいは指示子 opts を obj に適用することができる.
- ノートブックフロントエンドでは,ViewPoint,ViewVertical,ViewCenter,ViewAngleは直接インタラクティブな操作で変更できる.
- マウスをドラッグして3Dグラフィックスを回転させることができる.
- RGBColorのような指示子で後続するオブジェクトの表面色を指定する.最終的な色はGlowやSpecularityの要素も含め,擬似照明によって決まる.
- デフォルトで,境界ボックスの外の特別の固定された位置に設置された4色の異なる光源が使われる.
- デフォルトで,ViewAngleは可能であれば2Dの表示領域を埋めるように,3Dオブジェクト全体を投影する.
- BaseStyleの設定値は一般に現行スタイルシートの"Graphics3D"スタイルで与えられるデフォルトスタイルに加えられる.BoxStyle,LabelStyle等の設定値は"Graphics3DBox","Graphics3DLabel"等のデフォルトスタイルに加えられる.
- Methodオプションを通して与えられる設定値には"SpherePoints","CylinderPoints","RotationControl","ShrinkWrap"がある. »
- Methodには次のオプションを渡すことができる.
-
"AxesDuringInteraction" "Lock" 回転する際の軸のレイアウト/表示 "ConePoints" {40,3} Coneのモデル化モデル化に使う下位区分の数 "CylinderPoints" {40,3} Cylinderモデル化に使う下位区分の数 "EdgeDepthOffset" True 同じくらいの深さの面の上に辺を描く "InvertSurfaceNormals" False BSplineSurfaceの法線を反転させる "PerFragmentLighting" True VertexNormals間を補間する面の陰影 "RelieveDPZFighting" False Zファイティング効果を減らす "RotationControl" "ArcBall" 回転コントローラを設定する "RotationMode" "ClippedRegion" 回転モードを指定する "ShrinkWrap" False 描画されたコンテンツの周りの空白を切り取る "SpherePoints" {40,30} Sphereのモデル化に使う下位区分の数 "SplinePoints" {7,7} BSplineSurfaceのモデル化に使う下位区分の数 "TubePoints" Automatic Tubeのモデル化に使う下位区分の数 - Graphics3D[]は空の3Dグラフィックスを返す.
例題
すべて開く すべて閉じる例 (3)
線,多角形,円柱,球等を使って3Dのグラフィックスシーンを構築する:
Graphics3D[{Blue, Cylinder[], Red, Sphere[{0, 0, 2}], StandardGray, Thick, Dashed, Line[{{-2, 0, 2}, {2, 0, 2}, {0, 0, 4}, {-2, 0, 2}}], Yellow, Polygon[{{-3, -3, -2}, {-3, 3, -2}, {3, 3, -2}, {3, -3, -2}}], Green, Opacity[.3], Cuboid[{-2, -2, -2}, {2, 2, -1}]}]プロット関数を使って異なるタイプのデータから自動的に3Dグラフィックス(Graphics3D)を作成する:
Plot3D[Sin[x y], {x, 0, 3}, {y, 0, 3}, ColorFunction -> "Rainbow", Mesh -> None]ParametricPlot3D[{(3 + Cos[v])Cos[u], (3 + Cos[v])Sin[u], Sin[v]}, {u, 0, 2Pi}, {v, 0, 2Pi}, Mesh -> None]Table[Graphics3D[{Yellow, Opacity[.8], PolyhedronData[p, "GraphicsComplex"]}], {p, {"Dodecahedron", "Icosahedron", "TruncatedIcosahedron"}}]スコープ (14)
プリミティブ (2)
Graphics3D[Polygon[{{0, 0, 0}, {1, 1, 1}, {0, 1, 1}, {1, 0, 0}}]]GraphicsComplexを使って頂点を共有することができる:
v = {{-1 / 2, -1 / 2, 0}, {-1 / 2, 1 / 2, 0}, {0, 0, -(1 / Sqrt[2])},
{0, 0, 1 / Sqrt[2]}, {1 / 2, -1 / 2, 0}, {1 / 2, 1 / 2, 0}};Graphics3D[GraphicsComplex[v,
Polygon[{{4, 5, 6}, {4, 6, 2}, {4, 2, 1}, {4, 1, 5}, {5, 1, 3}, {5, 3, 6},
{3, 1, 2}, {6, 3, 2}}]]]指示子 (5)
指示子を使って表面の色,不透明度,鏡面性を指定することができる:
{Graphics3D[{Yellow, Cylinder[]}], Graphics3D[{Green, Cuboid[{1 / 2, 1 / 2, 1 / 2}], Blue, Opacity[.4], Cuboid[]}],
Graphics3D[{Specularity[White, 10], Red, Sphere[]}]}Table[Graphics3D[{Orange, Specularity[White, n], Sphere[]}], {n, {5, 20, 100}}]{Graphics3D[{Blue, Line[{{0, 0, 0}, {2, 1, 1}}]}], Graphics3D[{Thick, Blue, Line[{{0, 0, 0}, {2, 1, 1}}]}], Graphics3D[{Dashed, Red, Line[{{0, 0, 0}, {2, 1, 1}}]}], Graphics3D[{Thick, Dashed, Red, Line[{{0, 0, 0}, {2, 1, 1}}]}]}{Graphics3D[Cylinder[]], Graphics3D[{EdgeForm[Thick], Cylinder[]}], Graphics3D[{EdgeForm[Dashed], Cylinder[]}], Graphics3D[{EdgeForm[Directive[Thick, Dashed, Blue]], Cylinder[]}]}Graphics3D[{FaceForm[Yellow, Blue], Cuboid[]}, PlotRange -> {{-1 / 4, 5 / 4}, {1 / 4, 5 / 4}, {-1 / 4, 5 / 4}}]グラフィックス指示子は通常,その指示子を含んでいるリストの最後までしか効果を保たない:
Graphics3D[{Yellow, Sphere[], {Blue, Sphere[{1, 0, 0}]}, Sphere[{2, 0, 0}]}]座標 (2)
照明とカメラ (5)
Graphics3D[{GrayLevel[.25], Specularity[White, 10], Sphere[]}, Lighting -> Automatic]Graphics3D[{Lighting -> {{"Point", Red, {0, 0, 2}}}, Sphere[], Lighting -> {{"Spot", Yellow, {{3, 0, 2}, {3, 0, 0}}, Pi / 8}}, Sphere[{3, 0, 0}], Lighting -> {{"Directional", Blue, {{0, 3, 2}, {0, 3, 0}}}}, Sphere[{0, 3, 0}], Lighting -> {{"Point", White, {3, 3, 2}}}, Sphere[{3, 3, 0}]}]Graphics3D[Cylinder[], ViewPoint -> {Pi, Pi / 2, 2}]{Graphics3D[Cylinder[], ViewPoint -> {0, -Infinity, 0}],
Graphics3D[Cylinder[], ViewPoint -> {0, 0, Infinity}]}Graphics3D[Cylinder[], ViewVector -> {{5, -5, 5}, {5, 0, -5}}]オプション (85)
AlignmentPoint (1)
座標を使って3DInsetで揃える位置を指定する:
Table[Graphics[{Inset[Graphics3D[Sphere[], ImageSize -> 50, AlignmentPoint -> {a, 1 / 2}], {0, 0}]}, ImageSize -> 100, Axes -> True, Ticks -> None], {a, {0, 1 / 2, 1}}]Table[Graphics[{Inset[Graphics3D[Sphere[], ImageSize -> 50, AlignmentPoint -> {1 / 2, a}], {0, 0}]}, ImageSize -> 100, Axes -> True, Ticks -> None], {a, {0, 1 / 2, 1}}]AspectRatio (1)
Axes (2)
AxesEdge (3)
Graphics3D[Cylinder[], Axes -> True, AxesEdge -> Automatic]Graphics3D[Cylinder[], Axes -> True, AxesEdge -> {{1, 1}, None, None}]Graphics3D[Cylinder[], Axes -> True, AxesEdge -> {{-1, 1}, None, None}](Graphics3D[Cylinder[], Axes -> True, AxesEdge -> {None, None, #}])& /@ Tuples[{-1, 1}, 2]AxesLabel (2)
AxesStyle (1)
Background (1)
BaselinePosition (2)
{x, Graphics3D[Sphere[], ImageSize -> 70, BaselinePosition -> Center], y}グラフィックスのベースラインをScaledによるオブジェクトの高さの割合で指定する:
Table[{x, Graphics3D[Sphere[], BaselinePosition -> Scaled[b], ImageSize -> 70]}, {b, {0, 0.5, 1}}]BaseStyle (2)
Boxed (1)
BoxRatios (2)
BoxStyle (1)
ClipPlanes (1)
ClipPlanesStyle (1)
Epilog (1)
FaceGrids (4)
Graphics3D[Cylinder[], Axes -> True, FaceGrids -> All]Graphics3D[Cylinder[], Axes -> True, FaceGrids -> {{0, 0, 1}, {0, 0, -1}}]Graphics3D[Cylinder[], Axes -> True, FaceGrids -> {{0, -1, 0}}]Graphics3D[Cylinder[], Axes -> True, FaceGrids -> {{{0, -1, 0}, {{0}, {-1 / 3, 1 / 3}}}}]FaceGridsStyle (1)
FormatType (2)
デフォルトでは,グラフィックス内の式はTraditionalFormを使って表示される:
Graphics3D[{Sphere[], Text[x ^ 2 + y ^ 2 + z ^ 2 == 1, {0, 0, 0}]}]StandardFormで式を表示する:
Graphics3D[{Sphere[], Text[x ^ 2 + y ^ 2 + z ^ 2 == 1, {0, 0, 0}]}, FormatType -> StandardForm]ImageMargins (2)
ImagePadding (4)
ImagePaddingを使わないと境界ボックスの外の太い線や目盛ラベルは切り取られることがある:
Framed[Graphics3D[{EdgeForm[Directive[Thickness[0.1], Pink]], Cuboid[]}, Axes -> True, AxesLabel -> {x, y, "z-axis"}, ImagePadding -> None], FrameMargins -> 0]Framed[Graphics3D[{EdgeForm[Directive[Thickness[0.1], Pink]], Cuboid[]}, Axes -> True, AxesLabel -> {x, y, "z-axis"}, ImagePadding -> All], FrameMargins -> 0]Framed[Graphics3D[{EdgeForm[Directive[Thickness[0.1], Pink]], Cuboid[]}, Axes -> True, ImagePadding -> 30], FrameMargins -> 0]Framed[Graphics3D[{EdgeForm[Directive[Thickness[0.1], Pink]], Cuboid[]}, Axes -> True, ImagePadding -> {{40, 40}, {10, 10}}], FrameMargins -> 0]ImageSize (3)
Table[Graphics3D[Cylinder[], ImageSize -> s], {s, {Tiny, Small}}]{Graphics3D[Cylinder[], ImageSize -> 100], Graphics3D[Cylinder[{{0, 0, -2}, {0, 0, 2}}], ImageSize -> 100]}{Graphics3D[Cylinder[], ImageSize -> 100], Graphics3D[Cylinder[{{0, 0, -2}, {0, 0, 2}}], ImageSize -> {100, 100}]}LabelStyle (1)
Lighting (4)
Graphics3D[{Sphere[], Cuboid[{1, 2, -1}, {2, 3, 1}], Cylinder[{{3, -1, 0}, {3, -1, 1}}]}, Lighting -> {{"Ambient", Orange}}]Table[Graphics3D[{White, Sphere[]}, Lighting -> {{"Directional", c, {{0, 0, 1}, {0, 0, 0}}}}], {c, {Red, Yellow, Blue}}]Table[Graphics3D[{White, Sphere[]}, Lighting -> {{"Point", c, {0, 0, 2}}}], {c, {Red, Yellow, Blue}}]Table[Graphics3D[{White, Sphere[]}, Lighting -> {{"Spot", c, {{0, 0, 1.5}, {0, 0, 0}}, Pi / 6}}], {c, {Red, Yellow, Blue}}]Method (13)
"AxesDuringInteraction" (1)
デフォルトの"AxesDuringInteraction"->"Lock"では,3D回転の間,軸は決まった場所に固定される:
Graphics3D[Sphere[], Axes -> True]"ContinuousUpdate"は,3D回転の最中に軸を最適な場所に移動する:
Graphics3D[Sphere[], Axes -> True, Method -> {"AxesDuringInteraction" -> "ContinuousUpdate"}]Graphics3D[Sphere[], Axes -> True, Method -> {"AxesDuringInteraction" -> "Hide"}]"ConePoints" (1)
"CylinderPoints" (1)
"InvertSurfaceNormals" (1)
BSplineSurfaceの曲面の法線の方向を逆にする:
ctrlpts = {{{1, 1, 0.75}, {1, 2, 0}, {1, 3, 0.75}}, {{2, 1, 0.5}, {2, 2, -1}, {2, 3, 0.5}}, {{3, 1, -0.25}, {3, 2, 0}, {3, 3, 0.5}}};
Table[Graphics3D[{Opacity[0.5], BSplineSurface[ctrlpts]}, Boxed -> False, Method -> {"InvertSurfaceNormals" -> invert}], {invert, {False, True}}]"OneLayer" (1)
g = Graphics3D[{Opacity[0.6], Red, Ball[{0, 0.5, 0.5}], Blue, Ball[{0, 0, 0}], Green, Polygon[{{1, 2, -1}, {-1, 2, 1}, {-1, 2, -1}}]}]{"Color",1}を指定すると,最上層が,あたかもその下に何もないかのように描画される:
Show[g, Method -> {"OneLayer" -> {"Color", 1}}]Show[g, Method -> {"OneLayer" -> {"Color", 3}}]{"Depth",layer}を使って指定された層の深さの地図を表示する:
Show[g, Method -> {"OneLayer" -> {"Depth", 1}}]"PerFragmentLighting" (1)
macOS Metalエンジンは,回転中を除き,デフォルトで"PerFragmentLighting"を使用する:
Style[Graphics3D[{Specularity[White, 100], Sphere[]}], RenderingOptions -> {"3DRenderingEngine" -> "Metal"}]"PerFragmentLighting"Falseと設定する:
Style[Graphics3D[{Specularity[White, 100], Sphere[]}, Method -> {"PerFragmentLighting" -> False}], RenderingOptions -> {"3DRenderingEngine" -> "Metal"}]"PerFragmentLighting"Trueは面全体の各画素で法線を補間する:
{p1, p2, p3} = {{1, 0, 0}, {1, 1, 1}, {0, 0, 1}};
n = {1, -1, 1};
n2 = {-1, 0, 1};Style[Graphics3D[{Yellow, Polygon[{p1, p2, p3}, VertexNormals -> {n2, n, n}]}, Method -> {"PerFragmentLighting" -> #}], RenderingOptions -> {"3DRenderingEngine" -> "Metal"}]& /@ {False, True}"PerFragmentLighting"は,面の再分割がほとんどないところでも滑らかに見える:
Style[Graphics3D[{Specularity[White, 100], Sphere[]}, Method -> {"PerFragmentLighting" -> #, "SpherePoints" -> {8, 8}}], RenderingOptions -> {"3DRenderingEngine" -> "Metal"}]& /@ {False, True}"RelieveDPZFighting" (1)
デフォルトで,共面多角形の z ファイティング問題は,通常は描画システムによって解決される:
Graphics3D[{Yellow, Polygon[{{-3, -3, -2}, {-3, 3, -2}, {3, 3, -2}, {3, -3, -2}}], Green, Opacity[.3], Cuboid[{-2, -2, -2}, {2, 2, -1}]}]"RelieveDPZFighting"->Falseとすると描画動作が向上するが z ファイティングが露呈される:
Show[%, Method -> {"RelieveDPZFighting" -> False}]"RotationControl" (1)
"RotationMode" (1)
通常は,回転中の3Dグラフィックスは,ImageSizeを調整するために見かけの大きさが変わる:
g = Graphics3D[Cuboid[{0, 0, 0}, {10, 1, 1}], ViewPoint -> {1, -2, 1}]"SphericalRegion"は,回転中のすべての方向を調整するためにグラフィックスをリサイズする:
Show[g, Method -> {"RotationMode" -> "SphericalRegion"}]"ShrinkWrap" (1)
"SpherePoints" (1)
"SplinePoints" (1)
デフォルトの{7,7}のサンプル点を使って結び目間の各パッチを再分割する:
ctrlpts = {{{1, 1, 1}, {1, 2, -1}, {1, 3, 1}}, {{2, 1, -1}, {2, 2, -2}, {2, 3, -1}}, {{3, 1, 1}, {3, 2, -1}, {3, 3, 1}}};
Graphics3D[{BSplineSurface[ctrlpts]}]Graphics3D[{BSplineSurface[ctrlpts]}, Method -> {"SplinePoints" -> {1, 1}}]PlotLabel (2)
グラフィックスの上にTraditionalFormでラベルを表示する:
Graphics3D[Sphere[], PlotLabel -> x ^ 2 + y ^ 2 + z ^ 2 == 1]Styleおよびその他のタイプセット関数を使ってラベルの外観を修正する:
Graphics3D[Sphere[], PlotLabel -> Style[Framed[x ^ 2 + y ^ 2 + z ^ 2 == 1], Red, Background -> Yellow]]PlotRange (3)
PlotRangePadding (3)
PlotRegion (3)
Graphics3D[Sphere[], Background -> StandardBlue]グラフィックスのコンテンツを各方向の中央寄り半分に制限する:
Graphics3D[Sphere[], PlotRegion -> {{0.25, 0.75}, {0.25, 0.75}}, Background -> StandardBlue]ImagePaddingはグラフィックスの周囲に加える充填にも使える:
Graphics3D[Sphere[], ImagePadding -> 30, Background -> StandardBlue]Prolog (1)
SphericalRegion (1)
それぞれの向きとは無関係に同じ大きさになっている一連の画像を作る:
Table[Graphics3D[Cuboid[], SphericalRegion -> True, ImageSize -> 80, ViewPoint -> 3.{ Sin[t], Cos[t], 1}], {t, 0, 4}]SphericalRegionを使わないと,各画像はその最大サイズになる:
Table[Graphics3D[Cuboid[], SphericalRegion -> False, ImageSize -> 80, ViewPoint -> 3.{ Sin[t], Cos[t], 1}], {t, 0, 4}]Ticks (2)
TicksStyle (2)
ViewAngle (1)
ViewCenter (2)
Framed[Graphics3D[Cylinder[], ViewCenter -> {1, .5, 1}, SphericalRegion -> True]]ViewCenter->{vc,vp}を使って,3Dの点 vc が2Dの点 vp にマップされるように指定する:
vc = {1, 0.5, 1};
vp = {0.5, 0.7};Framed[Graphics3D[{Cylinder[], Red, PointSize[.1], Point[Scaled[vc]]}, ViewCenter -> {vc, vp}, SphericalRegion -> True, Epilog -> {Green, PointSize[Medium], Point[Scaled[vp]]}]]ViewMatrix (1)
ViewPoint (3)
Graphics3D[Cylinder[], ViewPoint -> {Pi, Pi / 2, 2}]{Graphics3D[Cylinder[], ViewPoint -> Front],
Graphics3D[Cylinder[], ViewPoint -> Top]}{Graphics3D[Cylinder[], ViewPoint -> {0, -Infinity, 0}],
Graphics3D[Cylinder[], ViewPoint -> {0, 0, Infinity}]}ViewRange (2)
デフォルトで,範囲はすべてのオブジェクトを含むのに十分になっている:
Graphics3D[{Cylinder[], Cylinder[{{0, 3, -1}, {0, 3, 1}}]}, ViewPoint -> {0, -1, .5}, SphericalRegion -> True]Graphics3D[{Cylinder[], Cylinder[{{0, 3, -1}, {0, 3, 1}}]}, ViewPoint -> {0, -1, .5}, ViewRange -> {3.5, 7.2}, SphericalRegion -> True]ViewVector (1)
特性と関係 (5)
Graphics3DのStandardFormはその描画形である:
Graphics3D[Sphere[]]InputFormはテキストによる式の形式である:
InputForm[%]Graphics3Dを関数の入力として使うことができる:
makeDashed[ g_Graphics3D ] := g /. l_Line :> {Dashed, l}makeDashed[[image]]3Dプロット関数はGraphics3Dを返す:
ContourPlot3D[ Cos[x]Sin[y] + Cos[y]Sin[z] + Cos[z]Sin[x] == 0, {x, -2π, 2π}, {y, -2π, 2π}, {z, -2π, 2π}, ContourStyle -> Directive[FaceForm[Orange, Red], Specularity[White, 30]], Mesh -> None]SphericalPlot3D[1 + Sin[5ϕ] / 5, {θ, 0, Pi}, {ϕ, 0, 2Pi}, PlotStyle -> Directive[Yellow, Opacity[0.7], Specularity[White, 20]], Mesh -> None, PlotPoints -> 30]いくつかの統合されたデータソースがGraphics3Dを返す:
ChemicalData["Caffeine", "MoleculePlot"]KnotData[{"TorusKnot", {3, 5}}]ExampleData[{"Geometry3D", "Cow"}]多くのImport・Export形式がGraphics3Dをサポートしている:
Import["ExampleData/747.3ds.gz", "Graphics3D", ImageSize -> Medium]Import["http://www.rcsb.org/pdb/download/downloadFile.do?fileFormat=pdb&compression=NO&structureId=1tf6", "PDB", Background -> GrayLevel[0.1], ImageSize -> Medium]関連項目
Show Plot3D ListPlot3D ParametricPlot3D RegionPlot3D ContourPlot3D ListContourPlot3D Graphics DiscretizeGraphics BoundaryDiscretizeGraphics Printout3D
フロントエンドトークン: Import
Function Repository: Stereogram3D
テクニカルノート
関連するガイド
-
▪
- 記号的なグラフィックス言語 ▪
- 立体幾何学 ▪
- 多角形 ▪
- 多面体 ▪
- WDF(Wolfram Data Framework)
関連するワークフロー
- 3Dプリントを作成する ▪
- インタラクティブなコンテンツをゲームパッドで制御する
履歴
1988 で導入 (1.0) | 1996 で更新 (3.0) ▪ 2007 (6.0) ▪ 2008 (7.0) ▪ 2010 (8.0) ▪ 2012 (9.0) ▪ 2014 (10.0) ▪ 2017 (11.2) ▪ 2019 (12.0) ▪ 2020 (12.1) ▪ 2024 (14.0)
テキスト
Wolfram Research (1988), Graphics3D, Wolfram言語関数, https://reference.wolfram.com/language/ref/Graphics3D.html (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_2026_graphics3d, author="Wolfram Research", title="{Graphics3D}", year="2024", howpublished="\url{https://reference.wolfram.com/language/ref/Graphics3D.html}", note=[Accessed: 30-October-2026]}
BibLaTeX
@online{reference.wolfram_2026_graphics3d, organization={Wolfram Research}, title={Graphics3D}, year={2024}, url={https://reference.wolfram.com/language/ref/Graphics3D.html}, note=[Accessed: 30-October-2026]}