POV-Ray : Newsgroups : povray.bugreports : prism object, cubic_spline, uncategorized error Server Time
31 Oct 2024 12:14:57 EDT (-0400)
  prism object, cubic_spline, uncategorized error (Message 1 to 3 of 3)  
From: TC
Subject: prism object, cubic_spline, uncategorized error
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

From: clipka
Subject: Re: prism object, cubic_spline, uncategorized error
Date: 10 Aug 2009 22:45:58
Message: <4a80db66$1@news.povray.org>
TC schrieb:
> Hi, there,
> 
> I am pretty sure this is not a bug in PovRay,

So you are pretty sure that your posting is off-topic here, and should 
have been posted to e.g. povray.general instead? Okay...

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

Then you might have noticed the comments:

-------------------------------------
prism {
     cubic_spline
     0, // sweep the following shape from here ...
     1, // ... up through here
     6, // the number of points making up the shape ...
     < 3, -5>, // point#1 (control point... not on curve)
     < 3,  5>, // point#2  ... THIS POINT ...
     <-5,  0>, // point#3
     < 3, -5>, // point#4
     < 3,  5>, // point#5 ... MUST MATCH THIS POINT
     <-5,  0>  // point#6 (control point... not on curve)
     pigment { Green }
   }
-------------------------------------

In plain prose: The second point must match the second-to-last point.


Post a reply to this message

From: TC
Subject: Re: prism object, cubic_spline, uncategorized error
Date: 11 Aug 2009 02:47:05
Message: <4a8113e9$1@news.povray.org>
Thank you! It has been a long day and I must confess I did not notice the 
different comments in the cubic spline section. I should have paid more 
attention.

Even though I use PovRay for more than a decade or so I never needed a prism 
with cubic_spline option. I find splines hard to control, so I never used 
them until now.

>> I am pretty sure this is not a bug in PovRay,
> So you are pretty sure that your posting is off-topic here, and should 
> have been posted to e.g. povray.general instead? Okay...

I feel properly chasticed... mea culpa, mea maxima culpa... 



__________ Hinweis von ESET NOD32 Antivirus, Signaturdatenbank-Version 4324 (20090811)
__________



http://www.eset.com


Post a reply to this message

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