✅ Concentric Circles
Hi,
If you look at the image, you can that each time a circle is being draw, it is shifted to the right a bit. I don't want it to do that. I want it to draw the circles like a dartboard basically. below is the code for my circle case block. please can you help me figure it out?
https://hastebin.com/medoqapadu.csharp
Hastebin: Send and Save Text or Code Snippets for Free | Toptal®
Hastebin is a free web-based pastebin service for storing and sharing text and code snippets with anyone. Get started now.
8 Replies
my guess is you need to move your circle based on the radius change when you draw a new circle
it looks like it isnt being shifted at all, in fact it's drawing from top left to bottom right for all circles
as you can see here they all share the same point, so for each circle after the first you need to shift the circle by x radius
im not sure what the code for your Fill and Draw look like but I am assuming it's drawing like a rect not a expanding from the centre
you'll have to offset it in your Fill and Draw functions
so should i just move this
into the for loop if statement?
you just need to shift by the radius, not the diameter
if you shift by the diameter you will achieve the same pattern but backwards
also I just realized you are adding, you want to subtract from x & y since you are drawing from top left to bottom right
x -= radius;
y -= radius;
then if I am correct your circles center point should be at 200,200
at least its changed direction lmfaoo
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.