POV-Ray : Newsgroups : povray.windows : Prism Server Time
25 Nov 2024 03:02:50 EST (-0500)
  Prism (Message 1 to 3 of 3)  
From: Jon S  Berndt
Subject: Prism
Date: 3 Jan 1998 00:59:54
Message: <34ADD3D9.F7C6BB15@hal-pc.org>
Am I doing something wrong, or what?

I have included the prism statement generated by the editor in POV-Ray
for Windows. It looks like this:

prism {
  linear_sweep // or conic_sweep for tapering to a point
  cubic_spline // linear_spline | quadratic_spline | cubic_spline
  -0.5,        // height 1
   0.5,        // height 2
  10,          // number of points
  // the <u,v> points
  < 0.2, -1.0>, < 0.2,  0.2>, < 1.0, -0.2>, < 1.0,  0.2>, < 0.2,  1.0>,
  <-0.2,  1.0>, <-1.0,  0.2>, <-1.0, -0.2>, <-0.2,  0.2>, <-0.2, -1.0>
  // [open]
  // [sturm]
}

When I try and compile this, I get:

"Returned from renderer (non-zero return value)?."

Jon


Post a reply to this message

From: Jon S  Berndt
Subject: Re: Prism
Date: 3 Jan 1998 07:50:57
Message: <34AE3431.9E553539@hal-pc.org>
Jon S. Berndt wrote:

> Am I doing something wrong, or what?
>
> I have included the prism statement generated by the editor in POV-Ray
>
> for Windows. It looks like this:
>
> prism {
>   linear_sweep // or conic_sweep for tapering to a point
>   cubic_spline // linear_spline | quadratic_spline | cubic_spline
>   -0.5,        // height 1
>    0.5,        // height 2
>   10,          // number of points
>   // the <u,v> points
>   < 0.2, -1.0>, < 0.2,  0.2>, < 1.0, -0.2>, < 1.0,  0.2>, < 0.2,
> 1.0>,
>   <-0.2,  1.0>, <-1.0,  0.2>, <-1.0, -0.2>, <-0.2,  0.2>, <-0.2, -1.0>
>
>   // [open]
>   // [sturm]
> }
>
> When I try and compile this, I get:
>
> "Returned from renderer (non-zero return value)?."

Actually, it says: "Too few points in prism".

Jon


Post a reply to this message

From: Ronald L  Parker
Subject: Re: Prism
Date: 5 Jan 1998 10:14:38
Message: <34b2f466.6069898@10.0.2.33>
On Sat, 03 Jan 1998 06:50:57 -0600, "Jon S. Berndt" <jsb### [at] hal-pcorg>
wrote:

>Jon S. Berndt wrote:
>
>> Am I doing something wrong, or what?
>>
>> I have included the prism statement generated by the editor in POV-Ray
>>
>> for Windows. It looks like this:
>>
>> prism {
>>   linear_sweep // or conic_sweep for tapering to a point
>>   cubic_spline // linear_spline | quadratic_spline | cubic_spline
>>   -0.5,        // height 1
>>    0.5,        // height 2
>>   10,          // number of points
>>   // the <u,v> points
>>   < 0.2, -1.0>, < 0.2,  0.2>, < 1.0, -0.2>, < 1.0,  0.2>, < 0.2,
>> 1.0>,
>>   <-0.2,  1.0>, <-1.0,  0.2>, <-1.0, -0.2>, <-0.2,  0.2>, <-0.2, -1.0>
>>
>>   // [open]
>>   // [sturm]
>> }
>>
>> When I try and compile this, I get:
>>
>> "Returned from renderer (non-zero return value)?."
>
>Actually, it says: "Too few points in prism".

Perhaps there are some words of wisdom in section 7.5.2.8 of the
manual:

	Each of the sub-prisms has to be closed by repeating the first

	point of a sub-prism at the end of the sub-prism's point 
	sequence. If this is not the case a warning is issued and the 
	prism is ignored (with linear splines automatic closing is 
	used). This implies that all points of a prism are different 
	(except the first and last of course). This applies to all 
	spline types though the control points of the quadratic and 
	cubic splines can be arbitrarily chosen.

	The last sub-prism of a linear spline prism is automatically 
	closed - just like the last sub-polygon in the polygon 
	statement - if the first and last point of the sub-polygon's 
	point sequence are not the same. This make it very easy to 
	convert between polygons and prisms. Quadratic and cubic 
	splines are never automatically closed.

The prism isn't closed, but if you change it to a linear spline it
would be closed for you.  Otherwise, you'll have to close it manually
(and don't forget the two extra control points.)  Here's one possible
fix:

// extrude a closed 2-D shape along an axis
prism {
 linear_sweep // or conic_sweep for tapering to a point
 cubic_spline // linear_spline | quadratic_spline | cubic_spline
 -0.5,        // height 1
  0.5,        // height 2
 13,          // number of points
 // the <u,v> points
 < 0.2, -1.0>, < 0.2,  0.2>, < 1.0, -0.2>, < 1.0,  0.2>, < 0.2,  1.0>,

 <-0.2,  1.0>, <-1.0,  0.2>, <-1.0, -0.2>, <-0.2,  0.2>, <-0.2, -1.0>,
 < 0.2, -1.0>, < 0.2,  0.2>, < 1.0, -0.2> 
 // [open]
 // [sturm]
}

To fix this in the POV editor templates, choose "Edit POV3TMPL.TXT"
from the Tools menu and search for "@mt2.prism"


Post a reply to this message

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