POV-Ray : Newsgroups : povray.programming : How to program enhancements to POV-Ray? : How to program enhancements to POV-Ray? Server Time
29 Jul 2024 08:15:37 EDT (-0400)
  How to program enhancements to POV-Ray?  
From: Jeff Lee
Date: 30 Apr 1998 16:23:18
Message: <6ialhp$et8$1@oz.aussie.org>
I'd like to try adding a feature to POV-Ray, to let me use splines to
arbitrarily scale objects in a non-linear fashion.  For a very simple
example, I'm thinking of something along the lines of:

   #declare Spline1 = control_spline {
     cubic_spline 5,
     <0,-3>, <1,-2>, <1.5,0>, <1,2>, <0,3>,
   }

   box { <-2,-0.5,-0.5>, <2,0.5,0.5>
     spline_scale y*Spline1
     pigment { colour rgb <0,1,1> }
   }

...which would produce a box with a top and bottom that curve outwards
in the middle (see http://www.gate.net/~shipbrk/raytrace/wishlist.jpg
for an example of what it would look like).

Unfortunately, I'm very bad at maths, and the POV-Ray source code is a
bit daunting; I don't have the foggiest idea where to begin.  Would
anybody be willing to give me some pointers as to how I could accomplish
this (or even if it's possible)?

Many thanks,


-- 
Jeff Lee         shi### [at] gatenet         http://www.gate.net/~shipbrk/


Post a reply to this message

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