POV-Ray : Newsgroups : povray.newusers : what is wrong? Server Time
24 Nov 2024 18:08:47 EST (-0500)
  what is wrong? (Message 1 to 3 of 3)  
From: Katherina
Subject: what is wrong?
Date: 8 Aug 2007 07:50:00
Message: <web.46b9ad588df9ac53d7b596fc0@news.povray.org>
I'm very new at Povray.


I want to find intersection of 30 planes and 19 quadratics, plane normals
and points are given in 2-dimensional array p and q, coefficients of
quadratics given in 2-dimensional array qq.


  #declare i=0;
  #declare j=0;


  #while (i<30)


  intersection{

  plane
{<p[i][0],p[i][1],p[i][2]>,p[i][0]*q[i][0]+p[i][1]*q[i][1]+p[i][2]*q[i][2]
}
pigment { color Red}
}

   #while (j<19)

  intersection {

  quadric
  {

<qq[j][2],qq[j][4],qq[j][6]>,<qq[j][7],qq[j][8],qq[j][9]>,<qq[j][1],qq[j][3],qq[j][5]>,qq[j][0]

  }
  pigment { color Red}
 }
  #declare j=j+1;

  #end


  #declare i=i+1;

  #end


 camera {
  location <10,10,50>
  look_at 0
}
light_source { <10, 10, 10> White }
 plane { y, -2 // y means <0,1,0>
  pigment { color Yellow}

}


I just see a black screen, why?


Post a reply to this message

From: Chris B
Subject: Re: what is wrong?
Date: 8 Aug 2007 08:21:44
Message: <46b9b558@news.povray.org>
"Katherina" <nomail@nomail> wrote in message 
news:web.46b9ad588df9ac53d7b596fc0@news.povray.org...
> I'm very new at Povray.
>
>
> I want to find intersection of 30 planes and 19 quadratics, plane normals
> and points are given in 2-dimensional array p and q, coefficients of
> quadratics given in 2-dimensional array qq.
>
>
>  #declare i=0;
>  #declare j=0;
>
>
>  #while (i<30)
>
>
>  intersection{
>
>  plane
> {<p[i][0],p[i][1],p[i][2]>,p[i][0]*q[i][0]+p[i][1]*q[i][1]+p[i][2]*q[i][2]
> }
> pigment { color Red}
> }
>
>   #while (j<19)
>
>  intersection {
>
>  quadric
>  {
>
>
<qq[j][2],qq[j][4],qq[j][6]>,<qq[j][7],qq[j][8],qq[j][9]>,<qq[j][1],qq[j][3],qq[j][5]>,qq[j][0]
>
>  }
>  pigment { color Red}
> }
>  #declare j=j+1;
>
>  #end
>
>
>  #declare i=i+1;
>
>  #end
>
>
> camera {
>  location <10,10,50>
>  look_at 0
> }
> light_source { <10, 10, 10> White }
> plane { y, -2 // y means <0,1,0>
>  pigment { color Yellow}
>
> }
>
>
> I just see a black screen, why?
>

See the other thread about nesting the loops like that.

Is it possible that the light source or the camera end up inside the shape?

Regards,
Chris B.


Post a reply to this message

From: Katherina
Subject: Re: what is wrong?
Date: 8 Aug 2007 08:45:01
Message: <web.46b9ba89a08627f1d7b596fc0@news.povray.org>
You are great Chris! Thanks a lot! Now I get the image!






"Chris B" <c_b### [at] btconnectcomnospam> wrote:
> "Katherina" <nomail@nomail> wrote in message
> news:web.46b9ad588df9ac53d7b596fc0@news.povray.org...
> > I'm very new at Povray.
> >
> >
> > I want to find intersection of 30 planes and 19 quadratics, plane normals
> > and points are given in 2-dimensional array p and q, coefficients of
> > quadratics given in 2-dimensional array qq.
> >
> >
> >  #declare i=0;
> >  #declare j=0;
> >
> >
> >  #while (i<30)
> >
> >
> >  intersection{
> >
> >  plane
> > {<p[i][0],p[i][1],p[i][2]>,p[i][0]*q[i][0]+p[i][1]*q[i][1]+p[i][2]*q[i][2]
> > }
> > pigment { color Red}
> > }
> >
> >   #while (j<19)
> >
> >  intersection {
> >
> >  quadric
> >  {
> >
> >
<qq[j][2],qq[j][4],qq[j][6]>,<qq[j][7],qq[j][8],qq[j][9]>,<qq[j][1],qq[j][3],qq[j][5]>,qq[j][0]
> >
> >  }
> >  pigment { color Red}
> > }
> >  #declare j=j+1;
> >
> >  #end
> >
> >
> >  #declare i=i+1;
> >
> >  #end
> >
> >
> > camera {
> >  location <10,10,50>
> >  look_at 0
> > }
> > light_source { <10, 10, 10> White }
> > plane { y, -2 // y means <0,1,0>
> >  pigment { color Yellow}
> >
> > }
> >
> >
> > I just see a black screen, why?
> >
>
> See the other thread about nesting the loops like that.
>
> Is it possible that the light source or the camera end up inside the shape?
>
> Regards,
> Chris B.


Post a reply to this message

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