({{, (RefLink[DiscretizeGraphics, paclet:ref/DiscretizeGraphics])[g] 
discretizes a 2D or 3D graphic g into a (RefLink[MeshRegion, paclet:ref/MeshRegion]).}, {, (RefLink[DiscretizeGraphics, paclet:ref/DiscretizeGraphics])[g,patt]
discretizes only the elements in g that match the pattern patt.}})

OpenersNotesSection(Spacer1)Details and Options

(RefLink[DiscretizeGraphics, paclet:ref/DiscretizeGraphics]) discretizes graphics into a disjoint union of piecewise linear cells used in (RefLink[MeshRegion, paclet:ref/MeshRegion]).

The graphic g can be (RefLink[Graphics, paclet:ref/Graphics]), (RefLink[Graphics3D, paclet:ref/Graphics3D]), or individual graphics primitives.

(RefLink[DiscretizeGraphics, paclet:ref/DiscretizeGraphics]) effectively treats multiple primitives in (RefLink[Graphics, paclet:ref/Graphics]) and (RefLink[Graphics3D, paclet:ref/Graphics3D]) as a union operation.

The discretization is exact when g contains only bounded piecewise linear primitives; otherwise, it is an approximation.

Bounded piecewise linear primitives in (RefLink[Graphics, paclet:ref/Graphics]) (these can be represented exactly):

In addition, (RefLink[SSSTriangle, paclet:ref/SSSTriangle]), (RefLink[SASTriangle, paclet:ref/SASTriangle]), (RefLink[ASATriangle, paclet:ref/ASATriangle]), and (RefLink[AASTriangle, paclet:ref/AASTriangle]) evaluate to (RefLink[Triangle, paclet:ref/Triangle]) and can be represented exactly.

Unbounded piecewise linear primitives in (RefLink[Graphics, paclet:ref/Graphics]) (only a finite range can be represented):

Nonlinear primitives in (RefLink[Graphics, paclet:ref/Graphics]) (only an approximation can be represented):

In addition, (RefLink[Circumsphere, paclet:ref/Circumsphere]) evaluates to (RefLink[Sphere, paclet:ref/Sphere]) and can be represented approximately.

Bounded piecewise linear primitives in (RefLink[Graphics3D, paclet:ref/Graphics3D]) (these can be represented exactly):

Unbounded piecewise linear primitives in (RefLink[Graphics3D, paclet:ref/Graphics3D]) (only a finite range can be represented):

Nonlinear primitives in (RefLink[Graphics3D, paclet:ref/Graphics3D]) (only an approximation can be represented):

In addition, (RefLink[Circumsphere, paclet:ref/Circumsphere]) evaluates to (RefLink[Sphere, paclet:ref/Sphere]) and can be represented approximately.

(RefLink[DiscretizeGraphics, paclet:ref/DiscretizeGraphics]) has the same options as (RefLink[MeshRegion, paclet:ref/MeshRegion]), with the following additions and changes:

With (RefLink[AccuracyGoal, paclet:ref/AccuracyGoal])->a and (RefLink[PrecisionGoal, paclet:ref/PrecisionGoal])->p, an attempt will be made to keep the maximum distance between the region reg or the discretized region dreg and any point in (RefLink[RegionSymmetricDifference, paclet:ref/RegionSymmetricDifference])[reg,dreg] to less than (10^(-a))+h (10^(-p)), where h is the length of the diagonal of the plot range.

OpenersPrimaryExamplesSection(Spacer1)Examples  (59)

OpenersExampleSection0(Spacer1)Basic Examples  (2)

Discretize a 2D special region including (RefLink[Circle, paclet:ref/Circle]):

DiscretizeGraphics[Graphics[{Circle[]}]]

(RefLink[Parallelogram, paclet:ref/Parallelogram]):

DiscretizeGraphics[Graphics[{Parallelogram[{0,0},{{1,1},{1,0}}]}]]

