POV-Ray : Newsgroups : povray.general : Cubic_Spline Lathe Problem ? : Re: Cubic_Spline Lathe Problem ? Server Time
12 Aug 2024 23:25:54 EDT (-0400)
  Re: Cubic_Spline Lathe Problem ?  
From: ReVerSi
Date: 21 Dec 1998 06:08:41
Message: <367E2C16.7D5D@t-online.de>
Ken wrote:
> 
> Seasons Greetings !
> 
>   The Pov text below describes a closed curve shape
> (like a serving tray). I want to use the cubic spline
> to help give me smooth curves with a limited amount
> of control points. Problem is when I use cubic verses
> linear of quadratic the closed curve section of the
> shape gets cut out. Would somebody check this out
> and tell me if I'm applying this wrong or if it's
> just not behaving properly.
> 
>.....pov-code

Hello Ken,

using cubic_spline povray will take the first and the last of your <u,v>
coordinates as mere control points for the slope of the spline at the
second and the last_but_one coordinate.
So try out something like following, and it will work correctly:

//pov-code:
lathe{
  cubic_spline 
  //quadratic_spline
  //linear_spline
  15,
  <0.00, 0.17>
  <0.00, 0.00>,
  <2.00, 0.00>,
  <2.20, 0.10>,
  <2.30, 0.20>,
  <2.30, 0.25>,
  <2.50, 0.26>,
  <2.52, 0.27>,
  <2.30, 0.28>,
  <2.29, 0.27>,
  <2.20, 0.20>,
  <2.10, 0.19>,
  <1.90, 0.18>,
  <0.00, 0.17>,
  <0.00, 0.00>,
  pigment{rgb .7}
  finish{ambient .4 diffuse .3}}

  camera{location<0,  7, -8> look_at 0 }
  light_source{  <0,100,-33> rgb 1}
//end of pov-code

Merry christmas 
ReVerSi


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.