Message Boards Message Boards

0
|
3256 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Using Piecewise inside RevolutionPlot3D gives empty areas?

Why when you use a function defined by Piecewise in an interval [a,b] and you use this function in RevolutionPlot3D this show us a broken surface?

peon[x_] := 
 Piecewise[{{1 - x/2, 0 < x <= 1}, {1/2, 
    1 <= x <= 3}, {3/4 - (x - 7/2)^2, 3 <= x < 4}}]
Plot[peon[x], {x, 0, 4}, AspectRatio -> Automatic, 
 AxesOrigin -> {0, 0}, PlotRange -> All]
ParametricPlot[{peon[y], y}, {y, 0, 4}, PlotRange -> Full]
RevolutionPlot3D[{peon[y], y}, {y, 0, 4}, PlotRange -> All, 
 AspectRatio -> Automatic]

And I want to know if this discontinuity affects when you send the file to 3D printing.

POSTED BY: Ramiro Saldaña
2 Replies

You are right, the last image also looks good to me, that's because the command Exclusions->None. Thank You.

POSTED BY: Ramiro Saldaña

Try:

 peon[x_] := 
 Piecewise[{{1 - x/2, 0 < x <= 1}, {1/2, 
    1 <= x <= 3}, {3/4 - (x - 7/2)^2, 3 <= x < 4}}]
Plot[peon[x], {x, 0, 4}, AspectRatio -> Automatic, 
 AxesOrigin -> {0, 0}, PlotRange -> All]
ParametricPlot[{peon[y], y}, {y, 0, 4}, PlotRange -> Full]
PRINT = RevolutionPlot3D[{peon[y], y}, {y, 0, 4}, PlotRange -> All, 
  AspectRatio -> Automatic, Exclusions -> None]


A = Export["model.stl", PRINT, "STL"]
Import["model.stl"]

enter image description here

Looks good to me.

POSTED BY: Mariusz Iwaniuk
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract