POV-Ray : Newsgroups : povray.general : Bug in Bezier-spline prisms? : Bug in Bezier-spline prisms? Server Time
2 Jul 2024 09:49:56 EDT (-0400)
  Bug in Bezier-spline prisms?  
From: Jeff Lee
Date: 4 Nov 1999 15:55:32
Message: <3821f2c4@news.povray.org>
I'm not sure if this is a bug, or an undocumented feature, or if I'm
merely doing something wrong, but when I attempt to create subprisms
within a prism made of Bezier splines, I receive the message: 

   warning: Prism not closed. Ignoring it.

However, each of the subprisms appears to be correct; I can comment out
bits and render each subprism separately, and the result is what I
expect it to look like.  But when I put them together again, they still
fail to work.

Here's a small example file, showing one linear_spline prism and one
bezier_spline prism, each with an outer and inner subprism.  The former
prism works exactly as the documentation says it should.  The latter
does not.

Any ideas on what I'm doing wrong, or can Bezier-spline prisms simply
not contain subprisms?

//------------------------------ Cut here ------------------------------

#declare LinearPrism = prism { linear_spline linear_sweep 0, 5, 10,
  <0,10>, <10,0>, <0,-10>, <-10,0>, <0,10>,  // outer prism
  <0, 5>, < 5,0>, <0, -5>, < -5,0>, <0, 5>   // inner prism
  pigment { colour rgb <1,1,0> }
}

#declare BezierPrism = prism { bezier_spline linear_sweep 0, 5, 32,
  <  0, 10>, < 10, 10>, < 0, 0>, < 10,  0>,
  < 10,  0>, < 10,-10>, < 0, 0>, <  0,-10>,
  <  0,-10>, <-10,-10>, < 0, 0>, <-10,  0>,
  <-10,  0>, <-10, 10>, < 0, 0>, <  0, 10>,  // outer prism
  <  0,  5>, <  0,  0>, < 5, 5>, <  5,  0>, 
  <  5,  0>, <  0,  0>, < 5,-5>, <  0, -5>,
  <  0, -5>, <  0,  0>, <-5,-5>, < -5,  0>,
  < -5,  0>, <  0,  0>, <-5, 5>, <  0,  5>   // inner prism
  pigment { colour rgb <0,1,1> }
}

object { LinearPrism translate x*-11 }
object { BezierPrism translate x* 11 }

camera { location <0,30,-30> look_at <0,2.5,0> }
light_source { <-10000,10000,-10000> colour rgb <1,1,1> }
plane { y, 0 pigment { colour rgb <1,1,1> }}

//------------------------------ Cut here ------------------------------


-- 
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.