graphics3d – Unable to affect mesh regions with DiscretizeGraphics

Problem

On the sphere, it is easy to control the resolution of the mesh in DiscretizeGraphics using the MaxCellMeasure attributes of Length and Area.

But these tricks do not seem to work on the cuboid. For example, varying the length from 1000 to 0.001 produces this same mesh.

DiscretizeGraphics[Graphics3D[Cuboid[{0, 0, 0}, {50, 3, 4}]], MaxCellMeasure -> {"Length" -> 10.0}]

Mesh

Question

How does one control the mesh resolution in this case?

mac os x – Why is Graphics3D lighting different when rotating?

Mathematica v12.1 on macOS Catalina 10.15.5. I’m getting weird Lighting behavior in Graphics3D in the sense that the rendered object appears “dark” unless it is being actively rotated with the mouse, during which time the lighting seems to spring to life, only to go dark again the moment the mouse button is released.

My simple code is:

Graphics3D(Sphere())

See screenshots below illustrating the behavior in question. I presume this is not normal. I’d much prefer the lighting to appear as in the “active rotating” view at all times, if possible. Can anyone explain if/what I’m doing wrong?

“Static” view (while not actively rotating):

(enter image description here)

“Rotating” view (while actively rotating with mouse):

enter image description here

EDIT:
If it helps/matters, AbsoluteOptions(Graphics3D(Sphere())) gives me

{AlignmentPoint -> Center, AspectRatio -> Automatic, 
 AutomaticImageSize -> False, Axes -> False, AxesEdge -> Automatic, 
 AxesLabel -> None, AxesOrigin -> Automatic, AxesStyle -> {}, 
 Background -> None, BaselinePosition -> Automatic, BaseStyle -> {}, 
 Boxed -> True, BoxRatios -> {1., 1., 1.}, BoxStyle -> {}, 
 ClipPlanes -> None, ClipPlanesStyle -> Automatic, 
 ColorOutput -> Automatic, ContentSelectable -> Automatic, 
 ControllerLinking -> False, ControllerMethod -> Automatic, 
 ControllerPath -> Automatic, CoordinatesToolOptions -> Automatic, 
 DisplayFunction -> Identity, Epilog -> {}, FaceGrids -> None, 
 FaceGridsStyle -> {}, FormatType -> TraditionalForm, 
 ImageMargins -> 0., ImagePadding -> All, ImageSize -> Automatic, 
 ImageSizeRaw -> Automatic, LabelStyle -> {}, Lighting -> Automatic, 
 Method -> Automatic, PlotLabel -> None, 
 PlotRange -> {{-1., 1.}, {-1., 1.}, {-1., 1.}}, 
 PlotRangePadding -> Automatic, PlotRegion -> Automatic, 
 PreserveImageOptions -> Automatic, Prolog -> {}, 
 RotationAction -> "Fit", SphericalRegion -> Automatic, 
 Ticks -> Automatic, TicksStyle -> {}, TouchscreenAutoZoom -> False, 
 ViewAngle -> Automatic, ViewCenter -> {0.5, 0.5, 0.5}, 
 ViewMatrix -> Automatic, ViewPoint -> {1.3, -2.4, 2.}, 
 ViewProjection -> Automatic, ViewRange -> All, 
 ViewVector -> Automatic, ViewVertical -> {0., 0., 1.}}

And I’m using the Default style sheet with no modifications.

graphics3d – How can the surface thickness of the diagram be set exactly?

I have a Mathematica version 12.0

I definitely want to convert the following diagram to an STL file.

So I set the PlotPoints to 120 and the surface of the chart is very smooth.

 ContourPlot3D[Sin[x] Sin[y] Sin[z]+Sin[x] Cos[y] Cos[z]+Cos[x] Sin[y] Cos[z]+Cos[x] Cos[y] Sin[z]==0, {x,-2Pi,2Pi},{y,-2Pi,2Pi},{z,-2Pi,2Pi},Extrusion->1, Mesh->False, PlotPoints->120]

However, the thickness specified in this diagram is not as accurate as the value of PlotPoints.

Is there a way to set the thickness exactly?

Enter the image description here

graphics3d – 2D and 3D graphics that project a world map onto Icosahedron

I want to create 2D and 3D graphics of icosahedra with a continuous world map projected on them. An example is provided as follows.

Example of a 2D and 3D icosahedron with world map as a texture

It is trivial to create 3D icosahedra with GraphicsComplex. We can add texture. However, I'm not sure how to add the continuous texture. Does anyone have any suggestions? Many thanks!

graphics3d – ring segment in 3D

I want to draw a segment of a circular ring in three dimensions with constant thickness (like a thick washer, but over a limited range of angles). This shows the form:

RegionPlot3D(
 (5 < Sqrt(x^2 + y^2) < 6 && 5 < z < 6 && 0 < ArcTan(x, y) < .5) ,
 {x, -10, 10}, {y, -10, 10}, {z, -10, 10},
 Mesh -> None,
 PlotPoints -> 100,
 PlotStyle -> Directive(Opacity(0.5), Red))

Ring segment

However, this requires an extremely high number of PlotPoints (which is undesirable in my full figure, which contains many dozen such shapes). I also want to maintain and impose the thin edge lines Opacity(), Colors, etc., as found in all Graphics3D basic elements such as Cylinder().

I could work with regions like this start:

Region(
 RegionDifference(Cylinder({{0, 0, 0}, {0, 0, 1}}, 1),
  Cylinder({{0, 0, 0}, {0, 0, 1}}, 1/2)))

Difference of cylinders

But again I don't get the thin edge lines and the ability to adjust the opacity and color as I am looking for.

There is a perfect graphic element in two dimensions:

Graphics({Opacity(0.5), Orange, Annulus({0, 0}, {1/2, 1}, {0, .3})})

Orange ring segment

What I am looking for would be called Annulus3D. In the absence of such a 3D primitive, how should I draw what I am looking for?

graphics3d – How can I look directly into the center of the TextureCoordinateFunction?

By manually setting the coefficients inside TextureCoordinateFunction I can set the numbers on each ball to face the camera:

Graphics3D({
  Opacity@0.5, Blue, Cuboid({-2, -2, -2}, {2, 2, 0}),
  Opacity@1, Sequence @@ MapThread(
    Translate(
      SphericalPlot3D(#3, {theta, 0, Pi}, {phi, 0, 2 Pi}, 
        Mesh -> None, 
        TextureCoordinateFunction -> ({#1, 0.3*#2 + 0.7*#3} &), 
        PlotStyle -> 
         Texture(Show@
           Graphics@Text@Style(ToString@#1, 100)))((1)), #2) &, {{8, 
      5, 13, 3},
     {{-1, -1, 0}, {-1, 1, 0}, {1, -1, 0}, {1, 1, 0}}, {0.2, 0.4, 0.4,
       0.2}})
  }, Boxed -> False, ViewPoint -> {-5, -9, 3}, 
 ViewVertical -> {0, 0, 1}, PreserveImageOptions -> False)

Enter the image description here

How can I script the coordinates it contains? TextureCoordinateFunction So the numbers come before ViewPointwhile maintaining the orientation of the cube?

The solution for displaying the coordinates of a city from above does not take into account that I also want to look at the cube from a certain perspective.

graphics3d – Extracts ViewVertical from ViewMatrix

Accepted ViewMatrix Setting the form {t, p}how can you determine that ViewVertical?

Let's say we have

vm = {
  {
    {0.10402567469787839`, 0.05634724046135078`, 0., 0.06671318616834762`}, 
    {-0.033304268882567746`, 0.061484804090894324`, 0.09542953968274223`, -0.10079092470343654`}, 
    {0.045451481623891156`, -0.08391042761333754`, 0.06992535634444795`, -0.030220722382910785`}, 
    {0.`, 0.`, 0.`, 1.`}
  }, 
  {{1.`, 0.`, 0.`, 0.5`}, {0.`, 1.`, 0.`, 0.5`}, {0.`, 0.`, -1, -0.5`}, {0.`, 0.`, 0.`, 1.`}}
};

The (normalized) ViewPoint can be found with

qr = QRDecomposition(vm((1)));

vpn = Sign(Diagonal(qr((2, 1 ;; 3, 1 ;; 3)))) qr((1, 1 ;; 3, 3))
{0.384185, -0.709265, 0.591054}
Norm({1.3, -2.4, 2}) * vpn
{1.3, -2.4, 2.}

Can the ViewVertical can be found in a similar way?

Draw the space defined by implicit equations using pure functions (ContourPlot3d, RegionPlot3D, Graphics3D)

Is there a simple, elegant way to draw implicit curves or surfaces in 2D or 3D when the input is given? reg (List of intervals, i.e. cubes) and f (List of pure functions, i.e. equations)?
For curves in 3D (i.e. 2 equations in 3 variables) Contourplot3D is problematic. Why does

Graphics3D({Red,MeshPrimitives(DiscretizeRegion@ImplicitRegion(x^2+y^2+z^2-4==0&&x^2+y^2-1==0,{x,y,z}), 1)})

Work but when I run

reg={{-2,2},{-2,2},{-3,3}}; f={#1^2+#2^2+#3^2-4&,#1^2+#2^2-1&}; 
tr=Transpose; n=Length@reg; e=Length@f; v=Table(Unique(),{i,n});  
o={And@@Table(fi@@v==0,{fi,f}),Sequence@@tr@Prepend(tr@reg,v),PlotRange->All,ContourStyle->Red};
Graphics3D({Red,MeshPrimitives(DiscretizeRegion@ImplicitRegion(o((1)),v),1)})

are there any errors back?