Discretize 3D special regions including (RefLink[Cone, paclet:ref/Cone]):

DiscretizeGraphics[Graphics3D[{Cone[]}]]

(RefLink[Prism, paclet:ref/Prism]):

DiscretizeGraphics[Graphics3D[{Prism[{{1,0,1},{0,0,0},{2,0,0},{1,2,1},{0,2,0},{2,2,0}}]}]]

OpenersExampleSection1(Spacer1)Scope  (17)

OpenersExampleSubsection0(Spacer1)Graphics  (9)

Discretize a 2D special region including (RefLink[Circle, paclet:ref/Circle]):

DiscretizeGraphics[Graphics[{Circle[]}]]

(RefLink[Parallelogram, paclet:ref/Parallelogram]):

DiscretizeGraphics[Graphics[{Parallelogram[{0,0},{{1,1},{1,0}}]}]]

Discretize (RefLink[Graphics, paclet:ref/Graphics]) with (RefLink[GraphicsComplex, paclet:ref/GraphicsComplex]) containing (RefLink[Point, paclet:ref/Point]), (RefLink[Line, paclet:ref/Line]), and (RefLink[Polygon, paclet:ref/Polygon]):

v={{0,0},{3,0},{3,3},{0,3}};

g=Graphics/@{GraphicsComplex[v,Point[{1,2,3,4}]],GraphicsComplex[v,Line[{1,2,3,4,1}]],GraphicsComplex[v,Polygon[{1,2,3,4}]]}

DiscretizeGraphics/@g

Discretize (RefLink[Graphics, paclet:ref/Graphics]) with (RefLink[GraphicsComplex, paclet:ref/GraphicsComplex]) containing (RefLink[Rectangle, paclet:ref/Rectangle]), (RefLink[Circle, paclet:ref/Circle]), and (RefLink[Disk, paclet:ref/Disk]):

v={{0,0},{2,0},{2,2},{0,2}};

g=Graphics/@{GraphicsComplex[v,Rectangle/@{1,2,3,4}],GraphicsComplex[v,Circle/@{1,2,3,4}],GraphicsComplex[v,Disk/@{1,2,3,4}]}

DiscretizeGraphics/@g

Discretize only those primitives that match a pattern:

g=Graphics[{Brown,Disk[{-1,0},2],LightBlue,Rectangle[{0,-2},{4,2}],Red,Point[{6,1}],Circle[{5,0},2],Line[{{-4,0},{8,0}}]}]

DiscretizeGraphics[g,_Circle|_Rectangle]

Discretize primitives with dimension less than 2:

DiscretizeGraphics[g,x_/;RegionDimension[x]<2]

Discretize (RefLink[All, paclet:ref/All]) primitives:

DiscretizeGraphics[g,All]

Bounded piecewise linear (RefLink[Graphics, paclet:ref/Graphics]) primitives can be represented exactly:

g=Graphics[{Orange,Triangle[{{-1,1},{0,2},{1,1}}],Blue,Rectangle[{-1,0}],Yellow,Simplex[2],Brown,Parallelogram[{2,0},{{-1,0},{-1,1}}],Purple,Polygon[{{2,1},{4,0},{3,1},{4,2}}]}]

DiscretizeGraphics[g]

Unbounded piecewise linear (RefLink[Graphics, paclet:ref/Graphics]) primitives can only be represented within a finite range:

p={InfiniteLine[{0,0},{1,1}],HalfLine[{0,0},{-1,1}],HalfPlane[{{1,0},{2,1}},{1,-1}],ConicHullRegion[{{-1,0}},{{-1,-1},{-1,1}}]};

g=Graphics[p,PlotRange->{{-3,3},{-1.5,1.5}}]

DiscretizeGraphics[g]

Nonlinear (RefLink[Graphics, paclet:ref/Graphics]) primitives can only be approximately represented:

