Bitmap/Midpoint circle algorithm: Difference between revisions
Content deleted Content added
→{{header|J}}: simplify |
m →{{header|J}}: drawCircle to drawCircles |
||
Line 402:
)
NB.*
NB. x is: 2-item list of boxed (y0 x0 radius) ; (color)
drawCircle=: (1&{:: ;~ [: ; [: <@getBresenhamCircle"1 (0&{::))@[ setPixels ]
</lang>
Line 409:
'''Example usage:'''
<lang j> myimg=: 0 255 0 makeRGB 25 25 NB. 25 by 25 green image
myimg=: (12 12 12 ; 255 0 0)
viewRGB ((12 12 9 ,: 12 12 6) ; 0 0 255)
</lang>
|