1
$\begingroup$

I trying to get multiple cross-sections of a revolution plot I made from a piece-wise function.

The end goal would be to calculate integrals underneath those cross-sections.

my code looks like this:

Table[RevolutionPlot3D[
Piecewise[{{2^(0.4 x), 0 < x < 10}, {5 x - 50, 
10 < x < 13}, {5 x - 65, 13 < x < 16}}, Exclusions -> None], {x, 
0, 30}, RegionFunction -> Function[{x, y}, Evaluate[f]], 
PlotLabel -> f], {f, {0 < x < 1, 0 < y < 1}}]

My approach was to use RegionFunction, but it neither gave me the cross-sections that I wanted nor was I close to calculate any integrals. Should I try a completely different approach or does anyone have some an idea how to improve my code?

An example of an cross-section that I am interested in cross-section

$\endgroup$
2
  • $\begingroup$ Give an example of a cross section you seek. $\endgroup$ Apr 17 '17 at 21:19
  • $\begingroup$ Basically anywhere on object else than through the middle. A cross-section going through the middle would just give the piecewise function. $\endgroup$
    – user 3 50
    Apr 18 '17 at 17:39
3
$\begingroup$

Perhaps you wish to use SliceContourPlot3D

f[x_] := Piecewise[{{2^(0.4 x), 0 < x < 10}, {5 x - 50, 
    10 < x < 13}, {5 x - 65, 13 < x < 16}, {0, True}}, 
  Exclusions -> None]
Manipulate[
 SliceContourPlot3D[
  f[Sqrt[x^2 + y^2]] - z, {v == p}, {x, -16, 16}, {y, -16, 16}, {z, 0,
    16}, Contours -> {{0}}], {v, {x, y, z, x + y}}, {p, -5, 5}]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.