Tag Info

Hot answers tagged

10

Changing the rendering engine to BSPTree seems to help for me: SetOptions[$FrontEnd, RenderingOptions -> {"Graphics3DRenderingEngine" -> "BSPTree"}] Not sure if this is the best solution, but do try it out.


8

RegionMeasure chooses a method which is slow when exact non-rational coefficients are present. I will correct this for a future version. Thanks for pointing it out. In Mathematica 10 the example works fast with approximate coefficients. In[1]:= Timing@RegionMeasure@N@ RegionIntersection[ Tetrahedron[{{0, 0, Sqrt[3/2]}, {2/Sqrt[3], 0, ...


8

It appears to be a bug in computing the vertex normals at the step. Here's are the vertex normals: c = cylinderPlot3D[f, 0.6]; normals = FirstCase[c, GraphicsComplex[pts_, __, VertexNormals -> vn_, ___] :> Line[Transpose@{pts, pts + vn}], -1]; Show[c, Graphics3D[{Opacity[0.1], normals}]] It looks like the HeavisideTheta function is not being ...


7

One way to do this is to covert the 2D graphics primitives to an equivalent 3D primitive using a set of rules. It's not so simple as tacking on the z-coordinate to every list of two numbers. Sometimes your list of two numbers might not be a 2D point. So these rules must specifically target the bits which we know are coordinates. As a start we can transform ...


7

This is the result of Plot Themes. This restores the old behavior: SetOptions[ParametricPlot3D, PlotTheme -> None]; More specifically the default Theme results in embedded Lighting values: Cases[ ParametricPlot3D[{f[t, z] Cos[t], f[t, z] Sin[t], -z}, {t, -Pi, Pi}, {z, 0.35 Pi, Pi}, Mesh -> None, PlotStyle -> Specularity[0], PlotTheme -> ...


6

You could also do: g[z_] := ParametricPlot3D[{{2 Cos[t] + Cos[z t], 2 Sin[t] - Sin[z t], z}, {3 Cos[t], 3 Sin[t], z}, {Cos[t], Sin[t], z}}, {t, 0, 2 Pi}, PlotStyle -> {{Thick, Hue[z/5]}, Black, Black}]; then, plt = Show[Table[g@z, {z, 2, 5}], PlotRange -> All] You can rescale as desired wrt box ratios or z. The following is a ...


5

Considering the use of the old utility MakePolygons[] by Roman Maeder, as well as the year Hanson's paper appeared, I believe this was done during the time one still had to load a package to be able to use ParametricPlot3D[]. Since ParametricPlot3D[] has been built-in for quite a while now, please allow me to present a modernized plot of the Fermat surface ...


5

Confirmed. These have already been implemented, but did not make it in time for the 10.2 release. DiscretizeRegion should work, however.


4

This works for me: R2 = Cylinder[{{0, 0, -0.1}, {0, 0, 0.1}}, 1]; DBC1 = {DirichletCondition[ u[x, y, z] == 0, (-1 <= x <= -0.8 \[And] Abs[y] <= 0.6 \[And] Abs[z] == 0.1)], DirichletCondition[ u[x, y, z] == 1, (0.8 <= x <= 1 \[And] Abs[y] <= 0.6 \[And] Abs[z] == 0.1)]}; Potential = NDSolveValue[{Laplacian[u[x, y, ...


4

Edit In my opinion, what is asked for is more easily done when the button graphics and the model graphics are kept in separate lists. Manipulate[ Column[{ Graphics3D[ MapIndexed[ If[FreeQ[u, models[[#2[[1]]]]], Button[#[[1]], AppendTo[u, models[[#2[[1]]]]]], Button[#[[1]], u = DeleteCases[u, models[[#2[[1]]]]]]] ...


2

Using the above solution of user21 you might look at the StreamPlot as follows: Show[{ StreamPlot[ Evaluate[{D[Potential, x], D[Potential, y]} /. z -> 0], {x, -1, 1}, {y, -1, 1}] // Quiet, RegionPlot[RegionDifference[Rectangle[{-1, -1}, {1, 1}], Disk[]], PlotStyle -> Opacity[1]] }] yielding the following: Here the code ...


2

You can use all of Three‚ÄźDimensional Graphics Primitives like so; a = {1, 1, 1}; b = {1, -1, 2}; Graphics3D[{Red, Arrow[{a, b}]}, Axes -> True, Boxed -> True, AxesLabel -> {x, y, z}] If useful, WA also can process this information, check the parametric info; And there is a verry nice Reference on this Site: Plot points, line and plane in ...


2

To expand on Nikie's comment... Graphics3D[Arrow[{{1, 1, 1}, {1, -1, 2}}], Axes -> True, AxesLabel -> {"X", "Y", "Z"}, ImageSize -> Large] Arrow is a symbolic graphics primitive. Graphics3D is a function to draw graphics primitives.


2

Working with GraphicsComplex retains a degree of flexibility. For instance, Graphics3D[GraphicsComplex[p[[1, 1]], Line[Rest@Cases[p, Line[z__] :> z, Infinity]]]] gives the Mesh in 3D. (Rest@ deletes the perimeter of the surface.) If, instead, a plot of the points in 3D is desired, use Graphics3D[GraphicsComplex[p[[1, 1]], ...


2

Expanding @Guess comment: p1 = Join @@ Cases[Normal@p, Line[x1__] :> x1, Infinity]; ListPlot[Most /@ p1] p1 = Join @@ Cases[Normal@p, Line[x1__] :> {RGBColor @@ RandomReal[{0, 1}, 3], Line[Most /@ x1]}, Infinity]; Graphics[p1, AspectRatio -> 1/GoldenRatio]


2

pts = Table[{t, Sin[t]}, {t, 0, 2 \[Pi], \[Pi]/4}]; Graphics[{Arrow[BSplineCurve[pts]]}] For you then: z = 0.09; c = Table[{0.03 Sin[20 \[Phi]], \[Phi], 0.05}, {\[Phi], 0.8, 1.1, 0.01}]; d = RotationMatrix[\[Theta], {0, 0, 1}]; e = Graphics3D[{Arrowheads[0], Red, Arrow[BSplineCurve[ Table[c.d, {\[Theta], 0, 2 \[Pi], \[Pi]/15}]]]}]; a = ...


2

With[{n = 5}, Module[{ prob = Union[ Table[ PDF[MultinomialDistribution[n, {.5, .5}], {k, n - k}], {k, -1, n}]], max}, max = Max[prob]; Row[{ DiscretePlot3D[ PDF[MultinomialDistribution[n, {.5, .5}], {x, y}], {y, 0, n}, {x, 0, n}, AxesLabel -> (Style[#, 12, Bold] & /@ {"y", "x", ...


1

I figure out another way that allows you to compose the display graphics objects. This feature will probably satisfy some different requirement. If you want to control the display of a molecule, this answer could help. The idea is similar to the discussion above. Manipulate[ Column[{ Graphics3D[ MapThread[ If[ FreeQ[u, #2[[1]]], ...



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