Tag Info

New answers tagged

2

Are you sure NIntegrate won't work? ρ[θ_?NumericQ,ϕ_?NumericQ] := sol[θ,ϕ] SphericalPlot3D[ρ[θ,ϕ], {θ, 0, π}, {ϕ, 0, 2 π}] NIntegrate[ρ[θ,ϕ]^3/3 Sin[θ], {θ, 0, π}, {ϕ, 0, 2 π}] Assuming that sol[θ,ϕ] returns the value of your function.


2

DiscretizeGraphics already hands out a MeshRegion, so you could go along these lines: meshonly = With[{coords = MeshCoordinates[displot]}, MeshCells[displot, 1] (* 0: points, 1: lines, 2: faces ... *) /. Line[{a_, b_}] :> Line[{coords[[a]], coords[[b]]}]] Graphics3D@meshonly This will also work for your the more exotic shape you ...


1

RegionPlot can find boundaries between implicit regions even with a small number of PlotPoints. For example, you have 4 implicit regions ineqs = {-2 <= x <= 0 && -2 <= y <= 2 && x^2 + y^2 >= 1, x <= 0 && x^2 + y^2 <= 1, x >= 0 && x^2 + y^2 <= 1, 0 <= x <= 2 && -2 <= y <= ...


1

Would this work for you? As I understood, your goal was a boundary in the middle of the region. bmesh = ToBoundaryMesh[ "Coordinates" -> {{0., 0.}, {1., 0.}, {1., 1.}, {0., 1.}, {.5, 0}, {.5, 1}}, "BoundaryElements" -> {LineElement[{{1, 2}, {2, 3}, {3, 4}, {4, 1}, {5, 6}}]}] bmesh["Wireframe"] mesh = ToElementMesh[bmesh]; mesh["Wireframe"] ...


6

A quick hack: With[{mesh = DiscretizeGraphics@PolyhedronData["TruncatedIcosahedron", "Edges"]}, Show[ Graphics3D[{Opacity[1/2], Sphere[{0, 0, 0}, 0.999]}, Lighting -> {{"Ambient", White}}, Boxed -> False], MeshPrimitives[mesh, 0] /. Point[p_] :> Graphics3D[{Green, EdgeForm[None], MeshPrimitives[ DiscretizeRegion@ ...


16

It seems to me that the logo has three semitransparent layers of triangle meshes. One can start with discretized sphere reg = DiscretizeGraphics[Sphere[], MaxCellMeasure -> {"Length" -> 0.8}] Or with Simon's Geodesate. Then the function for disks in 3D is helpful disk[pos_, {nx_, ny_, nz_}, r_, n_: 16] := With[{θ = ArcTan[Sqrt[nx^2 + ny^2], nz], ...


10

Quite long since there are arcs not lines, here is the code for them: An efficient circular arc primitive for Graphics3D disk = Scale[Sphere[{0, 0, 1.02}, .05], {1, 1, .2}]; Composition[ Graphics3D[{#, Opacity@.2, Sphere[{0, 0, 0}, 1]}, ImageSize -> 500, Lighting -> "Neutral"] & , { Green, GeometricTransformation[disk, ...


6

Not quite what you asked for, but here is a non-random approximation: Needs["PolyhedronOperations`"] Graphics3D[{ Style[Sphere[{0, 0, 0}, 0.95], Opacity[0.5], Lighting -> None, Glow[White]], FaceForm[], EdgeForm[Darker@Green], PointSize[Large], Darker@Green, N[Geodesate[PolyhedronData["Icosahedron", "Faces"], 2]] /. p_Polygon :> {p, ...


0

Based on the comment, is this what you are looking for? << NDSolve`FEM` em = ToElementMesh[Disk[]] Export["mesh.txt", em["Coordinates"], "Table"] em["Coordinates"] extracts the coordinates and the Table export format is just a tab-separated plaint text table. This method will not preserve the precise cells, only the vertex coordinates.



Top 50 recent answers are included