# File: spline_triangle.py # Author: Petr Sorfa # Desc: Creates three splines and # attaches their points to # create a triangulat patch. import am am.begin() am.spline_begin("myspline0") # create the first spline am.spline_add_point(1.0, 0.0, 0.0) am.spline_add_point(0.0, 1.0, 0.0) am.spline_end() am.spline_begin("myspline1") # create the second spline am.spline_add_point(0.0, 1.0, 0.0) am.spline_add_point(-1.0, 0.0, 0.0) am.spline_end() am.spline_begin("myspline2") # create the third spline am.spline_add_point(1.0, 0.0, 0.0) am.spline_add_point(-1.0, 0.0, 0.0) am.spline_end() am.spline_attach_points ("myspline1", "myspline0", 0, 1) am.spline_attach_points ("myspline2", "myspline1", 1, 1) am.spline_attach_points ("myspline2", "myspline0", 0, 0) am.end()