Arranging objects radially by simultaneously moving and rotating them?

Could anyone advise how to arrange a large number of symbol instances radially in a very specific way. Lets say we place the first symbol instance on the page, this would be the center of the pattern and reference point for rotation. Then we duplicate it by offsetting its first copy some distance aside.
The third one and all subsequent copies must be:
1.rotated to a specific angle relative to the previous one, with the first central object as the reference point.
2.offset aside further by an increased distance relative to the previous one.
e.g. conditions: rotation angle = 17°,  offset = 1 cm, offset increment = 0,1cm
- 1st copy is 1 cm away from the center, rotation is 0°
- 2nd copy is 2,1 cm away from the center, rotation is 17°
- 3rd copy is 3,2 cm away from the center, rotation is 34°
- 4th copy is 4,3 cm away from the center, rotation is 51°
- 5th copy is 5,4 cm away from the center, rotation is 68°
...and so on, unfortunately I can't arrange them manually because there are hundreds of them.
How would You do that? Thanks in advance.

here you go, 5 copies
50 copies
#target Illustrator
//  arranges duplicates of selected object into a spiral
// step is 1.1 cm - 17 degrees hardcoded
// select object before running
// CarlosCanto 3/1/11
var idoc = app.activeDocument;
var isymbol = idoc.selection[0];
var teta = 0; // initial angle
var r = 1*28.346; // first dup, // 1 cm = 28.346 pts
var deltaTeta = 17; // angle increment
var deltar = 1.1*28.346; // distance increment
var a = prompt ("how many copies", 5, "Spiral Symbol Duplicates")
for (i=1 ; i<=a ; i++)
          var dupSymbol = isymbol.duplicate();
          var deltaX = r*Math.cos(teta*Math.PI/180);
          var deltaY = r*Math.sin(teta*Math.PI/180);
          dupSymbol.translate (deltaX, deltaY);
          r = r+deltar;
          teta = teta+deltaTeta;

