POV-Ray : Newsgroups : povray.bugreports : error on plane orientation Server Time
22 Nov 2024 00:15:30 EST (-0500)
  error on plane orientation (Message 1 to 3 of 3)  
From: bruno71
Subject: error on plane orientation
Date: 5 Jul 2010 09:25:00
Message: <web.4c31dcf856414508d66b23000@news.povray.org>
Hello,
it seems that povray does not work properly on this simple input file:
//////////////////////////////////////////////////////////////////////
#include "colors.inc"

#declare s1 = sphere {<0 0 0>, 40}
#declare p1 = plane {<0 0 1>, 10}
#declare p2 = plane {<0 -0.0141 0.9999>, -10}

light_source {
 <100,-100,300>
 color White
}

camera {
 location <100, -100, 100>
 angle 40
 look_at  <0, 0, 0>
}

intersection {
 object {s1}
 object {p1}
 object {p2 inverse}
 pigment {
  color Blue
     }
}
//////////////////////////////////////////////////////////////////////
it should be a sphere cut by two almost parallel (xy) planes, however the second
plane (p2) is visualized as a perpendicular (xz) plane.
With:
#declare p2 = plane {<0 0 1>, -10}
everything is fine. It seems that the problem occurs when the y component of the
normal vector has negative sign. Is this a bug or there is something wrong in
this simple input file? Thanks,
 Bruno


Post a reply to this message

From: Le Forgeron
Subject: Re: error on plane orientation
Date: 5 Jul 2010 10:40:31
Message: <4c31eedf$1@news.povray.org>
Le 05/07/2010 15:24, bruno71 nous fit lire :
> Hello,

> #declare p1 = plane {<0 0 1>, 10}
> #declare p2 = plane {<0 -0.0141 0.9999>, -10}

> it should be a sphere cut by two almost parallel (xy) planes, however the second
> plane (p2) is visualized as a perpendicular (xz) plane.
> With:
> #declare p2 = plane {<0 0 1>, -10}
> everything is fine. It seems that the problem occurs when the y component of the
> normal vector has negative sign. Is this a bug or there is something wrong in
> this simple input file? Thanks,
>   Bruno

The comma are optional, but 0 -0.0141 is a valid expression for a single 
number... so everything is fine, you provide only 2 components for 3D 
vector, so it get extended with 0 on z (and the x part is small enough, 
so the plane is oriented like +y.

Use comma in vectors.


Post a reply to this message

From: bruno71
Subject: Re: error on plane orientation
Date: 5 Jul 2010 11:05:01
Message: <web.4c31f442e2b066b5d66b23000@news.povray.org>
Le_Forgeron <jgr### [at] freefr> wrote:
> Le 05/07/2010 15:24, bruno71 nous fit lire :
> > Hello,
>
> > #declare p1 = plane {<0 0 1>, 10}
> > #declare p2 = plane {<0 -0.0141 0.9999>, -10}
>
> > it should be a sphere cut by two almost parallel (xy) planes, however the second
> > plane (p2) is visualized as a perpendicular (xz) plane.
> > With:
> > #declare p2 = plane {<0 0 1>, -10}
> > everything is fine. It seems that the problem occurs when the y component of the
> > normal vector has negative sign. Is this a bug or there is something wrong in
> > this simple input file? Thanks,
> >   Bruno
>
> The comma are optional, but 0 -0.0141 is a valid expression for a single
> number... so everything is fine, you provide only 2 components for 3D
> vector, so it get extended with 0 on z (and the x part is small enough,
> so the plane is oriented like +y.
>
> Use comma in vectors.

Sorry, I just realized that I should post this message to povray.general before
reporting a bug. Anyway, thank you very much! I exported a geometry file from
another program (FLAIR) which is a user interface for a kind of experimental
design software, so actually there is a bug in the export function from FLAIR to
povray, and not in povray.


Post a reply to this message

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