Tag Info

Hot answers tagged

12

My approach is based on the basic Frenet Trihedron formulas (which were implemented in v.10) and also some basic geometric transformations (matrix rotation and translation). It can be applied to extrude any 2D polygon. 1. Choice of the path I modified a little bit the OP's path for the sake of keeping the 3D graphics simple to view. path[u_] := {Sin[u], ...


7

It's easiest to control the position and size of all 3D objects if they are combined in the same Graphics3D. For an STL file, this could be done as follows (I didn't want to look for a hand model, so I chose the seashell model built into ExampleData, since it's also chiral): Export["g.stl", ExampleData[{"Geometry3D", "Seashell"}]]; g = Import["g.stl"]; ...


6

The faster/slower controls can be controlled using AppearanceElements. The following values can be used in Manipulate: "StepLeftButton", "StepRightButton", "PlayPauseButton", "FasterSlowerButtons", "DirectionButton" Take the ones you want to use (you wanted to drop "FasterSlowerButtons"): Manipulate[ Graphics3D[{Hue[.12], {Sphere[{0, 0, 0}, .1]}, ...


5

Following Stelios suggestion without = ContourPlot3D[ x^4 + y^4 + z^4 - (x^2 + y^2 + z^2)^2 + 3 (x^2 + y^2 + z^2) == 3, {x, -2, 2}, {y, -2, 2}, {z, -2, 2}, RegionFunction -> Function[{x, y, z}, x^2 + y^2 + z^2 > 1.5^2]]


4

myThumb = Import["...../15809_Thumbs_Up_v1_v4.stl"]; Show[myThumb, Graphics3D[ { {Red, Thick, Arrow[{{0, 0, 0}, {0, 0, -20}}]}, {Green, Thick, Arrow[{{0, 0, 0}, {0, -20, 0}}]}, {Blue, Thick, Arrow[{{0, 0, 0}, {-20, 0, 0}}]}, {Text[Style["x", Italic, Blue, 24], {-22, 0, 0}]}, {Text[Style["y", Italic, Red, 24], {0, 0, -22}]}, ...


4

Change the AnimationRate in the iterator: Manipulate[ Graphics3D[{Hue[.12], {Sphere[{0, 0, 0}, .1]}, {FaceForm[], Sphere[{0, 0, 0}, .8 + .02]}, Gray, Table[Line[ Table[{.8}[[i]] {Cos[tt], Sin[tt], 0}, {tt, 0, 2 Pi, 2 Pi/100.}]], {i, 1}], Blue, Sphere[.8 {Cos[t], Sin[t], 0}, .02]}, PlotRange -> All, ImageSize -> {400, ...


3

There's a related question, A problem on generating convex hull, and I can adapt my answer there to this case. The basic approach is to map the points in the plane to a 2D coordinate system, find the hull in 2D, and embed the hull in the plane in 3D. I inserted an extra point in the interior, because that sometimes causes trouble when it is dropped in the ...


3

If you generate random points using p = RandomReal[{-1, 1}, {5, 3}] then your code works fine -- suggesting that the problem has to do with the fact that all your points lie in a plane. A simple solution is to perturb one of the points slightly outside the plane: alfa = 0.75; p = {{1,0,0}, {alfa,0,1-alfa}, {alfa,1-alfa,0}, {0,alfa,1-alfa}, ...


3

Here is a version that takes as a reference a Plot of the two functions. It will only work if the x-range and the y-range are of the same magnitude. If not the placement of the axes labels will be screwed. (* Plot the original function *) X[ϵ_] := 1 - 0.5 ϵ x[r_] := -0.5 + 0.5 r p = Plot[{X[r], x[r]}, {r, -1, 1}]; (* Get the attributes of the plot p *) pl = ...


2

Xf[ϵ_] := 1 - 0.5 ϵ xf[r_] := -.5 + 0.5 r; blueaxis = {Directive[Blue, Thick, Arrowheads[{0, .05}]], Arrow @@ # &}; redaxis = {Directive[Red, Thick, Arrowheads[{-.05, 0}]], Arrow @@ # &}; txtF = Text[Style[#, 20, Italic], #2] &; axeslabels = txtF @@@ Transpose[{{"ε", "r", "+X", "-X", "-(-X)", "+(-X)"}, {{.1, 2.7}, {-.1, -.7}, {.8, .3}, ...


2

ListPlot3D usually produces a surface mesh , but you seem to want points as output. It is easy to produce those just using Point. clrs = RGBColor /@ Sort@RandomReal[1, {50, 3}]; pts = Sort@RandomInteger[10, {50, 3}]; Show[Graphics3D@MapThread[{PointSize@Large, #2, Point[#1]} &, {pts, clrs}],Axes->True]


2

You haven't defined Axes3D[]. Nevertheless: n = ListPointPlot3D[{{4, 5, 6}, {3, -3, -6}, {2, 2, 5}}, PlotLegends -> Automatic, ImageSize -> 400, PlotStyle -> PointSize[0.03], PlotRange -> {-10, 10}]; o = Graphics3D[{Red, Arrow[{{4, 5, 6}, {3, -3, -6}}]}, Axes -> True, Boxed -> False]; r = Graphics3D[{Blue, Arrow[{{4, 5, 6}, ...


1

Somehow turning on Selectable does what you need: DialogInput[Graphics3D[Cuboid[]], Deployed -> False, Selectable -> True]


1

With some bells and whistles: Manipulate[ fun := x^2 + y^2; Show[ Plot3D[fun, {x, -rng, rng}, {y, -rng, rng}, ColorFunction -> Function[{x, y, z}, Hue[z]], PlotStyle -> Opacity[opac]], Graphics3D[ {Blue, AbsolutePointSize[pt], Point[{1, 1, 1}]}]], {{rng, 2, "x & y Range"}, 1.5, 10, Appearance -> "Labeled"}, ...



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