Group Abstract Group Abstract

Message Boards Message Boards

Exclusions with ParametricPlot3D

GROUPS:
I have two regions, each parametrized by different values of u and v.  My goal is to subtract the first region from the second region, such that the resulting plot displays only the second region, with empty space wherever it intersects the first region.  Essentially, I want to perform boolean algebra on ParametricPlot3D regions, so that I can get Region2 - Region1.
Show[
Region2 =
  ParametricPlot3D[{Cos[u] v, Sin[u] v, Cos[u] Sin[u] v}, {u, 0, 2 \[Pi]}, {v, 0.5, 1}, MaxRecursion -> 1, PlotPoints -> 50,
   Mesh -> False, PlotStyle -> {Opacity[0.5], Thickness[0.05]}],
Region1 =
  ParametricPlot3D[{Cos[u ] - 1, Sin[u] + 1, u + v}, {u, - (\[Pi]/2), 0}, {v, 0.4, 0.7}, MaxRecursion -> 1, PlotPoints -> 50,
   Mesh -> False, PlotStyle -> {Opacity[1], Thickness[0.5]}]]

I assume there must be a way to do this using Exclusions, but I'm a little hazy on the syntax/ format.
POSTED BY: Bryan Lettner
Answer
4 months ago
RegionPlot3D[-1 <= x <= 1 && -1 <= y <= 1 && -1 <= z <= 1 &&
  Not[-1/2 <= x <= 1/2 && -1/2 <= y <= 1/2 && -1/2 <= z <= 1/2] &&
  y >= 0, {x, -2, 2}, {y, -2, 2}, {z, -2, 2}, Mesh -> None,
PlotPoints -> 50]
is an example from the RegionPlot3D which may be relevant to what you want to do.
POSTED BY: Frank Kampas
Answer
4 months ago
Thanks Frank.  Unfortunately, my regions need to be defined parametrically in terms of u and v, but RegionPlot3D only interprets in xyz.  I wish that Show had the cabability to subtract regions from one another, rather than just piling one on top of another.  Anyone else have any ideas?
POSTED BY: Bryan Lettner
Answer
4 months ago
For starters, I suggest that you change the variables in the definition of one of the regions so that u and v have the same ranges in the two definitions.
POSTED BY: Frank Kampas
Answer
4 months ago
Frank, that is good advice.  I've since done that, but I also need each region to have a different value for Thickness.  And I am still left with the problem of subtracting one from the other.  Is anyone aware of Mathemattica Packages that include features that might help?
POSTED BY: Bryan Lettner
Answer
4 months ago
Okay, here's a great solution:  If you are exporting regions generated in mathematica as .stl files for puposes of 3d printing, you can join/add/subtract those regions in a 3d printing software such as MeshLab or Netfabb.  see http://wiki.netfabb.com/Boolean_Operations .
POSTED BY: Bryan Lettner
Answer
4 months ago
How about determining parametrically the regions of intersection and leaving them out of the plot ?
POSTED BY: Melvyn Stancliffe
Answer
4 months ago