Similar Messages

  • Enquiry about character moving and rotating diagonally on tiled map....

    I have been able to make my character move up down the map and not going thru the wall. I also have able to move diagonally but it move faster than the up and down speed. Also i can't figure out how to rotate the character when it moved diagonally.....
    Any hints or help?

    rotate() should always be accompanied with appropriate translate().
    See:
    http://java.sun.com/docs/books/tutorial/2d/TOC.html
    http://www.adtmag.com/java/articleold.aspx?id=1241
    http://www.apl.jhu.edu/~hall/java/Java2D-Tutorial.html
    And, never mix AWT components with Swing ones.
    Use JPanel instead of Canvas.
    Use also standard drawing/painting technique shown above URSs.

  • Using Access to store OLE objects like Excel , Word docs and retrieve them

    Hi folks,
    I need a solution for this problem guys.
    The logic is like this : A portable exe file and a database. Database contains files stored ( embedded ) in it like Excel , Word , notepad etc.
    On running the exe file and giving necessary prompts or combo entries, it should display all files related to the selection and On clicking the link the document should open itself.
    Why I use Access : Most of the PC contains MS Office. Otherwise I have to use a lightweight protable database.
    Also it should be able to store files into it. As far as I know , Access can store excel and images etc. Is there any other protable db capable of storing excel and word docs.
    After storing how do I retrieve the file. I have read about displaying images. What about excel files...

    Portable as in the sense every one can cary the file and the MS access database and can access data whenever they want . They can carry it in their flash drive / USB drive. Only the data base would get updated with the data. So in effect , One could access the updated documents by the means of a query.
    This should work in Windows environment

  • Group and Rotate in indesign

    How can I Group objects on an active layer and rotate them counterclockwise?

    Hi Fist
    does this suit your purpose?, set up using OSX 10.4.11 IDCS3
    tell application "Adobe InDesign CS3"
    activate
    try
    set mylayer to "TEST"
    set active layer of active window to mylayer
    end try
    set myDoc to active document
    set mySel to page items of myDoc
    tell myDoc
    set _mynewsel to make group with properties {group items:mySel}
    set rotation angle of _mynewsel to 90
    end tell
    end tell
    Budgie

  • Mouse drag and rotation

    How do I rotate an object with the mouse after I have dragged the object with mouse. Essentially, I want to move the object with the mouse and then rotate it with another mouse click. Right now the object is moving and rotating at the sime time.

    The problem arises due to the CLICK event being determined by the combination of a MOUSE_DOWN event followed by a MOUSE_UP event.  So your CLICK event occurs as soon as you release the drag.  You need to pull assigning the CLICK event out of the dragging scene altogether., otherwise it will be triggered.  One way to do that is to have two clicking functions at work for you.  One that uses the click that registers from the dragging to initiate the listener for other that deals with the rotation.  Here's one way to code it... it removes listeners once they have served their purpose...
    graybox.addEventListener(MouseEvent.MOUSE_DOWN, pickUp);
    function pickUp(event:MouseEvent):void
          event.target.startDrag(true);
          graybox.removeEventListener(MouseEvent.MOUSE_DOWN, pickUp);
          graybox.addEventListener(MouseEvent.MOUSE_UP, dropIt);
    function dropIt(event:MouseEvent):void
          event.target.stopDrag();
          graybox.removeEventListener(MouseEvent.MOUSE_UP, dropIt);
          graybox.addEventListener(MouseEvent.CLICK, addClick);
    function addClick(event:MouseEvent):void
          graybox.removeEventListener(MouseEvent.CLICK, addClick);
          graybox.addEventListener(MouseEvent.CLICK, onClick);
    function onClick(event:MouseEvent):void
         event.target.rotation+=5;
         graybox.removeEventListener(MouseEvent.CLICK, onClick);
         graybox.addEventListener(MouseEvent.MOUSE_DOWN, pickUp);
    graybox.buttonMode=true;

  • Tap picture in Photos App and rotate - issue / Pls help

    Hello all,
    Subject: iPhone 3Gs / 4.0.1
    Application: Photos App (default Apple application)
    Issue: tapping landscape pictures with phone in vertical position and rotate them goes on black screen
    Description:
    I am with iphone in normal (vertical position) and i go to photos app in order to scroll some pictures that were taken in landscape position.
    Everything is normal. I double tap it in order to zoom it.
    I rotate the phone in landscape position and the screen goes BLACK.
    I rotate it in portrait mode and picture is back on screen.
    Question: where is the problem ?
    Tests results:
    I tried to make several tests to identify the problem.
    Before I want to say that i tried restore / reset / etc.
    1. The pictures that are taken in portrait mode are not affected on double tap and rotate thing.
    2. Works if you zoom manualy (not by double tap) and scroll to a corner of a landscape picture before you rotate the phone.
    I add that any other application works fine on rotate / zoom / etc even photos app works OK if i dont double tap the picture before i rotate it.
    Still after the tests i am not able to identify where is the problem so i ask the comunity if can help me to identify it.
    thx in advance,

    Is anyone with same model 3gs / 4.0.1 who can check if have same problem ?
    Are only 4 steps:
    1. Open Photo App with phone in vertical position
    2. Select a landscape picture
    3. Double tape it (will zoom automaticaly)
    4. Rotate the phone in landscape position and write down the results.
    thx guys for your help,

  • Tap picture in Photos App and rotate - issue

    Hello all,
    Subject: iPhone 3Gs / 4.0.1
    Application: Photos App (default Apple application)
    Issue: tapping landscape pictures with phone in vertical position and rotate them goes on black screen
    Description:
    I am with iphone in normal (vertical position) and i go to photos app in order to scroll some pictures.
    Everything is normal. I double tap it in order to zoom it.
    I rotate in landscape position and the screen goes BLACK.
    I rotate it in portrait mode and picture is back on screen.
    Question: where is the problem ?
    Tests results:
    I tried to make several tests to identify the problem.
    Before I want to say that i tried restore / reset / etc.
    1. The pictures that are taken in portrait mode are not affected on double tap and rotate thing.
    2. Works if you zoom manualy (not by double tap) and scroll to a corner of a landscape picture before you rotate the phone.
    I add that any other application works fine on rotate / zoom / etc even photos app works OK if i dont double tap the picture before i rotate it.
    Still after the tests i am not able to identify where is the problem so i ask the comunity if can help me to identify it.
    thx in advance,
    Message was edited by: booog

    Is anyone with same model 3gs / 4.0.1 who can check if have same problem ?
    Are only 4 steps:
    1. Open Photo App with phone in vertical position
    2. Select a landscape picture
    3. Double tape it (will zoom automaticaly)
    4. Rotate the phone in landscape position and write down the results.
    thx guys for your help,

  • Some pictures in photo stream are sideways, how do I rotate them?

    I imported all my new photos into one event and rotated them as needed.  Now I see them in photo stream and some are rotated and some are not.....what is going on?  How can I have all pictures face the correct direction?
    Thanks for your help!

    How are you vieing your photos and how were they taken?
    If they were taken with an iOS device (iPhone, iPad, iPod Touch) then they have embedded in the EXIF data the camera orientation.  If your viewing software is current enough, it will read this information and display the photos in the proper orientation.  If you have pulled these photos into a software which does not honoir this EXIF header information, you could have rotated them, and now be causing applications which do honor the header to be rotating the image incorrectly.
    To be able to provide moe help, we will need more specifics.

  • I have a temp working for me and she scanned all our batches upside down is there a way to flip them and save them without her having to rescan every batch.  We have tried flipping them and doing a save as, we have also tried to flip them and create a new

    I have a temp working for me and she scanned all our batches upside down is there a way to flip them and save them without her having to rescan every batch.  We have tried flipping them and doing a save as, we have also tried to flip them and create a new pdf document but nothing seems to be working

    If the file type is PDF then open them in Acrobat and rotate them via Tools - Pages - Rotate (not via the View menu, which is only temporary).
    You can also do this in an Action, if you have Acrobat Pro, and process multiple files in a single process.

  • Moving and Arranging Objects?

    I want to create a Flash animation in which a user has a
    bunch of objects in front of them (say, four apples, five oranges
    and three plums) and three containers. They can drag the objects
    and put them in any of the three containers. How would I go about
    creating the logic for this to work? Thanks.

    You pretty much have the logic defined by what you just
    described. The tools to make it a reality would involve the
    startDrag() method, stopDrag() method, and dropTarget property.
    When you drop an objet you need to test if it was released on a
    valid dropTarget.

  • How separate and rotate pieces of an object in preparation for creation of a GIF in After Affects?

    Here is the image that I'm working with...
    I want to make this object rotate a tight 90 degrees in After Effects and then separate. If you're wondering why I put this up under Photoshop it is because I need to have this model in addition to 2 others, one of the top half and one of the bottom half and button, both turned 90 degrees [preferably clockwise] in order to create the GIF. I need these 3 pieces before I can even consider creating the GIF in After Effects... so if somebody either wants to try and do it for me or to try and help me to do it on my own, either one would be extremely helpful

    Don't worry guys, I actually found the answer all on my own what I needed was to separate the image into 3 files, something I was probably going to do anyways to make exporting and importing the images easier and rotating the two top and bottom half images here's what I have right now (per background removal)Thanks for trying to help... but I think I'm ready to move on to After effects with this one The reason I'm moving it to after effects is simply because I understand simple movement/animation there already... if you're curious as to what I plan on doing with these images, the complete ball will sit in a hole in my border, turn a sharp 90 degrees right and then be replaced by the two half images, the bottom one will fade slowly out while the top is lifted off screen to the right... it's a fancy reveal for my upcoming project thanks again

  • How to add two objects on scene and how to rotate them?

    I am beginer on 3d. I am trying do write applet where are 3x3x3 rubic.
    My plans are to have 27 litle cubes. There are 6 flats (9 cubes in a flat) so i have six objects groups. My problem at this moment is that i cant find out how to make two objets. Each of this two objects consists from couple more litle objects. Some of litle objects can be in first and second big object. For example it can be two flats of rubic (corner).
    Is anybody have some examples or somehow to hepl me to find out.
    Thanks a lot

    I have code :
    import java.applet.Applet;
    import java.awt.*;
    import java.awt.event.MouseEvent;
    import java.awt.event.MouseListener;
    import com.sun.j3d.utils.applet.MainFrame;
    import com.sun.j3d.utils.behaviors.mouse.*;
    import com.sun.j3d.utils.universe.SimpleUniverse;
    import javax.media.j3d.*;
    import javax.vecmath.AxisAngle4f;
    import javax.vecmath.Color3f;
    import javax.vecmath.Vector3f;
    public class RubicApplet extends Applet implements MouseListener
         TransformGroup objRotate = null;
    public BranchGroup createSceneGraph(SimpleUniverse su,Canvas3D canvas)
         // Create the root of the branch graph
         BranchGroup objRoot = new BranchGroup();
         objRoot.setCapability(BranchGroup.ALLOW_DETACH);
    Transform3D transform = new Transform3D();
         transform.setRotation(new AxisAngle4f(.5f,1f,1f,.5f));
    BoundingSphere behaveBounds = new BoundingSphere();
    // create Cube and RotateBehavior objects
    objRotate = new TransformGroup(transform);
    objRotate.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
    objRotate.setCapability(TransformGroup.ALLOW_TRANSFORM_READ);
    objRotate.setCapability(TransformGroup.ENABLE_PICK_REPORTING);
    // Colors
    Color3f gray = new Color3f(0.2f,0.2f,0.2f);
    Color3f red = new Color3f(1.0f,0.0f,0.0f);
    Color3f white = new Color3f(1.0f,1.0f,1.0f);
    Color3f yellow = new Color3f(1.0f,1.0f,0.0f);
    Color3f green = new Color3f(0.0f,1.0f,0.0f);
    Color3f blue = new Color3f(0.0f,0.0f,1.0f);
    Color3f purple = new Color3f(1.0f,0.0f,1.0f);
         // Object possition
    float x=-0.5f;
    float y=-0.5f;
    float z=-0.5f;
    objRoot.addChild(objRotate);
         // colors for: back, front, right, left, bottom, top
    Color3f[] myColors0 = {white,gray,gray,red,blue,gray};
    RCube cube1 = new RCube(myColors0,new Vector3f(x-1,y-1,z-1));
         // colors for: back, front, right, left, bottom, top
    Color3f[] myColors1 = {gray,gray,gray,red,blue,gray};
         RCube cube2 = new RCube(myColors1,new Vector3f(x-1,y-1,z+1));
         // colors for: back, front, right, left, bottom, top
    Color3f[] myColors2 = {gray,yellow,gray,red,blue,gray};
         RCube cube3 = new RCube(myColors2,new Vector3f(x-1,y-1,z+3));
    // colors for: back, front, right, left, bottom, top
    Color3f[] myColors3 = {white,gray,gray,red,gray,gray};
         RCube cube4 = new RCube(myColors3,new Vector3f(x-1,y+1,z-1));
    objRotate.addChild(cube1);
    objRotate.addChild(cube2);
    objRotate.addChild(cube3);
    objRotate.addChild(cube4);
    MouseRotate myMouseRotate = new MouseRotate();
    myMouseRotate.setTransformGroup(objRotate);
    myMouseRotate.setSchedulingBounds(new BoundingSphere());
    objRoot.addChild(myMouseRotate);
    MouseTranslate myMouseTranslate = new MouseTranslate();
    myMouseTranslate.setTransformGroup(objRotate);
    myMouseTranslate.setSchedulingBounds(new BoundingSphere());
    objRoot.addChild(myMouseTranslate);
    MouseZoom myMouseZoom = new MouseZoom();
    myMouseZoom.setTransformGroup(objRotate);
    myMouseZoom.setSchedulingBounds(new BoundingSphere());
    objRoot.addChild(myMouseZoom);
    // Let Java 3D perform optimizations on this scene graph.
    objRoot.compile();
         return objRoot;
    public RubicApplet()
    setLayout(new BorderLayout());
    GraphicsConfiguration config =SimpleUniverse.getPreferredConfiguration();
    Canvas3D canvas3D = new Canvas3D(config);
    canvas3D.addMouseListener(this);
    add("Center", canvas3D);
    SimpleUniverse simpleU = new SimpleUniverse(canvas3D);
    BranchGroup scene = createSceneGraph(simpleU,canvas3D);
         simpleU.getViewingPlatform().setNominalViewingTransform();
    simpleU.addBranchGraph(scene);
    public static void main(String[] args)
    Frame frame = new MainFrame(new RubicApplet(), 600, 600);
         public void mouseClicked(MouseEvent e)
         public void mouseEntered(MouseEvent e)
         public void mouseExited(MouseEvent e)
         public void mousePressed(MouseEvent e)
         public void mouseReleased(MouseEvent e)
    I need to rotate with some event two cubes and with some other event rotate three cubes

  • In Macromedia Flash8 we had an option insert timeline effects rotate. Do we have any option to rotate an object in Adobe Flash cs5 and above

    in Macromedia Flash8 we had an option insert>timeline effects>rotate. Do we have any option to rotate an object in Adobe Flash cs5 and above.

    You can also use the following:
    1 Select the object to rotate > Right Click > Create Motion Tween.
    2 Click on the last frame of the Motion tween and choose the desired Rotation settings from Properties panel.

  • Possible to creat a group of 3d objects and rotate each based on group's axis?

    I need to create an extruded rectangle.  On the face of that rectangle needs to be another extruded rectangle.  I'd like to be able to rotate both seperate objects in 3d based upon the same axis.  Is this possible?  I've played around with the 3d effects and cant seem to get this to work.

    An alternative can be: Make one rectangle and apply the Extrude effect. Drag it in the Symbols panel so as to make it a Symbol. Now draw another rectangle and apply the Extrude effect. In the Extrude dialog, use Map Art to map the symbol (of extruded rectangle).
    If you want to rotate them both along the same axis, either open the Appearance panel and change the already applied Extrude effect to rotate , or,
    Edit the symbol and rotate as required (this will reflect in the the whole doc) and rotate the another rectangle separately using Rotate tool.
    I hope it helps.

  • How would i make an object and rotate it?

    ok, i'm trying to get java to make a graphics object, and then create an array of said objects (basically just a bunch of rectangles organized into rows/columns) with the end goal being that i be able to put this collection of rectangles into a JPanel and then move it around and rotate it without changing its dimensions (so each rectangle in the collection retains the same height and width but with a different placement/orientation angle )
    My java textbook (yes, college student) doesn't cover the Graphics2D stuff which SEEMS to be what i would use... but beyond that I'm finding the resources on the topic to be uniformly opaque. i think i just need some starting point to extrapolate from. could anyone reply me a crash course in the above...?

    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class Blocks extends JPanel {
        Block[][] blocks;
        int dx = 2;
        int dy = 2;
        public Blocks() {
            registerKeys();
            setFocusable(true);
        protected void paintComponent(Graphics g) {
            super.paintComponent(g);
            Graphics2D g2 = (Graphics2D)g;
            g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                                RenderingHints.VALUE_ANTIALIAS_ON);
            if(blocks == null) initBlocks();
            g2.setPaint(Color.red);
            for(int j = 0; j < blocks.length; j++)
                for(int k = 0; k < blocks[j].length; k++)
                    blocks[j][k].draw(g2);
        private void initBlocks() {
            int rows = 6;
            int cols = 3;
            Dimension d = new Dimension(200, 200);
            BlockMaker blockMaker = new BlockMaker(rows, cols, d);
            blocks = blockMaker.getBlocks();
        private void registerKeys() {
            getInputMap().put(KeyStroke.getKeyStroke("UP"), "UP");
            getActionMap().put("UP", up);
            getInputMap().put(KeyStroke.getKeyStroke("LEFT"), "LEFT");
            getActionMap().put("LEFT", left);
            getInputMap().put(KeyStroke.getKeyStroke("DOWN"), "DOWN");
            getActionMap().put("DOWN", down);
            getInputMap().put(KeyStroke.getKeyStroke("RIGHT"), "RIGHT");
            getActionMap().put("RIGHT", right);
        private void step(int x, int y) {
            for(int j = 0; j < blocks.length; j++)
                for(int k = 0; k < blocks[j].length; k++)
                    blocks[j][k].move(x, y);
            repaint();
        private Action up = new AbstractAction() {
            public void actionPerformed(ActionEvent e) {
                step(0, -dy);
        private Action left = new AbstractAction() {
            public void actionPerformed(ActionEvent e) {
                step(-dx, 0);
        private Action down = new AbstractAction() {
            public void actionPerformed(ActionEvent e) {
                step(0, dy);
        private Action right = new AbstractAction() {
            public void actionPerformed(ActionEvent e) {
                step(dx, 0);
        public static void main(String[] args) {
            Blocks blocks = new Blocks();
            JFrame f = new JFrame();
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.getContentPane().add(blocks);
            f.setSize(400,400);
            f.setLocation(200,200);
            f.setVisible(true);
    class BlockMaker {
        Block[][] blocks;
        int PAD = 20;
        public BlockMaker(int rows, int cols, Dimension size) {
            int w = (size.width  - (cols+1)*PAD)/cols;
            int h = (size.height - (rows+1)*PAD)/rows;
            blocks = new Block[rows][cols];
            for(int j = 0; j < rows; j++) {
                int y = PAD + j*(h + PAD);
                for(int k = 0; k < cols; k++) {
                    int x = PAD + k*(w + PAD);
                    blocks[j][k] = new Block(x, y, w, h);
        public Block[][] getBlocks() {
            return blocks;
    class Block {
        int x;
        int y;
        int w;
        int h;
        public Block(int x, int y, int w, int h) {
            this.x = x;
            this.y = y;
            this.w = w;
            this.h = h;
        protected void draw(Graphics2D g2) {
            g2.drawRect(x, y, w, h);
        protected void move(int dx, int dy) {
            x += dx;
            y += dy;
    }

Maybe you are looking for

  • Problem with Seeburger BIC

    Hi Guru. I've a question for you!! I'm using the Seeburger BIC Mapping Designer but I'va a big problem: I' can't create the deploy file. I'm try to follow all the documentation that i find in internet but doesn't work... After the generation of the X

  • Topics in multiple places in the TOC

    Hi all, I was wondering if it is possible to insert a topic more than once in the Table of Contents? This is probably a strange request, but the problem has occurred because I have imported a manual written in Word, but part of it contains informatio

  • Is it possible to reinstall iTunes 7.1.1?

    I installed 7.3.2 on a machine at work, and although it did install, it will not run. Hence I need to install something, anything, to get this machine to work... If I run the 7.1.1 installer it will not let me select anything to install. Thanks, Rich

  • Swing Filemenu below Canvas?

    I am writing a simple program that displays an image encoded in a raw data format. I am new to graphics programming and I am sure that there are better ways to write what I have done, so if anyone has any suggestiois along those lines they would be a

  • Why unable to open the item? Or "Protected by Digital Rights Management".

    I read ebooks with Adobe Reader. But lately some books (file type epub) are impossible to open. When trying on my PC (Windows 8) I get the answer "Unable to open the item. Please contact Sony customer support. Error: document.". And when trying on my