Esempio n. 1
0
def main():
    _, intersections = utils.curve_intersections_info()
    with open(GENERATED_FILENAME, "w") as file_obj:
        write_content(intersections, file_obj)
Esempio n. 2
0
#     https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import matplotlib.pyplot as plt
import seaborn

from bezier import _plot_helpers
from tests.functional import utils


_, INTERSECTIONS = utils.curve_intersections_info()
# As of ``0.9.0``, this palette has (BLUE, ORANGE, GREEN, RED, PURPLE, BROWN).
_COLORS = seaborn.color_palette(palette="deep", n_colors=6)
BLUE = _COLORS[0]
GREEN = _COLORS[2]
del _COLORS


def make_plot(intersection_info, save_plot):
    curve1 = intersection_info.curve1
    curve2 = intersection_info.curve2
    intersection_pts = intersection_info.intersections
    ax = curve1.plot(64, color=BLUE)
    curve2.plot(64, ax=ax, color=GREEN)
    ax.plot(
        intersection_pts[0, :],