POV-Ray : Newsgroups : povray.newusers : Re: parametric objects Server Time
4 Nov 2024 17:31:40 EST (-0500)
  Re: parametric objects (Message 1 to 3 of 3)  
From: Tor Olav Kristensen
Subject: Re: parametric objects
Date: 20 Sep 2003 00:17:29
Message: <Xns94394148BB0EEtorolavkhotmailcom@204.213.191.226>
"Miguel Garcia" <mig### [at] telefonicanet> wrote in
news:3f6ac4ec@news.povray.org: 

> I am having problems with the color of parametric objects. Using the
> code: 
> 
> #version 3.5;
> 
> camera {
>         location <0, 80, 0>
>         look_at <0, 0, 0>
>         angle 4
> }
> 
> light_source {
>     <1000, 2000, 0> color <1,1,1>
> }
> 
> 
> parametric {
>     function { cos(u)*cos(v) }
>     function { sin(u) }
>     function { cos(u)*sin(v) }
> 
>     <-pi/2,0>, <pi/2,2*pi>
>     contained_by { sphere{0, 1.1} }
> 
>     accuracy 0.0001
>     precompute 10 x,y,z
>     pigment {color <1,1,1>}
>   }
> 
> I get sphere of radius 1 that I would expect, but its is grey, with
> some bright white dots on it following a strange pattern (see the
> pic). However, if I use the sphere{} function to put a sphere in the
> same place, I get a beautiful, almost white sphere. What is happening?
> How can I solve it? 


Miguel, please note that a bug report concerning the parametric object
has been posted:

http://news.povray.org/povray.bugreports/32184
http://news.povray.org/povray.bugreports/32185/

(- to povray.bugreports 20. June 2003 by Wolfgang Wieser)


The problem you are experiencing seems for me to be related to the
contained_by statement. When using a sphere within this statement I
see the same "color problem" as you, but if I change it to a box,
then that problem disappear.

- So this looks like a bug to me, but I do not know if this is
related to the bug mentioned above.

Here is some code you can try to see how it works with a box within
the contained_by statement:

#version 3.5;

parametric {
  function { cos(u)*cos(v) }
  function { sin(u) }
  function { cos(u)*sin(v) }
  -<pi/2, pi>, <pi/2, pi>
  contained_by { box { -<1, 1, 1>, <1, 1, 1> } } // Works OK
//  contained_by { sphere { <0, 0, 0>, 1 } } // Gives "color" problems
//  accuracy 1e-6 // See comment below
  pigment { color rgb <1, 1, 1> }
}

light_source { <1, 1, -1>*200 color <1, 1, 1> }

camera {
  location <1, 2, -4>
  look_at <0, 0, 0>
}

//background { color blue 0.5 }


Comment for the POV-Ray team:

Uncommenting the accuracy line causes this "Internal Error" message:
"The POV-Ray rendering code caused an access violation exception"

While rendering images at 320x240 No AA, the rendering stops at line
71 when accuracy is set to 1e-6 and at line 115 when accuracy is set
to 1e-5. Setting accuracy to 1e-4 works OK (except for a black spot
on the sphere).

Setting AA to 0.3 causes the error to happen while rendering other
lines. (I'm not sure, but my keyboard "hammering" while rendering
sometimes seems to make the errors happen earlier.)

Is this the same problem as Wolfgang Wieser reported ?

(I'm using POV-Ray version 3.5.icl.win32 which runs in Windows 98
Second Edition on an Athlon XP2400+ PC with 512MB of RAM.)


Tor Olav


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: parametric objects
Date: 20 Sep 2003 06:57:59
Message: <3f6c32b7$1@news.povray.org>
In article <3f6ac4ec@news.povray.org> , "Miguel Garcia" 
<mig### [at] telefonicanet> wrote:

> (see the pic)

Please don't post binary attachments to non-binary groups in the future.

    Thorsten

____________________________________________________
Thorsten Froehlich
e-mail: mac### [at] povrayorg

I am a member of the POV-Ray Team.
Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: Miguel Garcia
Subject: Re: parametric objects
Date: 24 Sep 2003 12:16:59
Message: <3f71c37b@news.povray.org>
>
> The problem you are experiencing seems for me to be related to the
> contained_by statement. When using a sphere within this statement I
> see the same "color problem" as you, but if I change it to a box,
> then that problem disappear.

Thanks, I had found this solution some days ago. Now it works perfectly.

--

http://www.telefonica.net/web/miguelgdz/index.html


Post a reply to this message

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