Skip to main content
edited tags
Link
Szabolcs
  • 238.9k
  • 32
  • 653
  • 1.3k
added 334 characters in body
Source Link
Nasser
  • 156.1k
  • 12
  • 173
  • 396

Why does DiscretizeGraphics seems to work on one GraphicsComplex and not the other? Here is an example that works:

v = {{1, 0}, {0, 1}, {-1, 0}, {0, -1}}; p1 = Graphics[GraphicsComplex[v, Polygon[{1, 2, 3, 4}]]]; DiscretizeGraphics[p1] 

But this does not

p2 = Graphics3D[First@ParametricPlot3D[{Cos[t], Sin[u], c Sin[t]}, {u, 0, 2 Pi}, {t, 0, 2 Pi}]]; DiscretizeGraphics[p2] (*The function DiscretizeGraphics is not implemented for \ GraphicsComplex[{{0.9999999999998993`,4.487989505128125`*^-7,*) 

But p2 is a GraphicsComplex? Looking at FullForm[p2]

Mathematica graphics

Here is the FullForm for p1

Mathematica graphics

Are not p1 and p2 both GraphicsComplex ? p1 is 2D and p2 is 3D, but are they not both considered GraphicsComplex?

Mathematica graphics

It will good to know exactly what can and what can not be discretized. I tried to find this, but could not. All what I see are examples of usages so far.

reference: http://www.wolfram.com/mathematica/new-in-10/data-and-mesh-regions/discretizing-graphics.html

http://reference.wolfram.com/language/ref/DiscretizeGraphics.html?q=DiscretizeGraphics

Mathematica graphics

I also looked at possible issues, and did not notice anything about this. Only one that came close is this multiple volume primitives is not supported. Is this the case here?

Why does DiscretizeGraphics seems to work on one GraphicsComplex and not the other? Here is an example that works:

v = {{1, 0}, {0, 1}, {-1, 0}, {0, -1}}; p1 = Graphics[GraphicsComplex[v, Polygon[{1, 2, 3, 4}]]]; DiscretizeGraphics[p1] 

But this does not

p2 = Graphics3D[First@ParametricPlot3D[{Cos[t], Sin[u], c Sin[t]}, {u, 0, 2 Pi}, {t, 0, 2 Pi}]]; DiscretizeGraphics[p2] (*The function DiscretizeGraphics is not implemented for \ GraphicsComplex[{{0.9999999999998993`,4.487989505128125`*^-7,*) 

But p2 is a GraphicsComplex? Looking at FullForm[p2]

Mathematica graphics

Here is the FullForm for p1

Mathematica graphics

Are not p1 and p2 both GraphicsComplex ? p1 is 2D and p2 is 3D, but are they not both considered GraphicsComplex?

Mathematica graphics

It will good to know exactly what can and what can not be discretized. I tried to find this, but could not. All what I see are examples of usages so far.

reference: http://www.wolfram.com/mathematica/new-in-10/data-and-mesh-regions/discretizing-graphics.html

Why does DiscretizeGraphics seems to work on one GraphicsComplex and not the other? Here is an example that works:

v = {{1, 0}, {0, 1}, {-1, 0}, {0, -1}}; p1 = Graphics[GraphicsComplex[v, Polygon[{1, 2, 3, 4}]]]; DiscretizeGraphics[p1] 

But this does not

p2 = Graphics3D[First@ParametricPlot3D[{Cos[t], Sin[u], c Sin[t]}, {u, 0, 2 Pi}, {t, 0, 2 Pi}]]; DiscretizeGraphics[p2] (*The function DiscretizeGraphics is not implemented for \ GraphicsComplex[{{0.9999999999998993`,4.487989505128125`*^-7,*) 

But p2 is a GraphicsComplex? Looking at FullForm[p2]

Mathematica graphics

Here is the FullForm for p1

Mathematica graphics

Are not p1 and p2 both GraphicsComplex ? p1 is 2D and p2 is 3D, but are they not both considered GraphicsComplex?

Mathematica graphics

It will good to know exactly what can and what can not be discretized. I tried to find this, but could not. All what I see are examples of usages so far.

reference: http://www.wolfram.com/mathematica/new-in-10/data-and-mesh-regions/discretizing-graphics.html

http://reference.wolfram.com/language/ref/DiscretizeGraphics.html?q=DiscretizeGraphics

Mathematica graphics

I also looked at possible issues, and did not notice anything about this. Only one that came close is this multiple volume primitives is not supported. Is this the case here?

added 246 characters in body
Source Link
Nasser
  • 156.1k
  • 12
  • 173
  • 396

Why does DiscretizeGraphics seems to work on one GraphicsComplex and not the other? Here is an example that works:

v = {{1, 0}, {0, 1}, {-1, 0}, {0, -1}}; p1 = Graphics[GraphicsComplex[v, Polygon[{1, 2, 3, 4}]]]; DiscretizeGraphics[p1] 

But this does not

p2 = Graphics3D[First@ParametricPlot3D[{Cos[t], Sin[u], c Sin[t]}, {u, 0, 2 Pi}, {t, 0, 2 Pi}]]; DiscretizeGraphics[p2] (*The function DiscretizeGraphics is not implemented for \ GraphicsComplex[{{0.9999999999998993`,4.487989505128125`*^-7,*) 

But p2 is a GraphicsComplex? Looking at FullForm[p2]

Mathematica graphics

Here is the FullForm for p1

Mathematica graphics

Are not p1 and p2 both GraphicsComplex ? p1 is 2D and p2 is 3D, but are they not both considered GraphicsComplex?

Mathematica graphics

It will good to know exactly what can and what can not be discretized. I tried to find this, but could not. All what I see are examples of usages so far.

reference: http://www.wolfram.com/mathematica/new-in-10/data-and-mesh-regions/discretizing-graphics.html

Why does DiscretizeGraphics seems to work on one GraphicsComplex and not the other? Here is an example that works:

v = {{1, 0}, {0, 1}, {-1, 0}, {0, -1}}; p1 = Graphics[GraphicsComplex[v, Polygon[{1, 2, 3, 4}]]]; DiscretizeGraphics[p1] 

But this does not

p2 = Graphics3D[First@ParametricPlot3D[{Cos[t], Sin[u], c Sin[t]}, {u, 0, 2 Pi}, {t, 0, 2 Pi}]]; DiscretizeGraphics[p2] (*The function DiscretizeGraphics is not implemented for \ GraphicsComplex[{{0.9999999999998993`,4.487989505128125`*^-7,*) 

But p2 is a GraphicsComplex? Looking at FullForm[p2]

Mathematica graphics

Here is the FullForm for p1

Mathematica graphics

Are not p1 and p2 both GraphicsComplex ? p1 is 2D and p2 is 3D, but are they not both considered GraphicsComplex?

Why does DiscretizeGraphics seems to work on one GraphicsComplex and not the other? Here is an example that works:

v = {{1, 0}, {0, 1}, {-1, 0}, {0, -1}}; p1 = Graphics[GraphicsComplex[v, Polygon[{1, 2, 3, 4}]]]; DiscretizeGraphics[p1] 

But this does not

p2 = Graphics3D[First@ParametricPlot3D[{Cos[t], Sin[u], c Sin[t]}, {u, 0, 2 Pi}, {t, 0, 2 Pi}]]; DiscretizeGraphics[p2] (*The function DiscretizeGraphics is not implemented for \ GraphicsComplex[{{0.9999999999998993`,4.487989505128125`*^-7,*) 

But p2 is a GraphicsComplex? Looking at FullForm[p2]

Mathematica graphics

Here is the FullForm for p1

Mathematica graphics

Are not p1 and p2 both GraphicsComplex ? p1 is 2D and p2 is 3D, but are they not both considered GraphicsComplex?

Mathematica graphics

It will good to know exactly what can and what can not be discretized. I tried to find this, but could not. All what I see are examples of usages so far.

reference: http://www.wolfram.com/mathematica/new-in-10/data-and-mesh-regions/discretizing-graphics.html

Source Link
Nasser
  • 156.1k
  • 12
  • 173
  • 396
Loading