Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

CSE 477 * Intro to CAGD

Homework 4: B-spline Curve Design, ConS, and 3D Printing

Big picture: You will create an artistic/fun pretzel-like 2d B-spline curve. This curve will be used to  create a CONS (on a Bezier surface). You will make two more copies of the CONS, moving them in 3D space, so that the resulting three 3d curves form a chain, and then you will create a 3d print of this object. Steps for this are described below.

Objectives:

-- experience designing with B-splines

-- more surface design experience

-- improve understanding of 3d geometry

-- understand the concept of Curves on Surfaces (ConS)

-- hands-on experience with 3d printing

Details:

step 1) Using  one 2d cubic B-spline curve, design an artistic curve with a pretzel-like shape (at least two loops) in the xy-plane.

The B-spline must have the following properties.

-- at least ten polynomial segments,

-- full multiplicity at the ends,

-- start point is equal to the end point (closed but not periodic)

-- at least one interior domain knot must have multiplicity 2

-- at least one interior domain knot must have multiplicity 3

The control points should live in [0,1] x [0,1] in order to live in the domain of a Bezier surface. (If needed, you can use a translation and/or scale to achieve this.)

You may use MM’s B-spline function BSplineCurve[] for display, but you will need your own evalua- tor to extract (x,y) points (that will be interpreted as (u,v) for the surface).  Your own evaluator will     use BSplineBasis[]. (You may use code from the demo nbs.)

Plot your curve in 2D with the control points and polygon, using different colors for the curve and control polygon/points.

Print the knot vector and the number of curve segments next to this plot.

step 2) Design an interesting/curvey Bezier patch. The patch must be at least bicubic. (You could use the Coons method.)

step 3) Plot your B-spline curve as a ConS together with the surface. Include the Bezier control net in this plot.

step 4) Plot the ConS without the surface displayed. Use the Tube function to give it thickness.    Please take some time to set the thickness parameter to a “reasonable” value because this will    influence the 3D print quality. (Too thin and the print will not be stable enough; too thick and your design concept is lost.)

step 5) Translate the ConS twice, creating three curves that are chained together and do not inter- sect.

This will require a bit of “eyeballing it.” You could modify your ParametricPlot3D from step 4 to look

like this:

ParametricPlot3D[{surf[....],   surf[...] + {x1, y1, z1}, surf[...] + {x2, y2, z2}} ....]

where the “...” is code you will fill in and “surf” is a Bezier surface evaluator.

Rotate the object with the mouse to make sure that they are chained together, but do not intersect. Plot this step.

step 6) Prepare for 3D Printing. Export the resulting object in step 5 as an STL file. Then, import the STL file in order to visualize the triangle mesh. (Example of this step is in the MM 3d print demo nb.) You should also check the validity of the mesh using FindMeshDefects and RepairMesh if needed.   Repeat the Export if the file changed. This step will create a plot.

step 7) Create a 3D print. Instructions for these steps are posted in the “3D Printing in the SCAI    Manufacturing Lab” Page. Post a picture of your 3D print in the Canvas 3D Print Assignment Link.

Instructions for turning in your homework:

-- Name your notebook lastname_hw4.nb

-- DELETE ALL OUTPUT!!!

-- Comment out all import/export function calls.

-- Submit nb to homework Canvas page and picture of 3d print to its Canvas page.

-- Your MM nb is due by the deadline associated with this assignment. The 3d printed object is due by the last day of classes.

Helper code snippets

(*  This line makes MM read and write from your local folder, where this nb lives. *) SetDirectory[ToFileName[

Extract["FileName" /. NotebookInformation[EvaluationNotebook[]],

{1}, FrontEnd`FileName]]];

(*  Here is one way to use the MM Bezier surface function. *)

(*  create a surface defined by a set of control points *)

surf = BezierFunction[surfControlNet];

(*  evaluate that surface at one (u,v)  pair *)

surf[u, v];