POV-Ray : Newsgroups : povray.beta-test : Spline inconsistencies : Re: Spline inconsistencies Server Time
30 Jul 2024 06:31:17 EDT (-0400)
  Re: Spline inconsistencies  
From: Warp
Date: 22 Feb 2002 03:31:59
Message: <3c7601ff@news.povray.org>
By the way, any chance of making the time values optional?
  Forced time values are a real bother, and they usually cause more trouble
than they are worth.

  The idea would be that you don't either give any time values, or you give
time values for at least two points (giving one is not legal).
  If no time values are given, then the time values are internally generated
by interpolating (eg. between 0 and 1).
  If at least two time values are given, the time values for the other
points are calculated by interpolating and extrapolating.

  Of course a change in syntax would be needed but that should not be a
problem since we don't have to worry about backwards compatibility right now
(in fact, the syntax should be thought now that we still have the chance to
set it to whatever we want).
  It could, for example, be so that if a point is enclosed with { and }, then
it has a time value, else it hasn't. For example:

spline
{ whatever_spline
  { 0, <1,2,3> }
  <4,5,6>
  <7,8,9>
  { 1, <10,11,12> }
  <13,14,15>
  { 2, <16,17,18> }
  <19,20,21>
}

  Of course the most common usage of splines (I'm sure) would be with no
time values (usually evenly-distributed time values are enough):

spline
{ whatever_spline
  <1,2,3>
  <4,5,6>
  <7,8,9>
  <10,11,12>
}

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

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