POV-Ray : Newsgroups : povray.newusers : Quadratic Spline Question : Quadratic Spline Question Server Time
4 Nov 2024 21:23:43 EST (-0500)
  Quadratic Spline Question  
From: Hershel Robinson
Date: 23 Aug 2001 13:27:06
Message: <3b853cea@news.povray.org>
I am no expert in quadratic splines.  Actually, I have forgotten most of
what I once knew about them.  I have a question about how POV-Ray generates
splines.  I have included at the bottom of this epistle the sample page
found in the POV-Ray 3.1 docs in the tutorial section.

If I redefine the points from the example to be this:

  #declare Red_Point    = <0.00, 0.000, 0>;
  #declare Orange_Point = <1., 1.00, 0>;
  #declare Yellow_Point = <2.50, 2.00, 0>;
  #declare Green_Point  = <2.00, 3.00, 0>;
  #declare Blue_Point   = <1.50, 4.00, 0>;

I get a lovely lathe object.  If, however, I move the Red_Point a bit up in
the Y direction, like this:

  #declare Red_Point    = <0.00, 0.100, 0>;

then I suddenly get a bunch of white lines in the lower half of my lathe
object instead of a solid white object.  The lines appear for values from .1
to 1.2.  I also get lines for negative values.

Can someone explain what's going on?

Thanks,
Hershel

PS: In case you don't have it handy, here is the full code:
#include "colors.inc"
  camera {
    orthographic
    up <0, 5, 0>
    right <5, 0, 0>
    location <2.5, 2.5, -100>
    look_at <2.5, 2.5, 0>
  }
  /* set the control points to be used */
  #declare Red_Point    = <1.00, 0.00, 0>;
  #declare Orange_Point = <1.75, 1.00, 0>;
  #declare Yellow_Point = <2.50, 2.00, 0>;
  #declare Green_Point  = <2.00, 3.00, 0>;
  #declare Blue_Point   = <1.50, 4.00, 0>;
  /* make the control points visible */
  cylinder { Red_Point, Red_Point - 20*z, .1
    pigment { Red }
    finish { ambient 1 }
  }
  cylinder { Orange_Point, Orange_Point - 20*z, .1
    pigment { Orange }
    finish { ambient 1 }
  }
  cylinder { Yellow_Point, Yellow_Point - 20*z, .1
    pigment { Yellow }
    finish { ambient 1 }
  }
  cylinder { Green_Point, Green_Point - 20*z, .1
    pigment { Green }
    finish { ambient 1 }
  }
  cylinder { Blue_Point, Blue_Point- 20*z, .1
    pigment { Blue }
    finish { ambient 1 }
  }
  /* something to make the curve show up */
  lathe {
    linear_spline
    5,
    Red_Point,
    Orange_Point,
    Yellow_Point,
    Green_Point,
    Blue_Point
    pigment { White }
    finish { ambient 1 }
  }


Post a reply to this message

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