g=Graphics[{BSplineCurve[{{0,0},{1,-1},{2,-1},{3,0},{4,-2},{5,0}}],Circle[{2,1}]}]

DiscretizeGraphics[g]

Graphics involving (RefLink[GraphicsComplex, paclet:ref/GraphicsComplex]):

v=Table[15{Cos[t],Sin[t]},{t,0,4Pi,4Pi/5}];

g=Graphics[GraphicsComplex[v,{Orange,Line[{1,4,2,5,3,1}],Polygon[{1,2,3,4,5}]}]]

DiscretizeGraphics[g]

Use (RefLink[MaxCellMeasure, paclet:ref/MaxCellMeasure]) to control the level of discretization:

g=Graphics[{Disk[{0,0}],Circle[{1,0}]}]

Table[DiscretizeGraphics[g,MaxCellMeasure->{"Length"->m}],{m,{0.9,0.6,0.3}}]

OpenersExampleSubsection1(Spacer1)Graphics3D  (8)

Discretize 3D special regions including (RefLink[Cone, paclet:ref/Cone]):

DiscretizeGraphics[Graphics3D[{Cone[]}]]

(RefLink[Prism, paclet:ref/Prism]):

DiscretizeGraphics[Graphics3D[{Prism[{{1,0,1},{0,0,0},{2,0,0},{1,2,1},{0,2,0},{2,2,0}}]}]]

Discretize (RefLink[Graphics3D, paclet:ref/Graphics3D]) with (RefLink[GraphicsComplex, paclet:ref/GraphicsComplex]) containing (RefLink[Point, paclet:ref/Point]), (RefLink[Line, paclet:ref/Line]), and (RefLink[Polygon, paclet:ref/Polygon]):

v={{0,0,0},{2,0,0},{2,2,0},{0,2,0},{1,1,2}};
i={{1,2,5},{2,3,5},{3,4,5},{4,1,5}};

g=Graphics3D/@{GraphicsComplex[v,{PointSize@Large,Point[Range@5]}],GraphicsComplex[v,Line[i]],GraphicsComplex[v,Polygon[i]]}

DiscretizeGraphics/@g

Discretize a whole (RefLink[Graphics3D, paclet:ref/Graphics3D]) scene, where multiple primitives are taken as a union:

DiscretizeGraphics[]

Volume[%]

Discretize only those primitives that match a pattern:

p={Point[Tuples[{0,1},3]],Table[Line[{{x,-0.5,0},{x,-2,0}}],{x,2,6}],
Triangle[{{6,0,0},{4.5,0,0},{5,2,0}}],Cone[{{3,1,0},{3,1,2}}]};

g=Graphics3D[p,Boxed->False]

DiscretizeGraphics[g,_Line|_Cone]

Discretize primitives with dimension less than 2:

DiscretizeGraphics[g,x_/;RegionDimension[x]<2]

Discretize (RefLink[All, paclet:ref/All]) primitives:

DiscretizeGraphics[g,All]

Bounded piecewise linear (RefLink[Graphics3D, paclet:ref/Graphics3D]) primitives can be represented exactly:

p={Point[{-3,0,0}],Line[{{-2.5,0,0},{-1.5,0,0}}],Triangle[{{-1.2,0,0},{-0.5,0,0},{-1,1,0}}],Parallelepiped[{0,0,0},{{1,0,0},{1,1,0},{0,1,1}}]};

g=Graphics3D[p,Boxed->False]

DiscretizeGraphics[g]

Unbounded (RefLink[Graphics3D, paclet:ref/Graphics3D]) primitives can only be represented within a finite range:

p={InfiniteLine[{0,0,0},{1,0,0}],HalfLine[{0,0,0},{0,0,-1}],InfinitePlane[{0,0,-2},{{1,0,0},{0,1,0}}],HalfPlane[{{-1/2,0,-2},{-1/2,1,-2}},{-1,0,1}],
ConicHullRegion[{{0,0,0}},{{1,1,0},{0,1,1},{1,0,1}}]};

