def parametric_curve(self):
        """
        return a parametric curve with the same graph as `self`.
        """
        from yanntricks.src.Constructors import phyFunction
        from yanntricks.src.Constructors import ParametricCurve
        if self._parametric_curve:
            return self._parametric_curve
        x = var('x')
        curve = ParametricCurve(phyFunction(x), self, (self.mx, self.Mx))
        curve.parameters = self.parameters.copy()

        curve.linear_plotpoints = self.linear_plotpoints
        curve.curvature_plotpoints = self.curvature_plotpoints
        curve.added_plotpoints = self.added_plotpoints

        curve._representativeParameters = self._representativeParameters
        self._parametric_curve = curve

        return curve
Exemplo n.º 2
0
 def graph(self, mx, Mx):
     from yanntricks.src.Constructors import ParametricCurve
     gr = ParametricCurve(self.f1, self.f2, (mx, Mx))
     gr.parameters = self.parameters.copy()
     return gr