# Tag Info

## New answers tagged graphics3d

1

I am not sure how well the following is answering your question. Her is the general idea: Write a function that finds distances from an arbitrary point to each of the lines defined by the polygons sides (line segments). Use some sort of dynamic manipulation to plot the most interesting point-segment distances. I assume it is important to stay in 3D, but ...

0

Simply use Show. This creates a Graphics3D containing a Raster3D. In general, expressions convertible to Graphics are converted with Show. This works for images, 3D images, graphs, and possibly other things I've forgotten about. But I'm not sure Lighting is ever used in the rendering of 3D images, regardless of whether they are contained in an Image3D or ...

2

If you just want to make a plot of the region in question, this is good RevolutionPlot3D[{{x, (x + 8)^4}, {x, 8 x + 64}}, {x, -8, -6}, {th, 0, 2 π}, Mesh -> None, Axes -> False, Boxed -> False, BoxRatios -> {1, 1, .3}] But try as I might, I can't seem to find a way to get the volume of the region using Volume - this would involve ...

2

Here's a symbolic-algebraic way, based on the cylindrical algebraic decomposition (CAD) that Reduce computes. (* Disk/Washer method *) Clear[x, y, z]; eqns = {y == (x - 2)^4, 8 x - y == 16}; axis = x == 10; {depV} = Variables[Subtract @@ axis]; {indepV} = Complement[{x, y}, {depV}]; vars = {indepV, depV}; components = Map[ Reduce[#, vars] &, (* ...

13

Here is an approach based on direct construction of Image3D from ImageData. The basic idea is taken from the subsection "Volume Creation" of the section "Scope" on the Documentation page for Image3D, some other ideas are from the answer by Kuba: moon = Import[ "https://upload.wikimedia.org/wikipedia/commons/f/f0/Full_Moon_as_Seen_From_Denmark.jpg"]; ...

1

I've always wished the moon was more habitable. Starting from the OPs picture: moon = ColorConvert[ Import["https://upload.wikimedia.org/wikipedia/commons/f/f0/Full_\ Moon_as_Seen_From_Denmark.jpg"], "Grayscale"]; ReliefPlot[ImageData[moon], ColorFunction -> "GreenBrownTerrain"]

14

moon = Import[ "https://upload.wikimedia.org/wikipedia/commons/f/f0/Full_Moon_as_\ Seen_From_Denmark.jpg"] Here are two ways to get something like that: with Texture or with ColorFunction Texture: pic = ImageCrop @ ImageResize[ColorConvert[moon, "Grayscale"], Scaled@.3] Worse quality than is possible with this image but I had to make it smaller ...

5

One way is to use MeshFunctions to plot F[..] = 0: MeshFunctions -> {Function[{x, y, z, s1, s2}, Cos[s1] + Cos[s2] + Cos[s1] Cos[s2] + 1]}, Mesh -> {{0}}, MeshStyle -> {Directive[Thick, Lighter@Blue]} The function F is the mesh function Function[{x, y, z, s1, s2}, Cos[s1] + Cos[s2] + Cos[s1] Cos[s2] + 1] where the equation F[..] == 0 is ...

8

