Tag Info

Hot answers tagged

20

Graphics[{Circle[{0, 0}, 1, {0, Pi}], Circle[{0, 0}, .03], Line[{{1, 0}, {1, -.1}, {-1, -.1}, {-1, 0}}], Rotate[ Line[{{.03, 0}, {.6, 0}}] , #, {0, 0}] & /@ {0, Pi/2, Pi}, GeometricTransformation[ Piecewise[{ {{Red, Line[{{.8, 0}, {1, 0}}], Black, Line[{{.2, 0}, {.5, 0}}], Rotate[{Red, Text[#, {.75, 0}, {0, ...


7

This is not a protractor, but it is a related application that that serves as an example of rotated text which is the only thing missing in the protractor shown in the question. I did it a while a go and keep it near the kitchen oven: c[f_]:=5/9 (-32+f) f[c_]:=1/5 (160+9 c) cToAngle[c_]:=(c+40)/300*(2\[Pi]-5Degree) ...


6

Use Evaluate[...] rather than Evaluated -> True START EDIT: Attributes[Plot] {HoldAll, Protected, ReadProtected} Since Plot has the attribute HoldAll the first expression is initially interpretted as a single entity. To make the argument a list of two distinct entities it must be evaluated to override the HoldAll attribute. Evaluated is not a ...


5

With the arbitrary datasets datasets = {dataset1, dataset2, dataset3} = RandomReal[#, 100] & /@ {1, 2, 3}; one can pre-render the plots and add an empty plot for the case when no dataset is selected plots = Append[ MapThread[ListPlot[#1, Joined -> True, PlotStyle -> #2] &, {datasets, ColorData[97] /@ Range[3]}], ...


4

You can create a rather fast function to create a section of a cylinder of a given height combining some ParametricPlot3D using the following code: cylinderSection[h_, \[Theta]0_, \[Theta]1_, OptionsPattern[plotStyle -> Green]] := With[{r = 1}, Show[ ParametricPlot3D[ {{\[Rho] Cos[\[Theta]], \[Rho] Sin[\[Theta]], 0}, {\[Rho] ...


2

To print them one-by-one you can use Print[Labeled @@ EntityValue[#, {"Image", "Name"}]] & /@ EntityValue["PopularCurve", "Entities"]; To cycle through them you can use curves = EntityValue["PopularCurve", "Entities"]; Animate[ Labeled @@ EntityValue[curve, {"Image", "Name"}], {curve, curves}, AnimationRate -> .1 ]


2

I finally got around to fixing the routine in the math.SE answer the OP linked to. To make this answer self-contained, I'll reproduce the definitions here: GaussianCurvature[f_, {u_, v_}] := Simplify[(Det[{D[f, {u, 2}], D[f, u], D[f, v]}] Det[{D[f, {v, 2}], D[f, u], D[f, v]}] - Det[{D[f, u, v], D[f, u], D[f, v]}]^2)/ ...


1

The answer is actually very simple. PartOfGraph = Subgraph[SomeGraph,{1, 2},Options[SomeGraph]]; Strangely Mathematica does not list "Options[]" as an option under "Details and Options" of the Subgraph function...as one would naturally expect. I found this on the right under "Related" questions even though I couldn't find it through searching. So this ...


1

seg[{a_, b_}, {g_, h_}, col_, op_] := Show[ParametricPlot3D[{Cos[t], Sin[t], z}, {t, a, b}, {z, g, h}, Mesh -> False, PlotStyle -> {col, Opacity[op]}, BoundaryStyle -> {Black, Thick}], ParametricPlot3D[{u Cos[t], u Sin[t], g}, {t, a, b}, {u, 0, 1}, Mesh -> False, PlotStyle -> {col, Opacity[op]}], ParametricPlot3D[{u Cos[t], ...


1

Plot3D[Sin[x + y^2], {x, -3, 3} , {y, -2, 2}, SphericalRegion->True, RotationAction -> "Clip"]



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