g=Graphics3D[p,Boxed->False,PlotRange->{{-3,3},{-3,3},{-6,3}}]

DiscretizeGraphics[g]

Nonlinear (RefLink[Graphics3D, paclet:ref/Graphics3D]) primitives can only be approximately represented:

g=Graphics3D[{Cylinder[{{2,2,0},{2,2,2}},1],Sphere[{3,3,1}],BSplineSurface[Table[{i,j,RandomReal[{-1,0}]},{i,5},{j,5}]]}]

DiscretizeGraphics[g]

Use (RefLink[MaxCellMeasure, paclet:ref/MaxCellMeasure]) to control the level of discretization:

g=Graphics3D[{Cylinder[{{2,2,0},{2,2,2}},1],Sphere[{3,3,1}]}]

Table[DiscretizeGraphics[g,MaxCellMeasure->{"Area"->m}],{m,{1,0.1,0.01}}]

OpenersExampleSection2(Spacer1)Options  (23)

OpenersExampleSubsection3(Spacer1)MaxCellMeasure  (6)

Discretize with a maximum cell area of 0.1:

mr=DiscretizeGraphics[Graphics[{Disk[{0,0}],Circle[{1,0}]}],MaxCellMeasure->0.1]

This gives the area of the cells:

PropertyValue[{mr,2},MeshCellMeasure]

Discretize with a maximum cell volume of 0.1:

g=Graphics3D[{Cylinder[{{2,2,0},{2,2,2}},1],Sphere[{3,3,1}]}]

mr=DiscretizeGraphics[g,MaxCellMeasure->0.1]

A (RefLink[Histogram, paclet:ref/Histogram]) of the cell volumes:

Histogram[PropertyValue[{mr,3},MeshCellMeasure]]

Compare different length settings:

g=Graphics[{Circle[{0,0}],Circle[{1,0}]}]

Table[DiscretizeGraphics[g,MaxCellMeasure->{"Length"->m}],{m,{0.9,0.6,0.3}}]

Compare different area settings:

g=Graphics[{Disk[{0,0}],Disk[{1,0}]}]

Table[DiscretizeGraphics[g,MaxCellMeasure->{"Area"->m}],{m,{0.4,0.2,0.05}}]

Compare different face area settings:

g=Graphics3D[{Cylinder[{{2,2,0},{2,2,2}},1],Sphere[{3,3,1}]}]

Table[DiscretizeGraphics[g,MaxCellMeasure->{"Area"->m}],{m,{1,0.1,0.01}}]

Compare different volume settings:

g=Graphics3D[{Ball[]}]

Table[DiscretizeGraphics[g,MaxCellMeasure->{"Volume"->m}],{m,{0.3,0.01,0.001}}]

OpenersExampleSubsection4(Spacer1)MeshCellHighlight  (2)

(RefLink[MeshCellHighlight, paclet:ref/MeshCellHighlight]) allows you to specify highlighting for parts of a (RefLink[MeshRegion, paclet:ref/MeshRegion]):

DiscretizeGraphics[Graphics[Disk[]],MeshCellHighlight->{{1,All}->Red,{0,All}->Black}]

Individual cells can be highlighted using their cell index:

DiscretizeGraphics[Graphics[Line[{{{0,0},{1,0}},{{1,0},{2,0}}}]],MeshCellHighlight->{{1,1}->{Thick,Red},{1,2}->{Dashed,Black}}]

Or by the cell itself:

DiscretizeGraphics[Graphics[Line[{{{0,0},{1,0}},{{1,0},{2,0}}}]],MeshCellHighlight->{Line[{1,2}]->{Thick,Red},Line[{2,3}]->{Dashed,Black}}]

OpenersExampleSubsection5(Spacer1)MeshCellLabel  (3)

