POV-Ray : Newsgroups : povray.bugreports : prism object, cubic_spline, uncategorized error : prism object, cubic_spline, uncategorized error Server Time
14 May 2024 03:57:27 EDT (-0400)
  prism object, cubic_spline, uncategorized error  
From: TC
Date: 10 Aug 2009 18:30:03
Message: <4a809f6b@news.povray.org>
Hi, there,

I am pretty sure this is not a bug in PovRay, but I do not see what I am 
doing wrong. If I should be in the wrong newsgroup, I hereby apologize. 
Using the scene file below I got the following error:

Parse Warning: Prism not closed. Ignoring it.
Possible Parse Error: Too few points in prism.
Fatal error in parser: Uncategorized error.
Render failed

Now, when I substitute linear_spline for cubic_spline no errors occur. Seven 
points should be enough to calculate a cubic spline. Any idea why povray 
crashes? If it is due to the choice of points (the ones making two right 
angles), is this a bug or a feature?

I attached the output of linear_sweep render and what I did indend to be the 
final result (probably after some csg to get the three straight lines, since 
the cubic spline should produce some organic shape).

<Start of simple scene, the prism-tutorial with modified coordinates>

// Persistence of Vision Ray Tracer Scene Description File
// File: ?.pov
// Vers: 3.6
// Desc: Basic Scene Example
// Date: mm/dd/yy
// Auth: ?
//

#version 3.6;

#include "colors.inc"

global_settings {
  assumed_gamma 1.0
}

// ----------------------------------------

camera {
  location  <0.0, 15, -15.0>
  direction 1.5*z
  right     x*image_width/image_height
  look_at   <0.0, 0.0,  0.0>
}

sky_sphere {
  pigment {
    gradient y
    color_map {
      [0.0 rgb <0.6,0.7,1.0>]
      [0.7 rgb <0.0,0.1,0.8>]
    }
  }
}

light_source {
  <0, 0, 0>            // light's position (translated below)
  color rgb <1, 1, 1>  // light's color
  translate <-30, 30, -30>
}

// ----------------------------------------

plane {
  y, -1
  pigment { color rgb <0.7,0.5,0.3> }
}

prism {
    linear_sweep
    cubic_spline //linear_spline
    0,  // sweep the following shape from here ...
    1,  // ... up through here
    7, // the number of points making up the shape ...
    <4.34, 5>, <-1, 5>, <-4.34, 1.69>, <-1, -1.62>, <2, -5>, <4.34, -5>, 
<4.34, 5>
    pigment { Green }
  }


Post a reply to this message


Attachments:
Download 'linear_spline.jpg' (7 KB) Download 'expected_result.jpg' (6 KB) Download 'ATT00016.txt' (1 KB)

Preview of image 'linear_spline.jpg'
linear_spline.jpg

Preview of image 'expected_result.jpg'
expected_result.jpg

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