divide vector object
Moderators: Víctor Paredes, Belgarath, slowtiger
-
capndreamer
- Posts: 2
- Joined: Sat Jul 23, 2011 11:02 am
divide vector object
Hi All,
Newbie here. I am just starting out with AS8. I wanted to know if there is a way to divide a single vector object into multiple parts? Example: Split a circle into 12 equal pie shaped parts. I can't find any info in the manual.
Thank you!
Newbie here. I am just starting out with AS8. I wanted to know if there is a way to divide a single vector object into multiple parts? Example: Split a circle into 12 equal pie shaped parts. I can't find any info in the manual.
Thank you!
You could try using the new Break Apart Shapes menu script (under Layer Effects). It's mainly designed for distributing shapes across multiple layers, but you can also restrict it to a single layer. Here are the steps you would go through to split a circle into 12 equal pie shaped parts:
1. Draw circle without fill or stroke enabled
2. Go to Scripts -> Draw -> Split Curve...
Set Point count to 2 and hit OK.
3. Use the Add Point with Auto-weld enabled to draw the pie shaped segments. To find the center point you could copy and paste the circle and scale it down until it is just a dot. You will also probably have to set the curvature of the center point to "Peak" using the Curvature tool.
4. Use the Paint Bucket tool to quickly go around and fill each segment with the fill and stroke colors you want.
5. Select the circle and go to Scripts -> Draw -> Split Curve... again.
Set Point count to 2 and hit OK.
6. Select all of the points and go to Scripts -> Layer Effects -> RT: Break Apart Shapes. Select "Put all shapes in one layer" and check "Create separate geometry for each shape".
7. This will create the separated shapes on their own layer. If they look right, you can delete the selected points on the current layer and copy and paste them from the new layer, then delete the new layer.
And that's it. You should now be able to move the segments separately from each other.
1. Draw circle without fill or stroke enabled
2. Go to Scripts -> Draw -> Split Curve...
Set Point count to 2 and hit OK.
3. Use the Add Point with Auto-weld enabled to draw the pie shaped segments. To find the center point you could copy and paste the circle and scale it down until it is just a dot. You will also probably have to set the curvature of the center point to "Peak" using the Curvature tool.
4. Use the Paint Bucket tool to quickly go around and fill each segment with the fill and stroke colors you want.
5. Select the circle and go to Scripts -> Draw -> Split Curve... again.
Set Point count to 2 and hit OK.
6. Select all of the points and go to Scripts -> Layer Effects -> RT: Break Apart Shapes. Select "Put all shapes in one layer" and check "Create separate geometry for each shape".
7. This will create the separated shapes on their own layer. If they look right, you can delete the selected points on the current layer and copy and paste them from the new layer, then delete the new layer.
And that's it. You should now be able to move the segments separately from each other.
Last edited by Rudiger on Sun Jul 24, 2011 1:37 am, edited 1 time in total.
Followed rudiger instructions and came up with this.

File here, asp 8.
http://www.mediafire.com/?dsxiw28v8xg8wv5

File here, asp 8.
http://www.mediafire.com/?dsxiw28v8xg8wv5
- funksmaname
- Posts: 3174
- Joined: Tue May 29, 2007 3:31 am
- Location: New Zealand
-
capndreamer
- Posts: 2
- Joined: Sat Jul 23, 2011 11:02 am
ROFL, will try one of mine.funksmaname wrote:lol
Also made it somewhat simpler last night.
Draw circle.
Connect middle points.
Select middle points then apply split curve with 1 as point count to create center point.
Select circle without center point.
Apply split curve with 8 as point count.
Create the parts of the pie.
Select all the parts one by one with the select tool while holding ALT(lasso tool)
Pasted all parts in another layer.
Used Create Shape tool to fill them.
Worked perfect, was a fun little project
I take it by "simpler", you meant "script-free". Surely there would have been more steps involved in manually copying and pasting each shape to the new layer than just running a menu script once only.GCharb wrote:ROFL, will try one of mine.funksmaname wrote:lol
Also made it somewhat simpler last night.
Draw circle.
Connect middle points.
Select middle points then apply split curve with 1 as point count to create center point.
Select circle without center point.
Apply split curve with 8 as point count.
Create the parts of the pie.
Select all the parts one by one with the select tool while holding ALT(lasso tool)
Pasted all parts in another layer.
Used Create Shape tool to fill them.
Worked perfect, was a fun little project
Cool animation, though. I think I might have to do my own now
Well, not script free, since the split curve script was used.
By simpler, I meant easier to understand for a noobie with little or no script knowledge.
Have not played much with the physics engine, I even complained about it being a new feature but I must admit it was fun!
Thanks for the animation, and yes you should make your own, just for the fun of it!
By simpler, I meant easier to understand for a noobie with little or no script knowledge.
Have not played much with the physics engine, I even complained about it being a new feature but I must admit it was fun!
Thanks for the animation, and yes you should make your own, just for the fun of it!
- funksmaname
- Posts: 3174
- Joined: Tue May 29, 2007 3:31 am
- Location: New Zealand
Thanks, took 10 minutes really.funksmaname wrote:Gilles, your animation is vastly superior to mine lol
I see, that's too bad. Still, there could be fun stuff to be made with it, like the motor function, one could do all sort of sprocket contraption, have the camera pan through tons of gears then at the end, an Easter egg comes out of a tube, silly stuff Wallace and Gromit style!funksmaname wrote: The physics is 'fun' but it ONLY works on things set up in frame 0. if the floor moves after frame 0 for example, everything will just land on the invisble floor... which is a shame...
- InfoCentral
- Posts: 935
- Joined: Fri May 26, 2006 12:35 pm
- Location: Los Angeles, CA

