|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Anyway, it doesn't do what you wanted. You should use
diferrent variables than xx and yy in your external loops
(e.g. #while (sx < 2) and #while (sy < 2) and add #declare
xx = sx ; #declare yy = sy ; just before #while (i <
MaxIter))
As for the error, do you get it immediately, or does it
loop some before crashing? (if the second, I'd be interested
in seeing the values of tt, xx, and yy just before the
crash...)
--
*******************************
* they'll tell you what can't * mailto:ber### [at] inamecom
* be done and why... * http://www.enst.fr/~jberger
* Then do it. *
*******************************
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
>Anyway, it doesn't do what you wanted. You should use
>diferrent variables than xx and yy in your external loops
>(e.g. #while (sx < 2) and #while (sy < 2) and add #declare
>xx = sx ; #declare yy = sy ; just before #while (i <
>MaxIter))
Right, and it has been fixed (and now it works) !, but it doesn't explain
the -nan !
> As for the error, do you get it immediately, or does it
>loop some before crashing? (if the second, I'd be interested
>in seeing the values of tt, xx, and yy just before the
>crash...)
No way : it crashes when I want to call #warning str(tt, 5,0) (1st time)
Thanks for helping
Philippe
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Ph Gibone wrote:
>
> >Anyway, it doesn't do what you wanted. You should use
> >diferrent variables than xx and yy in your external loops
> >(e.g. #while (sx < 2) and #while (sy < 2) and add #declare
> >xx = sx ; #declare yy = sy ; just before #while (i <
> >MaxIter))
>
> Right, and it has been fixed (and now it works) !, but it doesn't explain
> the -nan !
Well, usually nan represents infinity (when you divide
something by 0 for example, it doesn't always cause an
error, but returns nan), depends on your system...
But here, I didn't see what could cause it :-(
>
> > As for the error, do you get it immediately, or does it
> >loop some before crashing? (if the second, I'd be interested
> >in seeing the values of tt, xx, and yy just before the
> >crash...)
> No way : it crashes when I want to call #warning str(tt, 5,0) (1st time)
>
> Thanks for helping
> Philippe
You're welcome
Jerome
--
*******************************
* they'll tell you what can't * mailto:ber### [at] inamecom
* be done and why... * http://www.enst.fr/~jberger
* Then do it. *
*******************************
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|