(RefLink[MeshCellLabel, paclet:ref/MeshCellLabel]) can be used to label parts of a (RefLink[MeshRegion, paclet:ref/MeshRegion]):

DiscretizeGraphics[Graphics[Point[{{0,0},{1,0},{2,0}}]],MeshCellLabel->{0->"Index"}]

Label the vertices and edges of a parallelogram:

DiscretizeGraphics[Graphics[{Parallelogram[{0,0},{{1,1},{1,0}}]}],MeshCellLabel->{0->"Index",1->"Index"}]

Individual cells can be labeled using their cell index:

DiscretizeGraphics[Graphics[Line[{{{0,0},{1,0}},{{1,0},{2,0}}}]],MeshCellLabel->{{1,1}->"x",{1,2}->"y"}]

Or by the cell itself:

DiscretizeGraphics[Graphics[Line[{{{0,0},{1,0}},{{1,0},{2,0}}}]],MeshCellLabel->{Line[{1,2}]->"x",Line[{2,3}]->"y"}]

OpenersExampleSubsection6(Spacer1)MeshCellMarker  (1)

(RefLink[MeshCellMarker, paclet:ref/MeshCellMarker]) can be used to assign values to parts of a (RefLink[MeshRegion, paclet:ref/MeshRegion]):

DiscretizeGraphics[Graphics[Point[{{0,0},{1,0},{2,0}}]],MeshCellMarker->{{0,1}->1,{0,2}->2,{0,3}->3}]

Use (RefLink[MeshCellLabel, paclet:ref/MeshCellLabel]) to show the markers:

DiscretizeGraphics[Graphics[Point[{{0,0},{1,0},{2,0}}]],MeshCellMarker->{{0,1}->1,{0,2}->2,{0,3}->3},MeshCellLabel->{0->"Marker"}]

OpenersExampleSubsection7(Spacer1)MeshCellShapeFunction  (2)

(RefLink[MeshCellShapeFunction, paclet:ref/MeshCellShapeFunction]) allows you to specify functions for parts of a (RefLink[MeshRegion, paclet:ref/MeshRegion]):

