Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #2088

envelope of curves

From Dan <dflatin@rcn.com>
Newsgroups comp.soft-sys.math.mathematica
Subject envelope of curves
Date 2011-05-04 10:34 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <ipra4g$ul$1@smc.vnet.net> (permalink)

Show all headers | View raw


I would like to find the envelope of a set of curves. This evelope may
be formed by moving the center of one curve along the path of the
other curve. It doesn't matter which curve is held fixed and which is
translated as can be seen in the two plots. I am pretty sure there is
a fairly straightforward algorithm for this, but it is escaping me at
the moment. One of the curves, drawn here in grey, is always an
ellipse with the major and minor axes aligned with x and y. The other
curve, drawn in red, may be like an ellipse but it may be some other
shape. In the actual problem it is a fairly involved calculation to
determine it, but it is always smooth and convex. If there is a closed
form solution for the elliptical case, that would be useful. On the
other hand, a numerical solution that can be expressed as an
interpolated curve would probably be the most general solution for me.

With[{a=5,b=1,c=0.25,d=1.5,theta=-Pi/6,n=50},
  Module[{rot,c1,c2},
    rot={{Cos[theta],-Sin[theta]},{Sin[theta],Cos[theta]}};
    c1[psi_]:={a Sin[psi],b Cos[psi]};
    c2[psi_]:=rot.{c Sin[psi],d Cos[psi]};
    Column[{
      Show[{
        ParametricPlot[c1[psi],{psi,-Pi,Pi},Axes->False,
          PlotStyle->Gray,PlotRange->All],
        ParametricPlot[c2[psi],{psi,-Pi,Pi},Axes->False,
          PlotStyle->Red],
        Table[
          ParametricPlot[c1[phi]+c2[psi],{psi,-Pi,Pi},
          Axes->False,
          PlotStyle->Directive[Red,Opacity[0.2]]
          ],{phi,-Pi,Pi,2Pi/n}
        ]
      },ImageSize->400],
      Show[{
        ParametricPlot[c1[psi],{psi,-Pi,Pi},Axes->False,
          PlotStyle->Gray,PlotRange->All],
        ParametricPlot[c2[psi],{psi,-Pi,Pi},Axes->False,
          PlotStyle->Red],
        Table[
          ParametricPlot[c1[psi]+c2[phi],{psi,-Pi,Pi},
          Axes->False,
          PlotStyle->Directive[Gray,Opacity[0.2]]
          ],{phi,-Pi,Pi,2Pi/n}
        ]
      },ImageSize->400]
    }]
  ]
]

Thanks in advance.
Dan

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

envelope of curves Dan <dflatin@rcn.com> - 2011-05-04 10:34 +0000

csiph-web