Tag Info

Hot answers tagged

3

rad[v_, h_] := v + h; (* for example *) Here are a few ways to add multiple labels in/around a graphics object: Manipulate[Labeled[Graphics3D[Cylinder[{{0, 0, 0}, {0, 0, h}}, rad[v, h]], PlotLabel -> Column[Style[#, 20] & /@ {Row[{oo[h], ooo[v]}, ","], ooo[v + h], "... so on"}, Alignment -> Center], Axes -> Automatic], ...


3

Specifying an explicit PlotRange and moving the Dynamic outside the list in Graphics3D seems to create a smoother experience: DynamicModule[{vv = {0, 0, 1}, vp = {1.3`, -2.4`, 2.`}}, Graphics3D[ Dynamic[{Cuboid[], Line[{{0, 0, 0}, vv}]}], ViewPoint -> Dynamic[vp], ViewVertical -> Dynamic[vv], Boxed -> False, SphericalRegion ...


3

Let me present a geometric approach. xrange = {-5, 5}; yrange = {-4, 4}; zrange = {-3, 3}; rrange = {1/2, 1}; xrangeext = {-#, #} &@ Max[rrange] + xrange; yrangeext = {-#, #} &@ Max[rrange] + yrange; zrangeext = {-#, #} &@ Max[rrange] + zrange; cylinders = Table[ Cylinder[Table[RandomReal /@ {xrange, yrange, zrange}, {2}], RandomReal[rrange]], ...


3

Input your line through the origin as myVec: myVec = {-2, 3, 1}; Graphics3D[{ Rotate[Cuboid[{-.5, -.5, -.5}], Dynamic[MousePosition[][[1]]/10], {-2, 3, 1}], Line[{myVec, -myVec}]}] or... myVec = {-2, 3, 1}; Graphics3D[{ Rotate[PolyhedronData["Icosahedron", "Faces"], Dynamic[MousePosition[][[1]]/10], myVec], Line[{myVec, -myVec}]}]


2

Using a set-up similar to Taiki, but taking literally the OP's request for 2D slices instead of the thin 3D slices in the OP's code: SeedRandom[1]; xrange = {-5, 5}; yrange = {-5, 5}; zrange = {-5, 5}; cylinders = Table[Cylinder[ Table[RandomReal /@ {xrange, yrange, zrange}, {2}]], {10}]; plots = Block[{reg}, reg = Compile @@ {{x, y, z}, ...


2

Euler characteristic Vertices - Edges + Faces for torus equals 0. So you can see that when you have n regular haxagons: 6n/3 - 6n/2 + n == 0 (*each vertex is shared between 3 polygons*) (*each edge is shared between 2 polygons*) is fulfilled for any n. That is why it was relatively easy to do what is done in linked answer. As Szabolcs has pointed ...


1

There's no clean way to do this without re-creating the box and axes yourself. So here is how far I managed to get by just abusing Inset: Show[RegionPlot3D[ x^2 + y^3 - z^2 > 0, {x, -2, 2}, {y, -2, 2}, {z, -2, 2}, Boxed -> True, Axes -> True, BoxRatios -> Automatic], Graphics3D[ Inset[ Graphics[ Inset[ Graphics3D[Sphere[{0, 0, ...


1

Export["mobius.stl", mobius] creates the desired file, which I can open with Photoshop CC, producing B&W top and side views. Presumably, more specialized software would give a true 3D image, although still B&W.


1

ℛ = ImplicitRegion[x^2 + y^2 <= 1 && Abs[z] < 5, {x, y, z}]; RegionPlot3D[ℛ, PlotPoints -> 100, PlotRange -> {{-2, 2}, {-2, 2}, {-6, 6}}] // Quiet slice =RegionIntersection[ℛ, ImplicitRegion[x^2 + y^2 < 2 && Abs[z - .5] < .01, {x, y, z}]]; RegionPlot3D[slice, PlotPoints -> 100, PlotRange -> {{-2, 2}, ...


1

I know it's been more than two years since the question was asked but please allow me to answer nevertheless for future reference. According to Wikipedia articles on Mollweide and equirectangular projections, the function mollweidetoequirect that converts the former to the latter can be constructed as follows: lat[y_, rad_:1] := ArcSin[(2 theta[y, rad] + ...



Only top voted, non community-wiki answers of a minimum length are eligible