# improved Disk[] function by including a radial range

GROUPS:
 Jihad AlSadah 1 Vote Hi,The basic Graphics entity Disk[{x, y}, r, {[Theta]i, [Theta]f}]Disk[{x,y},[Ellipsis],{Subscript[[Theta], 1],Subscript[[Theta], 2]}] is also expressed as follows: Disk[{x, y}, {rx, ry}, {[Theta]i, [Theta]f}]What I wish is for the Mathematica development team to upgrade the functionality of Disk by overloading this new version: Disk[{x, y}, {r, ri, rf}, {[Theta]i, [Theta]f}] Instead of the above elegant way, I must do the following: r := Sqrt[x^2 + y^2]; [Theta] := ArcTan[x, y] + Pi; RegionPlot[ ri < r < rf && [Theta]i < [Theta] < [Theta]f, {x, -rf, rf}, {y, -rf, rf}] This does not address the theta sign change near the -ve x-axisAny thoughts, Thanks, JH
2 years ago
5 Replies
 W. Craig Carter 2 Votes Hello, How about something like this: annulus[point : {x_, y_}, radii : {ri_, ro_}, color_: Black] := Graphics[ GraphicsGroup[{color, Disk[point, ro], White, Disk[point, ri]}] ] e.g., annulus[{1, 2}, {3, 5}] annulus[{1, 6}, {4, 4.2}, Yellow] This assumes that the background is white. You would need to use Show[] to combine it with other graphics. You could modify this to use limits for theta as well.
2 years ago
 Jihad AlSadah 2 Votes Hello,So, you hide part of a full disk by a smaller disk with background color. This should work for a small number of disks. However, for a graphical project that uses 2^3 or 2^4 such segments it becomes too taxi this way. RegionPlot does the job but it is slow to compute. I think that the function Disk could use a new improvement. Thank you, JH
 Jihad AlSadah 2 Votes Found it! ParametricPlot[r {Cos[t], Sin[t]}, {r, 2.1, 2.5}, {t, 0, Pi}] Thanks again, JH