DiscretizeGraphics[Graphics[Line[{{0,0},{2,0},{1,Sqrt[3]},{0,0}}]],MeshCellShapeFunction->{0->(Disk[#,.1]&)}]

Individual cells can be drawn using their cell index:

DiscretizeGraphics[Graphics[Line[{{0,0},{2,0},{1,Sqrt[3]},{0,0}}]],MeshCellShapeFunction->{{0,1}->(Disk[#,.1]&),{0,2}->(Disk[#,{.1,.2}]&)}]

Or by the cell itself:

DiscretizeGraphics[Graphics[Line[{{0,0},{2,0},{1,Sqrt[3]},{0,0}}]],MeshCellShapeFunction->{Point[1]->(Disk[#,.1]&),Point[2]->(Disk[#,{.1,.2}]&)}]

OpenersExampleSubsection8(Spacer1)MeshCellStyle  (2)

(RefLink[MeshCellStyle, paclet:ref/MeshCellStyle]) allows you to specify styling for parts of a (RefLink[MeshRegion, paclet:ref/MeshRegion]):

DiscretizeGraphics[Graphics[Disk[]],MeshCellStyle->{{1,All}->Red,{0,All}->Black}]

Individual cells can be highlighted using their cell index:

DiscretizeGraphics[Graphics[Line[{{{0,0},{1,0}},{{1,0},{2,0}}}]],MeshCellStyle->{{1,1}->{Thick,Red},{1,2}->{Dashed,Black}}]

Or by the cell itself:

DiscretizeGraphics[Graphics[Line[{{{0,0},{1,0}},{{1,0},{2,0}}}]],MeshCellStyle->{Line[{1,2}]->{Thick,Red},Line[{2,3}]->{Dashed,Black}}]

OpenersExampleSubsection12(Spacer1)PlotRange  (5)

(RefLink[Automatic, paclet:ref/Automatic]) includes the entire range of a finite region:

g=Graphics[{Triangle[],Circle[{-1,-1}]}];

DiscretizeGraphics[g,PlotRange->Automatic]

(RefLink[Automatic, paclet:ref/Automatic]) includes a partial range of an infinite region:

g=Graphics[{HalfLine[{0,0},{-1,1}],HalfPlane[{{1,0},{2,1}},{1,-1}]}];

DiscretizeGraphics[g,PlotRange->Automatic]

Explicit settings are respected:

g=Graphics[{Disk[{0,0}],Circle[{1.5,0}]},PlotRange->{{-1,3},{-1,1}}]

DiscretizeGraphics[g]

Unless overridden:

DiscretizeGraphics[g,PlotRange->{{0,3},{0,1}}]

Focus region of interest:

g=Graphics[{Circle[],HalfPlane[{{1,0},{2,1}},{1,-1}]}];

DiscretizeGraphics[g,PlotRange->{{-3,3},{-3,3}}]

Clipping a solid primitive results in a solid primitive; otherwise, interiors are exposed:

g=Graphics3D[{Ball[],Sphere[{2,0,0}]}]

DiscretizeGraphics[g,PlotRange->{{-1,3},{0.1,1},{-2,2}}]

Compare different settings:

g=Graphics[{InfiniteLine[{0,0},{1,1}],Disk[]}];

Table[DiscretizeGraphics[g,PlotRange->pr],{pr,{All,Automatic,Full}}]

OpenersExampleSubsection13(Spacer1)PlotTheme  (2)

Use a theme with grid lines and a legend:

DiscretizeGraphics[Graphics[Disk[]],PlotTheme->"Detailed"]

Use a theme to draw a wireframe:

DiscretizeGraphics[Graphics[Disk[]],PlotTheme->"Lines"]

OpenersExampleSection3(Spacer1)Applications  (4)

Compute the length of a curve by converting it to a geometric region:

g=KnotData["Trefoil","KnotDiagram"];

ℛ=DiscretizeGraphics[g]//Quiet

ArcLength[ℛ]

Compute the surface area of a graphic by converting it to a geometric region:

p=PolyhedronData["Dodecahedron"];

ℛ=DiscretizeGraphics[p]

Area[ℛ]

Convert (RefLink[Text, paclet:ref/Text]) to a geometric region:

t=Text[Style["π",Bold]]

DiscretizeGraphics[t,_Text,MaxCellMeasure->0.1]

Convert a country polygon to a geometric region:

DiscretizeGraphics[CountryData["France","Polygon"]]

OpenersExampleSection4(Spacer1)Properties & Relations  (9)

Multiple primitives are interpreted as a union:

g=Graphics[{Rectangle[],Circle[],Line[{{1,-1},{-1,1}}]}]

DiscretizeGraphics[g]

Bounded linear primitives can be exactly discretized:

g=Graphics[{Line[{{1,-1},{-1,1}}],Triangle[],Rectangle[{-1,-1},{0,0}]}]

DiscretizeGraphics[g]

Unbounded linear primitives can only be represented within a finite range:

g=Graphics[{InfiniteLine[{0,0},{1,1}],HalfPlane[{{1,0},{2,1}},{1,-1}]},PlotRange->{{-1.5,2.75},{-1.5,1.5}}]

DiscretizeGraphics[g]

Nonlinear primitives can only be approximately discretized:

g=Graphics[Table[Circle[{0,0},r],{r,{1,4,7}}]]

DiscretizeGraphics[g]

Use (RefLink[BoundaryDiscretizeGraphics, paclet:ref/BoundaryDiscretizeGraphics]) to get a (RefLink[BoundaryMeshRegion, paclet:ref/BoundaryMeshRegion]) representation:

g=Graphics[{Brown,Disk[{1.5,1}],Orange,Rectangle[]}]

{br,mr}={BoundaryDiscretizeGraphics[g],DiscretizeGraphics[g]}

{BoundaryMeshRegionQ[br],MeshRegionQ[mr]}

(RefLink[DiscretizeRegion, paclet:ref/DiscretizeRegion]) can be used to discretize any (RefLink[RegionQ, paclet:ref/RegionQ]) object:

DiscretizeRegion[ImplicitRegion[x^2-y^2≤1,{{x,-2,2},{y,-2,2}}]]

(RefLink[DiscretizeGraphics, paclet:ref/DiscretizeGraphics]) can be used to discretize (RefLink[Graphics, paclet:ref/Graphics]) and (RefLink[Graphics3D, paclet:ref/Graphics3D]) objects:

DiscretizeGraphics[Graphics[{BezierCurve[{{0,1},{1,1},{2,-1},{5,1}}],Circle[]}]]

They can both discretize special regions that are also graphics primitives:

{DiscretizeRegion[Disk[]],DiscretizeGraphics[Disk[]]}

Graphics primitives that are also geometric regions can be used without discretization:

r=Disk[{0,0},1];

RegionQ[r]

Compute directly with the region:

Area[r]

Or with its discretized version:

Area[DiscretizeGraphics[r]]

(RefLink[Rasterize, paclet:ref/Rasterize]) discretizes any rendered expression to (RefLink[Graphics, paclet:ref/Graphics]) containing a (RefLink[Raster, paclet:ref/Raster]) object:

g=Graphics[{Disk[{0,0}],Circle[{1,0}]}]

Rasterize[g,RasterSize->{30,20},ImageSize->100]

(RefLink[Image, paclet:ref/Image]) discretizes any rendered expression to an (RefLink[Image, paclet:ref/Image]) object:

g=Graphics[{Disk[{0,0}],Circle[{1,0}]}]

Image[g,ImageSize->{30,20},Magnification->4]

OpenersExampleSection5(Spacer1)Possible Issues  (4)

Primitives with (RefLink[Scaled, paclet:ref/Scaled]) coordinates are not discretized:

g=Graphics[{Disk[Scaled[{.3,.4}],1],Rectangle[]},Frame->True,PlotRange->{{0,5},{0,5}}]

DiscretizeGraphics[g]

Primitives with (RefLink[Offset, paclet:ref/Offset]) coordinates are not discretized:

g=Graphics[{Circle[{1,1/2},Offset[{10,40}]],Triangle[]},Frame->True]

DiscretizeGraphics[g]

Primitives with (RefLink[ImageScaled, paclet:ref/ImageScaled]) coordinates are not discretized:

g=Graphics[{Disk[ImageScaled[{.2,.4}],1],Triangle[]},Frame->True,PlotRange->{{0,6},{0,6}}]

DiscretizeGraphics[g]

(RefLink[DiscretizeGraphics, paclet:ref/DiscretizeGraphics]) for (RefLink[Graphics3D, paclet:ref/Graphics3D]) with multiple volume primitives is not supported:

g=Graphics3D[{Cylinder[],Ball[{1,0,0}]}]

DiscretizeGraphics[g]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[BoundaryDiscretizeGraphics, paclet:ref/BoundaryDiscretizeGraphics])  ▪  (RefLink[DiscretizeRegion, paclet:ref/DiscretizeRegion])  ▪  (RefLink[MeshRegion, paclet:ref/MeshRegion])  ▪  (RefLink[BoundaryDiscretizeRegion, paclet:ref/BoundaryDiscretizeRegion])  ▪  (RefLink[FindMeshDefects, paclet:ref/FindMeshDefects])  ▪  (RefLink[RepairMesh, paclet:ref/RepairMesh])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Mesh-Based Geometric Regions, paclet:guide/MeshRegions])}, {▪(RefLinkPlain[Geometric Computation, paclet:guide/GeometricComputation])}})}})