Draw a sphere: Difference between revisions
Content added Content deleted
Einstein1969 (talk | contribs) |
|||
Line 1,318: | Line 1,318: | ||
rem more info: https://www.dostips.com/forum/viewtopic.php?f=3&t=6744 |
rem more info: https://www.dostips.com/forum/viewtopic.php?f=3&t=6744 |
||
rem integer sqrt arithmetic function by Aacini and |
rem integer sqrt arithmetic function by Aacini, penpen and einstein1969 |
||
rem source: https://www.dostips.com/forum/viewtopic.php?f=3&t=5819&start=30#p44016 |
rem source: https://www.dostips.com/forum/viewtopic.php?f=3&t=5819&start=30#p44016 |
||
set "sqrt(N)=( M=(N),j=M/(11*1024)+40, j=(M/j+j)>>1, j=(M/j+j)>>1, j=(M/j+j)>>1, j=(M/j+j)>>1, j=(M/j+j)>>1, j+=(M-j*j)>>31 )" |
set "sqrt(N)=( M=(N),j=M/(11*1024)+40, j=(M/j+j)>>1, j=(M/j+j)>>1, j=(M/j+j)>>1, j=(M/j+j)>>1, j=(M/j+j)>>1, j+=(M-j*j)>>31 )" |
||
Line 1,379: | Line 1,379: | ||
set /a "sqrdR=R*R*100*100" %== R*R is mult. by 100*100 ==% |
set /a "sqrdR=R*R*100*100" %== R*R is mult. by 100*100 ==% |
||
set "k=2" %== k is hardcoded to 2 ==% |
set "k=2" %== k is hardcoded to 2 ==% |
||
set "ambient=% |
set "ambient=%2" |
||
rem start draw line-by-line |
rem start draw line-by-line |
||
for /l %%i in (%negR%, 1, %R%) do ( |
for /l %%i in (%negR%, 1, %R%) do ( |