-
-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
764dfe7
commit 501580b
Showing
2 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
""" | ||
cubic_spline_2d_plot.py | ||
Author: Shisato Yano | ||
""" | ||
|
||
# import path setting | ||
import numpy as np | ||
import sys | ||
import matplotlib.pyplot as plt | ||
from pathlib import Path | ||
|
||
abs_dir_path = str(Path(__file__).absolute().parent) | ||
relative_path = "/../../../components/" | ||
|
||
sys.path.append(abs_dir_path + relative_path + "course/cubic_spline_course") | ||
|
||
# import component module | ||
from cubic_spline_2d import CubicSpline2D | ||
|
||
|
||
# flag to show plot figure | ||
# when executed as unit test, this flag is set as false | ||
show_plot = True | ||
|
||
|
||
def main(): | ||
""" | ||
Main process function | ||
""" | ||
|
||
x_points = [-2.5, 0.0, 2.5, 5.0, 7.5, 3.0, -1.0] | ||
y_points = [0.7, -6, 5, 6.5, 0.0, 5.0, -2.0] | ||
|
||
cs_2d = CubicSpline2D(x_points, y_points) | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |