|
|
Like this ?
// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7 =
#declare Uiter = 100;
#declare Viter = 100;
#declare Umin = 0.0000001;
#declare Umax = 0.9999999;
#declare Vmin = 0.0000001;
#declare Vmax = 1.9999999;
#declare iU = (Umax - Umin)/Uiter;
#declare iV = (Vmax - Vmin)/Viter;
#declare VV = Vmin;
#while (VV < Vmax)
#declare UU = Umin;
#while (UU < Umax)
// #declare UU = UU + iU;
// #declare VV = VV + iV;
#if (UU >= 1 | VV >= 2)
#debug concat("UU+ =", str(UU, 0, -1), "\n")
#debug concat("VV+ =", str(VV, 0, -1), "\n")
#end
// #declare UU = UU - iU;
// #declare VV = VV - iV;
#declare UU = UU + iU;
#end
#declare VV = VV + iV;
#end
// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7 =
But I'm not sure if I understand the problem corretly.
--
Best regards,
Tor Olav
mailto:tor### [at] hotmailcom
http://hjem.sol.no/t-o-k/tokpicts.html
http://www.crosswinds.net/~tok
ingo wrote:
>
> How should I rewrite the following to avoid UU & VV to become bigger
> than Umax and Vmax?
>
> #declare Uiter=100;
> #declare Viter=100;
> #declare Umin=0.0000001;
> #declare Umax=0.9999999;
> #declare Vmin=0.0000001;
> #declare Vmax=1.9999999;
> #declare iU=(Umax-Umin)/Uiter;
> #declare iV=(Vmax-Vmin)/Viter;
>
> #declare VV=Vmin;
> #while (VV<Vmax)
> #declare UU=Umin;
> #while (UU<Umax)
>
> #declare UU=UU+iU;
> #declare VV=VV+iV;
> #if (UU>=1 | VV>=2)
> #debug concat("UU+ =",str(UU,0,-1),"\n")
> #debug concat("VV+ =",str(VV,0,-1),"\n")
> #end
>
> #declare UU=UU-iU;
> #declare VV=VV-iV;
>
> #declare UU=UU+iU;
> #end
> #declare VV=VV+iV;
> #end
Post a reply to this message
|
|