Guest User

Untitled

a guest
Mar 19th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.33 KB | None | 0 0
  1. rotation[f_]:=Show[{ParametricPlot3D[{{1. (0. + x), f[x] Cos[\[Theta]], f[x] Sin[\[Theta]]}}, {x, 0, 6}, {\[Theta], 0.07, 6.21319}, MeshStyle -> Directive[Opacity[0.1]], AxesStyle -> Directive[GrayLevel[0.65], FontColor -> GrayLevel[0.25], FontOpacity -> 1], BoxStyle -> GrayLevel[0, 0.35], Lighting -> "Neutral", ViewPoint -> {3, 3, 11}, ViewVertical -> {0, 1, 0}, PlotStyle -> Directive[RGBColor[0.9, 0.885573, 0.243565], Opacity[0.8], Specularity[RGBColor[0.536507, 0.536507, 0.536507], 20]], ImageSize -> 300., BoxRatios -> Automatic, PlotRange -> Full, AxesLabel -> {x, y, z}, AxesStyle -> Directive[GrayLevel[0.65], FontColor -> GrayLevel[0.25], FontOpacity -> 1], PerformanceGoal -> Automatic], ParametricPlot3D[{{x, f[x], 0}}, {x, 0, 6}, PlotStyle -> {{Directive[AbsoluteThickness[8], RGBColor[0.2472, 0.24, 0.6]]}, {Directive[AbsoluteThickness[8], RGBColor[0.6, 0.24, 0.442893]]}}, BoxRatios -> {1, 1, 1}, AspectRatio -> 1], Graphics3D[{{{}, {}, Annotation[{RGBColor[0.24, 0.6, 0.33692], AbsoluteThickness[6], Line[{{-9694.23, 0., 0.}, {-9688.29, 0., 0.}, {-9682.34, 0., 0.}, {-9670.45, 0., 0.}, {-9646.66, 0., 0.}, {-9599.09, 0., 0.}, {-9503.95, 0., 0.}, {-9313.66, 0., 0.}, {-8901.08, 0., 0.}, {-8515.84, 0., 0.}, {-8138.16, 0., 0.}, {-7728.47, 0., 0.}, {-7346.11, 0., 0.}, {-6931.75, 0., 0.}, {-6524.94, 0., 0.}, {-6145.47, 0., 0.}, {-5734., 0., 0.}, {-5349.86, 0., 0.}, {-4973.28, 0., 0.}, {-4564.69, 0., 0.}, {-4183.44, 0., 0.}, {-3770.17, 0., 0.}, {-3364.47, 0., 0.}, {-2986.11, 0., 0.}, {-2575.73, 0., 0.}, {-2192.69, 0., 0.}, {-1777.65, 0., 0.}, {-1370.16, 0., 0.}, {-990.011, 0., 0.}, {-577.852, 0., 0.}, {-193.033, 0., 0.}, {184.228, 0., 0.}, {593.501, 0., 0.}, {975.434, 0., 0.}, {1389.38, 0., 0.}, {1795.76, 0., 0.}, {2174.81, 0., 0.}, {2585.87, 0., 0.}, {2969.58, 0., 0.}, {3345.74, 0., 0.}, {3753.91, 0., 0.}, {4134.74, 0., 0.}, {4547.58, 0., 0.}, {4933.08, 0., 0.}, {5311.03, 0., 0.}, {5720.98, 0., 0.}, {6103.59, 0., 0.}, {6518.22, 0., 0.}, {6925.29, 0., 0.}, {7305.01, 0., 0.}, {7716.75, 0., 0.}, {8101.15, 0., 0.}, {8477.99, 0., 0.}, {8886.84, 0., 0.}, {9268.35, 0., 0.}, {9275.01, 0., 0.}, {9281.66, 0., 0.}, {9294.97, 0., 0.}, {9321.59, 0., 0.}, {9374.82, 0., 0.}, {9481.29, 0., 0.}, {9487.95, 0., 0.}, {9494.6, 0., 0.}, {9507.91, 0., 0.}, {9534.53, 0., 0.}, {9587.76, 0., 0.}, {9594.42, 0., 0.}, {9601.07, 0., 0.}, {9614.38, 0., 0.}, {9641., 0., 0.}, {9647.65, 0., 0.}, {9654.31, 0., 0.}, {9667.62, 0., 0.}, {9674.27, 0., 0.}, {9680.92, 0., 0.}, {9687.58, 0., 0.}, {9694.23, 0., 0.}}]}, "Charting`Private`Tag$4270713#1"]}}, {DisplayFunction -> Identity, AspectRatio -> 1, Axes -> True, AxesStyle -> Directive[AbsoluteThickness[0.2]], BaseStyle -> Automatic, DisplayFunction :> Identity, FaceGridsStyle -> Automatic, Lighting -> {{"Ambient", RGBColor[0.312, 0.188, 0.4]}, {"Directional", RGBColor[0.8, 0, 0], ImageScaled[{2, 0, 2}]}, {"Directional", RGBColor[0, 0.8, 0], ImageScaled[{2, 2, 2}]}, {"Directional", RGBColor[0, 0, 0.8], ImageScaled[{0, 2, 2}]}}, Method -> {}, PlotRange -> {{-9694.23, 9694.23}, {-1., 1.}, {-1., 1.}}, PlotRangePadding -> {Scaled[0.02], Scaled[0.02], Scaled[0.02]}, Ticks -> {Automatic, Automatic, Automatic}}]}, BoxRatios -> {1, 1, 1}]
  2.  
  3. rotation::usage="rotation[f] receives a real one-variable function f, and generates a visualization of the solid of revolution around the x-axis"
  4.  
  5. (*
  6. Usage:
  7.  
  8. Import["Solid of Revolution.wl"]
  9. f[x_]:=x^2
  10. rotation[f]
  11. *)
Add Comment
Please, Sign In to add comment