Thanks!  That worked nicely.

But should this type of thing be documented, as others may face this?

Dean

---

On Tue, Mar 4, 2008 at 10:18 PM, Mike Hansen <[EMAIL PROTECTED]> wrote:

> On Tue, Mar 4, 2008 at 8:03 PM, dean moore <[EMAIL PROTECTED]>
> wrote:
> > I'm trying to spline the unit circle.  The graph looks like a
> polynomial,
> > not a fit to
> > the unit circle.
> >
>
> Well, you're going to have some problems using spline since it does a
> univariate polynomial spline interpolation.  What you really want to
> do is do a spline on each of the coordinates and then do a parametric
> plot of those two splines:
>
> v = []                          # Will hold points
> step  = 0.5                     # "Fineness" of my approximation
> for x in srange(0, 2*pi, step): # Fill parameter *v* with points
>   v.append((cos(x), sin(x)))   # on the unit circle.
>
> x_spline = spline([(RDF(i)/len(v), v[i][0]) for i in
> range(len(v))]+[(1,v[0][0])])
> y_spline = spline([(RDF(i)/len(v), v[i][1]) for i in
> range(len(v))]+[(1,v[0][1])])
> parametric_plot((x_spline, y_spline),0,1)
>
> --Mike
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to