Uhm this one was quite easy to find out on my own....
If anyone needed the code this is it:
CODE
def draw_circle(x,y,radius,width,teta0=0,teta1=2*Math::PI,color=Color.new(0,0,0))
#2pi * radius should be enough but 8 is more than enough to have the circle DENSELY filled.
intervals = radius*8
each = (teta1-teta0).to_f / intervals
for j in 0...width
rad = radius + j - width/2
for i in 0...intervals
angle = (i * each + teta0)
x_pos = Math.cos(angle) * rad + x
y_pos = -Math.sin(angle) * rad + y
self.fill_rect(x_pos, y_pos, 1,1, color)
end
end
end
enjoy it! I have used it to draw sphere grid lines
This post has been edited by Feoden: Feb 24 2012, 07:08 AM