Tag Info

Hot answers tagged

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

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 -> ...


5

I was trying to do something similar and created a useful solution. This answer uses Mathematica version 10.2.0.0. First define a region, e.g. a sphere region: region = ImplicitRegion[x^2 + y^2 + z^2 <= 10, {x, y, z}]; Now we can generate random points within this region using the function RandomPoint: pts = RandomPoint[region, 20];(*this generates ...


4

Its difficult to work with your question since you don't define your functions and variables but hopefully this example will be enough. Let's first make a table of cuboids with different z values (but using the same z-value within each cuboid so they are still rectangles). This examples uses the same x and y values for every Cuboid for simplicity, but you ...


2

Relabeling to avoid conflict with in-bulit symbols: a = {0, 0, 0}; b = {400, 0, 0}; c = {200, 400, 200}; d = {226, 137, 62}; aprime = {22, 36, 0}; bprime = {382, 33, 0}; cprime = {240, 357, 200}; c0 = {40, 0, 0}; c1 = {360, 0, 0}; c2 = {200, 360, 200}; r = 40; arc just to deal with desired arcs. Sphere for illustration. arc[p1_, p2_, p3_, n_] := With[{v1 ...


2

Kind of a part answer: It is quite easy to convert a quaternion to a Mathematica RotationMatrix. First normalize the quaternion. The first element will then be the cosine of half the rotation angle. The last 3 elements together describes the axis of rotation. q = Normalize@{1, 1, 1, 1} rm = RotationMatrix[2 ArcCos[First@q], Rest@q]


1

Is ColorFunction what you want? (The input is automatically rescaled from 0 to 1, so Rescale is unnecessary; see also ColorFunctionScaling.) GrapheMagnetique[n_] := ParametricPlot3D[ Evaluate[{x[s], y[s], z[s]} /. CourbeMagnetique[n]], {s, Smin[n], Smax[n]}, PlotStyle -> {Directive[AbsoluteThickness[1]](*,Blue*)}, ColorFunction -> ...


1

Something like ListPlot3D just that I want it to show those cuboids. If you need to place the same shape at multiple points either in 2D or 3D, the best solution is Translate. It can take more than one translation vector as the second argument. Example: pts = RandomReal[10, {20, 3}]; Graphics3D[ Translate[ Cuboid[], pts ] ]



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