dewittpe / cpr

Control Polygon Reduction: Methods for quick and efficient placement of internal knots for B-splines and tensor products of B-splines.
http://www.peteredewitt.com/cpr/
2 stars 0 forks source link

build the get_spline functions #23

Closed dewittpe closed 7 years ago

dewittpe commented 7 years ago

see the file R/get_spline.R

Build an S3 method for generating a data.frame for interpolating a spline from a cpr_cp object, or a spline function (one or two dimensional) from cpr_cn objects.

dewittpe commented 7 years ago

A simple version of for cpr_cp has been built. Need to extend for cpr_cn objects.

dewittpe commented 7 years ago

These functions could be helpful for building the plotting method, especially for the 3D plotting considered in #26.

dewittpe commented 7 years ago

Idea, commit 100935e654858625cbf3b7123b51ee84abdcfcf0 has the initial working of two functions:

  1. get_cp_spline, and
  2. get_cn_surface.

get_cp_spline provides data for plotting the control polygon and the spline from a cpr_cp object. From cpr_cn objects, this function provides the data needed to plot the CP and spline for a given "slice" of the multi-dimensional control net.

get_cn_surface is similar, but only works for cpr_cn objects. For a two-dimensional control net the function returns the data needed to plot the control net and/or surface. For a control nets of three or more dimensions, get_cn_surface should return data needed for plotting a "slice" of the higher dimensional control net.