Adventure Game Studio

Community => General Discussion => Topic started by: ALPHATT on Sat 30/07/2011 12:37:20

Title: Dividing shapes in images.
Post by: ALPHATT on Sat 30/07/2011 12:37:20
I don't where this should go so I'm posting here:

Alright so say I have a circle and I wanna draw x amount of radii so that I can divide the circle into y amount of parts much like a cake. I get that I can easily do this by hand with small amounts but is there a program that can automatically do/calculate this when I need a lot of 'slices'.
Title: Re: Dividing shapes in images.
Post by: Khris on Sat 30/07/2011 22:34:19
Do you mean a pie chart?

Excel or any other spreadsheet software can do this.
Title: Re: Dividing shapes in images.
Post by: Wyz on Sun 31/07/2011 13:32:53
Well the whole circle is 2π radians or 360 degrees. If you want to divide it into y parts you get 2π/y radii or 360/y degrees. You can use sine and cosine to get the x and y coordinates for that. It is exactly the same if you want to automate this process.
Title: Re: Dividing shapes in images.
Post by: Gilbert on Sun 31/07/2011 15:15:53
Whatever Wyz+ has said.

Yeah, it's not difficult to do. For example, we can do this with AGS:
(http://i488.photobucket.com/albums/rr249/gilbot/Pies.png)