So I can't seem to find a nice plottable form for the normal modes of an elastic sphere, if you can please let me know. This talks about the vector spherical harmonics, and people often show sketches of the displacements involved in the fundamental and overtones for the spheroidal and toroidal modes, but I don't find plottable equation forms for them (or I ...

1

As pointed out by Ivan Sterling, you cannot simply restrict the PlotRange, as this will not be respected when exporting to "STL". Take Louis's example, ParametricPlot3D[{(2 + Cos[v]) Cos[u], (2 + Cos[v]) Sin[u], Sin[v]}, {u, 0, 2 Pi}, {v, 0, 2 Pi}, PlotRange -> {{0, π}, {0, π}, All}] Export["test.stl", %] // Import One method to make sure ...

8

You can add transparency to a color function. No need to make the whole plot to have one color. Show[SliceContourPlot3D[-z, z == fe[m, p], {m, -3, 3}, {p, -3, 3}, {z, -6, 6}, ColorFunction -> Function[{z}, Opacity[0.4, #] &@ColorData["TemperatureMap"][z]], ContourStyle -> None]]

8

You can use ContourShading with Directives to achieve both. α = 1; β = 1; tmp = 0.1316; ρ = 0.01; t = -1.5; fe[m_, p_] := 1/2*(t - 1)*p^2 + 1/4*p^4 + (1/2*α^2*β*m^2*(t - tmp)) + 1/4 α^2*(β)*(m^4) + 1/2*(ρ*(p^2)*(m^2)) ; SliceContourPlot3D[-z, z == fe[m, p], {m, -3, 3}, {p, -3, 3}, {z, -6, 6}, ContourShading -> Directive[Red, ...

4

Perhaps not entirely what you'd want but for fun sake: Example: SliceContourPlot3D[-z, z == fe[m, p], {m, -3, 3}, {p, -3, 3}, {z, -6, 6},ContourShading -> None]; Output: Reference: ContourShading

0

Works as intended on 10.0 for Mac OS X x86 (64-bit) (December 4, 2014), see also STL (.stl) pp1 = ParametricPlot3D[{(2 + Cos[v]) Cos[u], (2 + Cos[v]) Sin[u], Sin[v]}, {u, 0, 2 Pi}, {v, 0, 2 Pi}] Export["MathematicaParametricSurface.stl", pp1] pp1 = ParametricPlot3D[{(2 + Cos[v]) Cos[u], (2 + Cos[v]) Sin[u], Sin[v]}, {u, 0, 1 Pi}, {v, 0, 1 Pi}] ...

1

Plot3D[x^2 - y^2 + x*y, {x, -10, 10}, {y, -10, 10}] Which outputs a 3D graph over the specified domains. You have to specify a domain in order to determine minimum or maximum as global minimum/maximum are at positive and negative infinity respectively. It is pretty clear from the equation and the plot that there is a saddle point at (0,0) however.

7

From Version 10.2 upwards we can now use SliceContourPlot3D and SliceDensityPlot3D to achieve this: SliceContourPlot3D[x + Sin[5 z] + y^2, "CenterCutBox", {x, -0.5, 0.5}, {y, -0.5, 0.5}, {z, -0.5, 0.5}, Boxed -> False, Axes -> False, Contours -> 20, ColorFunction -> Hue] You can increase Contours to 10 or higher to ...

6

Update: Speaking of "pie slices", you can use SectorChart3D directly as follows: ClearAll[sliceF] sliceF[opts : OptionsPattern[]][x_, y_, r_: {0, 2}, h_: 2] := SectorChart3D[{{(y - x) Degree, r[[2]], h}, {(360 - y + x) Degree , r[[2]], h}}, SectorOrigin -> {{x Degree}, r[[1]]}, opts] sliceF[BoxRatios -> 1, Axes -> True][30, 70] ...

4

See if the following can give you a starting point: radius = 3; height = 3; angle = 30 Degree; RegionPlot3D[ x^2 + y^2 <= radius^2 && x >= 0 && 0 <= y <= ArcTan[angle] x && 0 <= z <= height, {x, 0, 4}, {y, 0, 4}, {z, 0, height}, Mesh -> None, PlotPoints -> 100, PlotRangePadding -> {Scaled[0.05], ...

2

You can move the patch around the left torus to see where it's mapped on the right torus by func. func = Function[{u, v}, {u + v, 2 u}]; func = Function[{u, v}, {u + v, 2 u}]; nmesh = 10; mesh = {(-0.5 + Range[-nmesh, 2 nmesh])/nmesh, (-0.5 + Range[-nmesh, 2 nmesh])/nmesh}; param = Function[{u, v}, {(2 + Cos[2 π v]) Sin[2 π u], (2 + Cos[2 π ...

40

I'd like to expand on Quantum_Oli's answer to give an intuitive explanation for what's happening, because there's a neat geometric interpretation. At one point in the animation it looks like there is a circle of colored dots moving about the center, this is a special case of so called hypocycloids known as Cardano circles. A hypocyloid is a curve generated ...

51

Edit: Added the reversal and some refinements ω = 1; posP[t_, φ_] := Sin[ω t + φ] {Cos[φ], Sin[φ]} posL[φ_] := {-#, #} &@{Cos[φ], Sin[φ]} Animate[ Graphics[{PointSize[0.02], Table[{Black, Line[posL[π i]], Hue[i], Point[posP[t, π i]]}, {i, 0, 1, 1/(3π-Abs[9.43-t])}] }, PlotRange -> {{-1.5, 1.5}, {-1.5, 1.5}} ], {t, 0, 6π, 0.2} ]

3

In this case, the KnotData evaluates directly to a parametric curve, KnotData["Trefoil", "SpaceCurve"] (* {Sin[#1] + 2 Sin[2 #1], Cos[#1] - 2 Cos[2 #1], -Sin[3 #1]} & *) so that no sampling is necessary. ParametricPlot3D[ KnotData["Trefoil", "SpaceCurve"][t], {t, 0, 2 \[Pi]}, PlotRange -> All, Axes -> None, Boxed -> False, ViewPoint ...

23

What you need to do here is to generate a ParametricPlot to give the 2D goat/silo problem, and then we can rotate it with RevolutionPlot3D. From reading the page on MathWorld, we can see that we need to make a circle involute to describe the portion of the area where the goat's circle is limited by the presence of the silo. In Cartesian coordinates, this ...

1

After help from everybody. this question has been resolved. we can do as follows; α= 1; β= 1; tmp = 0.1316; ρ= 0.01; t = -2; fe[m_, p_] := 1/2*(t - 1)*p^2 + 1/4*p^4 + (1/2*α^2*β*m^2*(t - tmp)) + 1/4 α^2*(β)*(m^4) + 1/2*(ρ*(p^2)*(m^2)) Show[SliceContourPlot3D[ z - fe[m, p], {z == -3}, {m, -3, 3}, {p, -3, 3}, {z, -6, 6}], SliceContourPlot3D[-z, ...

3

One or both of the following plots may be what you looking for. α = 1; β = 1; Tmp = 0.1316; ρ = 0.01; T = -2; FreeEnergy = 1/2*(T - 1)*P^2 + 1/4*P^4 + (1/2*α^2*β*M^2*(T - Tmp)) + 1/4 α^2*(β)*(M^4) + 1/2*(ρ*(P^2)*(M^2)); Plot[Evaluate[FreeEnergy /. M -> 0], {P, -2.35669, 2.35669}] Plot[Evaluate[FreeEnergy /. P -> 0], {M, -2.05216, ...

1

Manipulate[Module[{x, y}, mysoln = Solve[{x, y}.Inverse[( { {a[[1]] a[[1]], \[Rho] a[[1]] a[[2]]}, { \[Rho] a[[1]] a[[2]], a[[2]] a[[2]]} } )].{x, y} == 1, x, Reals] // Quiet; Show[{ ParametricPlot3D[{{x /. mysoln[[1]], y, -.2}, {x /. mysoln[[2]], y, -.2}}, {y, -5, 5}, PlotRange -> {{-5, 5}, {-5, 5}, ...

3

Assuming this is not just ContourPlot. Just minor changes: α = 1; β = 1; tmp = 0.1316; ρ = 0.01; t = -2; fe[m_, p_] := 1/2*(t - 1)*p^2 + 1/4*p^4 + (1/2*α^2*β*m^2*(t - tmp)) + 1/4 α^2*(β)*(m^4) + 1/2*(ρ*(p^2)*(m^2)) Now, Show[SliceContourPlot3D[ z - fe[m, p], {z == -4}, {m, -2.05216, 2.05217}, {p, -2.35669, 2.35669}, {z, -5, 0}], ...

3

Just to record an answer to the question, here are two possible ways of defining a cone: c1 = Cone[{{1, 1, 1}, {0, 0, 0}}, Norm[{1, 1, 1}] Tan[0.186393]]; c2 = {CapForm["Butt"], Tube[{{1, 1, 1}, {0, 0, 0}}, {Norm[{1, 1, 1}] Tan[0.186393], 0}]}; Table[ Graphics3D[{Thick, Line[{{-1, -1, -1}, {1, 1, 1}}], Line[{{1, -1, -1}, {-1, 1, 1}}], Line[{{-1, ...

0

There's a very nice (and more complete) solution here : http://community.wolfram.com/groups/-/m/t/490130 However, I don't understand that code. Maybe someone could built another solution from it, to be exposed here ?

2

This is a bit late, but I only recently learned of the "AdjacentFaceIndices" property in PolyhedronData[], and this is what led me to figure out how to cleanly deal with generating the required triangles. First, generate the extra pentagram points from the original dodecahedron's vertices: np = First @ Normal[PolyhedronData["Dodecahedron", "Faces"]] /. ...

9

You can use FoldList to generate evolution of your system. You need a function that propagates your particles in time. Every time you apply your function to state at time $t$ you obtain your state at time $t+dt$. Let's make such function for one particle in 1D. Tr1D[{x_, v_}, dt_, L_] := Module[{u, w}, u = x + v dt; {u, w} = If[u < L, {u, v}, {L - ...

9

ok, this is cheating but since your gas is non-interacting it works. 3 dimensions or 1 dimensions is the same since the collisions only change momentum in the normal direction, ie we assume point particles and no friction. A collision with a wall the only thing it does is to invert the velocity. So you can think of the particle moving at a constant speed ...

4

Using ParametricPlot3D as suggested by @J.M. in the OP comments. With functions f[x_] := 0.5 x + 0.5 g[x_] := -0.5 x + 0.5 h[x_] := 0.5 Then ParametricPlot3D[ Evaluate[MapIndexed[{First@#2, u, v #1[u]} &]@{f, g, h}], {u, -1, 1}, {v, 0, 1}, PlotRange -> Full, PlotStyle -> Opacity[.85], Mesh -> None] ParametricPlot3D has attribute ...

7

So the idea here is to generate a plot, use the Filling->Axis option, then extract the polygons from that. Options[fencePlot] = {"YValues" -> Automatic, "Colors" -> Automatic}; fencePlot[funcs_, {x_, xmin_, xmax_}, opts : OptionsPattern[{fencePlot, Graphics3D}]] := Module[{yv, pgons, colors}, yv = OptionValue["YValues"] /. Automatic ...

4

Building off of Dr. belisarius's answer: is this what you're looking for? n = 20; i = ImageResize[ColorNegate@Image[carpet[2]], n] pixpos = PixelValuePositions[i, 0.]; pyramids = Pyramid[{Append[# + {1/2, 1/2}, 0], Append[# + {1/2, -1/2}, 0], Append[# + {-1/2, -1/2}, 0], Append[# + {-1/2, 1/2}, 0], {(n + 1)/2, (n + ...

Top 50 recent answers are included