Hot answers tagged

6

I'm not sure what kinds of calculations you'll want to do on the intersection line; but to get a sample of points on the intersection line, you could use DiscretizeRegion and MeshCoordinates: f[x_, y_, z_] = x^4 + y^4 + z^4 - 1; g[x_, y_, z_] = x - 2 y + z - 2; ContourPlot3D[{f[x, y, z] == 0, g[x, y, z] == 0}, {x, -2, 2}, {y, -2, 2}, {z, -2, 2}, ...


4

For version 9: f[x_, y_, z_] := x^3 + y^2 - z^2 g[x_, y_, z_] := x^2 + y^2 + z^2 - 1 cp3d = ContourPlot3D[{f[x, y, z]==0, g[x, y, z]==0}, {x, -2, 2}, {y, -2, 2}, {z, -2, 2}, BoundaryStyle -> {1 -> None, 2 -> None, {1, 2} -> {Thick, Red}}, ContourStyle -> Opacity[.7], Mesh -> None, ImageSize -> 400]; points = Cases[Normal@cp3d, ...


4

I agree on two counts: X3D is a logical export format, but Mathematica's X3D support is, at best, limited. Fortunately, the correspondence between Mathematica's GraphicsComplex and X3D is close enough that it is quite easy to roll your own exporter. To do so, let's begin with your own plot. We'll then extract out the primitives and directives that are ...


3

Here are two additional approaches, one uses RegionIntersection, the other uses DiscretizeGraphics: f[x_, y_, z_] = x^4 + y^4 + z^4 - 1; g[x_, y_, z_] = x - 2 y + z - 2; regF = ImplicitRegion[f[x, y, z] == 0, {x, y, z}]; regG = ImplicitRegion[g[x, y, z] == 0, {x, y, z}]; reg = DiscretizeRegion @ RegionIntersection[regF, regG] MeshCoordinates @ reg // ...


2

Try this With[{color = RGBColor[0.95, 0.93, 0]}, Show[ RegionPlot3D[ z <= -2 x^2 - 2 y^2 && z <= 8 x + y - 20, {x, -10, 10}, {y, -10, 10}, {z, -100, 0}, PlotStyle -> color, Mesh -> None], RegionPlot3D[ x^2 + y^2 <= 50, {x, -10, 10}, {y, -10, 10}, {z, -500, -100}, PlotStyle -> color, ...


2

I am not sure how well the following is answering your question. Here is the general idea: Write a function that finds distances from an arbitrary point to each of the lines defined by the polygons sides (line segments). Use some sort of dynamic manipulation to plot the most interesting point-segment distances. I assume it is important to stay in 3D, ...



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