Tag Info

New answers tagged


Another approach to this problem is to use the image processing functions and operate directly on the image of the lines. Here we import the two lines from the OPs question, and take the DistanceTransform. Finding the value of the distance transform at the orange point gives the distance (in pixels) of that point from that line. img = ...


I have made several pictures very similar to this, using code similar to the one below: MakePic[f_, g_, off_, nlines_, col_, dim_] := Module[{g1, cf, lines}, g1 = ParametricPlot[{f[t], g[t + off]}, {t, 0, 2 Pi}, AspectRatio -> 1, Axes -> None, PlotStyle -> {{col, Thick, Opacity[0.2]}}]; lines = Line@Table[{f[t], g[t + off]}, {t, ...


A highly related concept would be envelope. Ruled surface could be a possible generalization to 3D. A simple way to find a family of lines given thier envelope curve is to use its tangent line family. Example 1: Suppose we have a curve describe in parameter u: pt = {Cos[u/2] Cos[u], Cos[u/2] Sin[u], .8 Sin[u]}; ParametricPlot3D[pt, {u, 0, 4 π}] So its ...


I think you should not be looking at Graph, which is for graph plotting. This is really a graphics question. Looking at your example, I see one or more curves split into (equal?) segments, and then the division points connected with straight lines. So we can base this on this answer (please check there for the code). After dividing a single curve into ...


It appears that you are interested in showing only the intersections for an arbitrary set of cutting planes parallel to the xy-plane. That can be achieved by making some small modifications to PatoCriollo's answer. Like so: h = x^2 + y^2/9 + z^2/4 - 1; With[{cuts = Range[-5/2, 5/2, 1/2]}, ContourPlot3D[h == 0, {x, -1, 1}, {y, -3, 3}, {z, -2, 2}, ...


h = x^2 + y^2/9 + z^2/4 - 1; g = z; ContourPlot3D[{h == 0, g == 0, g == k}, {x, -1, 1}, {y, -3, 3}, {z, -2, 2}, MeshFunctions -> {Function[{x, y, z, f}, z]}, MeshStyle -> {{Thick, Blue}}, Mesh -> {{0, k }}, ContourStyle -> Directive[Orange, Opacity[0.5], Specularity[White, 30]]]


Ugly + undocumented solution: Graphics`Mesh`MeshInit[]; make[pts_] := PolygonArea[With[{order = ConvexHull[pts]}, Append[pts[[order]], pts[[order[[1]]]]]]]

Top 50 recent answers are included