POV-Ray : Newsgroups : povray.text.scene-files : Help needed : Help needed Server Time
28 Jul 2024 22:21:51 EDT (-0400)
  Help needed  
From: Ph Gibone
Date: 1 May 1999 03:31:09
Message: <372a9fad.0@news.povray.org>
Could anybody (I don't mean *YOU* NdP (Not Dignified Pover)) tell me what's
wrong with this code :

All I get for yy is -nan (means "minus Not A Number(BTW I wonder what the
minus means if it is not a number ?))

If I take out the comment #debug str(tt,5,3), I get a GPF in PovEngine.exe
!!

HYCH (Hope you can Help) ;-}

Philippe

PS : Sorry Ken it's indented



#macro DrawJulia (cx, cy, MaxIter)

     #declare i = 0;
     #declare xx = -2;
     #declare tt = 0;
     #while (xx < 2)
          #declare yy = -2;
          #while (yy < 2)
               #while (i < MaxIter)
                    #declare tt = xx*xx - yy*yy + cx;
//                  #debug str(tt,5,3)
                    #declare yy = 2*xx*yy + cy;
                    #declare xx = tt;

                    #if (xx*xx + yy*yy > 4)
                         #break
                    #end
                    #declare i = i  + 1;
               #end
               #if (i = MaxIter)
                    sphere {<xx, yy, 0>, .1 pigment {color rgb <1,0,0,>}  }
               #end
               #declare yy = yy + 4/100;
               #warning "yy = "
               #warning str(yy,5, 3)
               #warning "\n"
          #end
          #declare xx = xx + 4/100;
          #warning "xx = "
          #warning str(xx,5, 3)
          #warning "\n"
     #end
#end

DrawJulia(-1.5, 0, 150)


Post a reply to this message

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