If your object is odd-shaped I have the feeling that it won't make a very good pie chart. It will be difficult to compare visually the relative areas og the slices.
Apart from that I don't think there's any way to divide an irregular shape automatically into slices of a predetermined area. You would presumably need to start off by finding the shape's centre of gravity but that will only get you so far. (There are threads about that. Here's a nice long one: http://forums.adobe.com/message/4279794#4279794)
What kind of "odd shape" do you have in mind?
If you're talking about having AI's pie graph functionality automatically substitute any arbitrary shape for the circular pie, then no, there is no feature for such a thing.
If you're talking about manually substituting the arbitrary shape(s), and the stumbling block is just knowing the area of the arbitrary shape:
1. Use the Pie Chart Graph tool to create a plain vanilla pie chart.
2. Ungroup the chart completely (several nestings deep) until you have individual paths.
3. Select a wedge, run the script (a simple script is below), note the area.
4. Draw the corresponding arbitrary shape, run the script, note the area.
5. Divide the areas to arrive at a scale factor.
6. Scale the arbitrary shape accordingly.
A little elaboaration of the script could automatically scale the arbitrary shape to the same area as that of the pie chart slice, but doing the simple math should not be arduous for occasional need.
So, for example, suppose you wanted to conceptually compare the counts of three separate recycled items by depicting proportional heaps of each item: aluminum cans, plastic bottles, glass bottles. You could:
1. Store a graphic of a single can, a single plastic bottle, and a single glass bottle as Symbols.
2. Use the Symbolism tools (Sprayer, Sizer, Scruncher, Spinner, etc.) to draw the three heaps.
3. Use the procedure described above to determine scale factors for the three heaps.
The results could look like three similarly- but irregularly-shaped piles of cans, plastic bottles, and glass bottles, proportionally sized to suggest the relative counts of recycled items.
Obviously this method will work as long as the original object is roughly pie-shaped.
But what if it's L-shaped or even just plain square? You're going to get into hellish trouble reckoning out the areas of the slices (like JET explains).
It's a bit like dividing seven potatoes equally between five people – usually the easiest way is to mash them.
Usually here referred to as mashed potatoes.
So that's just about the same. How about bangers or don't you have them? And I don't mean wieners/frankfurters.
Proper bangers ares made from fat pork, breadcrumbs moistened with milk, pepper, salt and various herbs.
Sold uncooked (pale and limp) and they fatten up when fried so you have to ***** them beforehand so that the skins don't split. Fry until crisp on the outside.
The final result looks something like this (the gravy is optional):
Hahahaha how the hell did we get into bangers and mash recipees!!!!!
If I could pull this back to my original question for a minute, I'm looking for a method which can split more uneven shapes, the first one I'm working on is to relect differnt stats about wood recycling, and I want to split this odd shaped log into chunks to reflect the stats.
I did think about using the pie chart tool like Mike suggested, but that would mean the bits on the left and right have a much lower surface area than the ones on the top and bottom.
Is there no way to eithr tweak a standard pie so its shape fits this one, or to divide this up according to percentages of its surface area?
I'd really like to know as this is the only image I have which is remotely simlar to standard pies.
FYI pie and mash tops bangers and mash any day and gravy is NEVER optional!!!!!!
I came this far:
1. Select the base object, and enter a series of values. Easy as Pie Chart, so far. Even drawing a proper pie on top of the selection -- to use as a base value -- is ... doable. Just.
2. you cannot get 'the area' of a symbol or compound object. So I (manually!) draw an outline copy on top of the original and used that.
3. you cannot 'intersect', 'minus back', or do any other pathfinder operation. So I copied Carlos' method of creating a Graphic Style for Minus Back.
4. you cannot Expand Appearance from a script, and you cannot measure the area of a live Minus Back'ed object.
There goes my idea, down the drain: calculate the deviation of the sliced-up object to the value required, adjust, and re-slice the object according to this new insight.
Instead I got an entirely new insight. Guess what it was.
We got into mashed potatoes because the best way to recycle your log of firewood is to reduce it to sawdust and then regroup it.
JET's answer is probably next best but my brain doesn't work the same way as his so I'm sure I would never get a script like he suggests to work properly.
Mike's way is good too but you would need to fiddle with it if you want to get the centre vertices to match the centre of the annual rings. I reckon I would fake it and hope that no-one would notice (which they probably wouldn't if you did it well). It has something to do with positioning the centre of the (undistorted) pie chart on a point diametrically opposite the centre of the annual rings and then moving just the centre points back the the centre of the rings, but I don't know how to do it mathematically.
Or maybe Jongware has got something up his sleeve that he's not letting on about.
hahaha...sorry about that Jongware, I know, it's not funny...are you implying you can actually do stuff with ID scripting?
Instead I got an entirely new insight. Guess what it was.
#@%& Illustrator Scripting?
Message was edited by: CarlosCanto
In a stump chart case like this it would seem appropriate to use the pith as the starting point of the chart.
The following images show a relatively simple way of making a quite accurate division in connexion with a stump that has a strongly asymmetric shape with reaction wood.
Always keep a copy of the artwork at different stages.
I) shows the stump, the stroke/nofill annual rings and the pith as a group kept on top and (mostly) locked in the following steps, the stroked and filled (outer) shape of the stump being worked with.
II) shows a division aid in the form of a 360 (1 degrees) pie chart, made from a Polar grid with 0 Concentric Dividers and 360 Radial Dividers: the Radial Dividers are extended past the outer circle, and the pie pieces are formed by Pathfinder>Divide.
III) shows the division aid centred over the pith.
IV) shows the stump moved on top of the division aid, its fill covering the inner part.
V) shows the result of Object>Path>Divide Objects Below where the stump has cut the division aid.
VI) shows the result when the outlying superfluous parts of the division aid have been deleted.
Now the division aid consists of 360 closed paths, each spanning 1 degree, all starting/meeting at the pith. These should be Ungrouped.
At any time up to this point, the total stump area may be determined, for older versions the free Telegraphics PathArea Filter may be used (available at http://www.telegraphics.com.au/sw/browse/Filters).
Now it is easy to select a number of closed paths of the division aid and use the PathArea filter (or whatever) to determine the proportion of the total area (simple division), to adjust by adding/removing and/or undoing/redoing, and then to Pathfinder>Unite (or whatever it is called in the version in question) to create a piece of the pie, and finally to increase the Stroke Weight as desired.
VII) shows the result of creating the top piece of 11%.
VIII) shows the result of creating all the pieces (made clockwise one at a time), the three 11% pieces (the first one and the two last ones) chosen to be alike, thus showing the great difference(s) in angles for identical areas.
This procedure leads to a great number of Anchor Points in the bark; it is possible to get rid of them by scaling the pieces with the pith as the key object, placing the original stump path on top, and Object>Path>Divide Objects Below, then delete the outlying parts.
It is also possible to move the pieces apart, away from the pith, if there is a wish to hurt the stump (even more).
The accuracy is well within 0.1% of the total stump area for the least accurate pieces.
OMG you potato heads, you had the right answer but you didn't know it. I have a MUCH easier answer that the math above:
1. Make your pie chart in illustrator. You can color your wedges as you would like in the final. (Lots of tutorials on making a pie chart, not covered here.)
2. THIS IS THE KEY THING: Ungroup the pie wedges.
3. Create the shape you want. You just really want the outline in the end. This is your mask. I find it helpful to give it a transparency value.
4. Place your mask over the pie chart. This is where transparency is helpful.
5. Now make the mask clear -- no color value.
6. Select pathfinder > divide. Since the pie chart is ungrouped, each wedge is divided based on the outline of your shape.
7. Delete the shape parts outside your shape.
Easy as pie. No math.