Positioning objects on a z radius evenly

I'm useing papervision3d
And I have 8 objects/spheres and will be adding more
objects/spheres later
I was wondering if anyone knows a formula to position any
number of objects evenly on a z radius
any help will be greatly appreciated, sincerely newwave
here is what I have tried, as is only 4 objects/spheres are
visible on stage, due to overlapping
[code]
var M1:MaterialObject3D = new FlatShadeMaterial(light,
0xFF0000, 0xFFCC99);
obj1 = new Sphere(M1, 50, 10, 10);
obj1.x = -ORBITAL_RADIUS;
obj2 = new Sphere(M1, 50, 10, 10);
obj2.x = ORBITAL_RADIUS;
obj3 = new Sphere(M1, 50, 10, 10);
obj3.z = -ORBITAL_RADIUS;
obj4 = new Sphere(M1, 50, 10, 10);
obj4.z = ORBITAL_RADIUS;
obj5 = new Sphere(M1, 50, 10, 10);
obj5.z = -ORBITAL_RADIUS;
obj6 = new Sphere(M1, 50, 10, 10);
obj6.z = ORBITAL_RADIUS;
obj7 = new Sphere(M1, 50, 10, 10);
obj7.z = -ORBITAL_RADIUS;
obj8 = new Sphere(M1, 50, 10, 10);
obj8.z = ORBITAL_RADIUS;
[/code]

interesting! lol ;)
well i'm not certain about the math on the z axis but it
'should' be similar in calc to a normal circular calc - you might
try reversing the cos, sin on each line. but the 'real' funny thing
is the grouping, but part of the issue here is the assignment of
the angle to 3 - the above formula divides degrees of rotation (eg.
360) by the quantity of object positions so you really need to have
that in there. but in hindsight you may want to increment the angle
within the array because in this way it will result in rotations
all the way through the circumference - so try this:
private static const ORBITAL_RADIUS:Number = 300;
private var angle:Number = 0;
var M1:MaterialObject3D = new FlatShadeMaterial(light,
0xFF0000, 0xFFCC99);
for(var i=0; i<8; i++) {
this['obj'+i] = new Sphere(M1, 50, 10, 10);
this['obj'+i].x = ORBITAL_RADIUS * Math.cos(angle);
this['obj'+i].z = ORBITAL_RADIUS * Math.sin(angle);
angle += (360 / 8) * Math.PI / 180;
that should do it ;)

Similar Messages

  • How to always rotate objects around the same point, even using the right-click menu?

    I need some of my objects to always rotate around the same point. How can I select a point which will stay that way?
    Using the rotate tool resets after deselecting.
    Also, I'd like to rotate objects around a certain point even when using the right click > Transform > Rotate.
    Is it possible?

    Right, so this is where Illustrator falls short with respect you your need, but only in the sense that the reference point can't be made to stick. You can, however, use Smart Guides to make it so the point is easy to set at exactly the same location, (especially since your object has an anchor point there), manually before each rotation.

  • Many javax.swing.text.Position objects en masse

    Hi,
    I am wondering if anyone has much experience with the performance of javax.swing.text.Document implementations (using GapContent) and a large number of registered Position objects. I am trying to keep track of token boundaries for quick re-lexing, and the token count can be rocket high. I am just beginning to work with this API, and I guess I am looking for any insider information I may be missing.
    Thanks,
    galaxy

    Hi,
    I am wondering if anyone has much experience with the performance of javax.swing.text.Document implementations (using GapContent) and a large number of registered Position objects. I am trying to keep track of token boundaries for quick re-lexing, and the token count can be rocket high. I am just beginning to work with this API, and I guess I am looking for any insider information I may be missing.
    Thanks,
    galaxy

  • Positioning objects in a JTabbedPane

    Is the any way to specify the positioning of an object in a JTabbedPane?
    I am placing JPanels which contain JLabels and JTextFields into tabs
    of a JTabbedPane. All the panels are centered in the tab panes.
    This is annoying because one panel contains more labels and fields than
    the others. As result some of the data on the smaller panels isn't visible without scrolling.
    Is there some way to orient all panes NORTHWEST ? So when a user selects a tab the data is visible.
    It seems to me it would be done when adding the tabs (.addTab())
    but I can't figure out how.
    I tried grigBag.setConstraints(jtp, gridBagConstraints) where jtp
    is the tabbed pane. But it did not work.
    Is this just the way the JTabbedPane works ?
    TIA

    Looks to me like you are using FlowLayout - this is the default for JPanels. FlowLayout is a pain in the thingimybob. Try using a more suitable layout manager (e.g. BorderLayout).
    This applies both to to the container you're putting the JTabbedPane into, and the JPanels you're putting within the JTabbedPane.
    You can set the layout when you create a container, for example...
    JPanel panel = new JPanel(new BorderLayout() );
    JTabbedPane tabs = new JTabbedPane();
    panel.add(tabs, "Center");Hope this helps!
    Regards,
    Tim

  • Positioning Objects on the Page.

    Hi, Expert:
    How can I position two objects on the page relatively? Say, I have two data tables, or one data table and after the table, some other object (button?, etc). B/c I don't know how many rows will return from the database, if I placed two tables too close, the first table will overlay the second one below. Is there a way to place them relatively so the second one will be always at the end of the first one?
    Thanks
    Jimmy

    Yes, and it's pretty easy :)
    Drag and drop a GroupPanel component to the page and put both tables into it.
    Or you can try changing the layout of the page to Flow Layout, but I use the GroupPanel.

  • (Org Model) Obtain Sales org's object id from position object id.

    Hi All,
    In the org model, I have the object id of a position and i want to find the object id of the sales org to which this position is assigned.
    Is there any FM that does this..?
    Thanks in Advance,
    Raviraj

    Hi Gun,
    When i tried tu check out this FM, COM_OM_ORGUNITS_OF_MANAGER, it says "NOTHING_FOUND"
    the params i passed are :
    PLVAR                         
    MGR_OTYPE     O
    MGR_OBJID     50001049   => position id of the user
    SELDATE       02/28/2006
    NO_DIALOG     X
    SEL_MULTIPLE  X
    am i missing something ?
    The hierarchy is :
    SOME_SALES_ORG
            |
            |-- ASSIGNED_PERSON
    I have the ID of this person and want the ID of the sales org
    regards,
    raviraj
    Message was edited by: Raviraj Khare

  • Sapscript: position OBJECT GRAPHICS ID

    Hi all,
    I hope there is someone can help me...
    My problem is: i've used the istruction to insert an image in a Sapscript
    /: BITMAP 'LOGO_TOPAZIO_DATI1' OBJECT GRAPHICS ID BMAP TYPE BCOL
    now, how can i position the image in the centre of page?
    Thanks a lots,
    regards,
    Alex.

    Hi,
    To print image, you have to import a tif file from your local hardisk via the SAP abap program RSTXLDMC.
    In the sap script, add in the following script.
    : / INCLUDE ZLOGO OBJECT TEXT ID ST LANGUAGE EN.
    or
    Tested in 4.6x
    Go to transaction SE78.
    Follow the path given below (on the left windows box) :-
    SAPSCRIPT GRAPHICS --> STORED ON DOCUMENT SERVER --> GRAPHICS --> BMAP
    Enter the name of the graphics file on the right side and Go to the menu GRAPHIC --> IMPORT.
    Thanks,
    Neelima.

  • Position objects on path

    HI
    Is there any way to find a specific point on a curved path, that is not an anchor point?
    I want to position an object on a path, but I need to know the Y of any given X on that path.
    Thanks
    Math

    Of course, with the note that Illustrator's curves are Bezier curves, and for Beziers, there may be more than one Y for a given X point (I know - the maths is horrible.)
    Good thing most illustrators don't like to use the most extreme looped and self-intersecting curves (Illustrator itself has no qualms in inserting these in, for example, Live Traced results!)
    Apart from the exact-but-hard mathematical way, you could expand the curve to straight lines. That can be done recursively to any degree of accuracy. Look for my CircleFill script; it contains a Javascript implementation of the late Maxim Shemanarev's Bezier-to-lines code.

  • Help positioning objects

    In my index file, before I bring it into Edge,  I have all objects centered on the page this way:
    #parallax-bg1 {
              z-index: 1;
              position: fixed;
              left: 58.5%;
              top: 0;
              width: 1130px;
              margin-left: -600px;
    I would like to apply those same parameters to all the animations that I add to this file in Edge. Can that be done?
    thanks,
    Dan

    Hello,
    Hum, i don't know what you mean by "all the animations".
    But, you can try:
    sym.$("Stage").css({
                       "z-index": "1",
                       "position": "fixed",
                       "left": "58.5%",
                       "top": "0",
                       "width": "1130px",
                       "margin-left": "-600px"
    or this:
    sym.getSymbolElement().css({
                       "z-index": "1",
                       "position": "fixed",
                       "left": "58.5%",
                       "top": "0",
                       "width": "1130px",
                       "margin-left": "-600px"
    You can open Stage/compositionReady or Stage/creationComplete to write these lines.

  • Centering/Positioning Objects

    Hi, I'm trying to center some text in Edge but it won't work. I've tried eyeing it and placing it in the center, but when I preview it the text will be somewhere in left field and I'll have to tweak it again. And even if it's right in my browsers if I go to another computer the positioning will change. I've tried setting the X and Y to percentages and grouping them in divs but it's not working.

    Read my last blog; 'What's going on with my symbols',  and see if anything applies to you. I mentioned several issues when working with symbols.
    http://www.edgehero.com/

  • Snap position object in front of active camera

    I cannot find this function so please let me know if I am just missing it - but it has occurred to me that it would be very handy to have the ability to align any given opblect in front of the currently active camera.
    If a camera Moves throughout a scene and you suddenly want to duplicate an element that is elsewhere in a scene, if you duplicate it, it s duplicated in place.  Is there a way to "snap position" an object existing in a scene in front of a camera?

    Why would I first need to set the origin of the camera to the center of the scene before cutting if the camera i want the object in front of it elsewhere in the scene.
    You don't have to reset the camera, just the duplicated object. If you reset the camera, you'd loose any animation settings you might have.
    Am I to understand that Motion 5 just defaults to placing a cut and pasted object in front of a camera only if it's transforms are reset?  That seems kind of arbitrary.
    I don't know that it's arbitrary,  it seems to be related  to this (from the motion documentation):
    Drag and Drop onto the Canvas
    Dragging and dropping an object onto the Canvas adds the object to the scene at the focal plane of the current camera. Dragging an object into the Layers list or clicking the Apply button in the preview area of the File Browser positions the object at 0, 0, 0.
    Basically, depending on how you add objects, motion determines where to place them in the scene. This seems to be the case for copy and paste too.  Copy and paste includes all of the transformations already applied to the object.  The paste treats your camera focal plane like the origin for the scene, but your object has it's own transforms, that's how it gets offset from the camera focal plane.  Resetting the object to the origin removes those settings and works like using the apply button mentioned in the documentation.
    Here's an example to show what I'm talking about.
    1.Add a camera and rotate it, make sure you can see the origin for the grid.
    2. Add a shape from the library using the apply button in the inspector.
    -The shape gets added at the origin, not at the camera view.
    3. Reposition the camera, make sure to change the position and rotation.
    4. Add the shape but this time drag and drop to the canvas.
    -Notice how the shape is at the focal plane of the camera. If you look at it's settings they match what is needed to position the object at the camera's focal plane.
    5. Reposition the camera one more time.
    6. Now Copy and past each object while in the active camera view.
    -When you copy and past the object at the origin, it's pasted at the focal plane because it doesn't have any transforms.
    -When you copy and paste that was added from the drag and drop, it's offset, it's transforms have been added to the camera focal plane transformation.
    You may also want to review the section in the documentation about Relative coordinates.
    -Cheers

  • Adjust front panel to screen size and re-position objects on different systems automatically

    Hello, i have designed a vi that contains 5 led's placed at the 4 corners and center of the front panel which occupies the entire screen. However, this vi is to be used on different systems having different screen sizes. But on every screen, i'll need the front panel size = screen size and the led's to  be placed to the centers and corner of this new screen size automatically without any manual operations and positioning bieng done every time. Will the resize option perform this task completely or do i have to go for some other techniques?
    Solved!
    Go to Solution.

    As far as I know, what you want is not easy to do but it is doable but you have to programmatically do it (no Labview setting). Here is an example for only 2 LEDs but I suppose that you will be able to make it work for your other LEDs.
    This VI maximizes the front panel and then positions the 2 LEDs in the center and top right corner upon running. The LEDs are positioned according to their own top left  corners, not according to their centers.
    Marc Dubois
    HaroTek LLC
    www.harotek.com
    Attachments:
    Position LEDs.vi ‏14 KB

  • What will make it so you can't move objects by click and drag even though they are not locked?

    I have been using the cc 2014 version for awhile now and this morning  when I select an object with the selection tool, I can't freely move it by click and drag. The object will move with the arrow keys and can be aligned with the alignment tools.

    Does it have a fill of None? Maybe you're trying to select the object on its "fill" but if there's no fill, it does not get selected.

  • Unable to position objects with x y coordinates

    Every time I try to type in a new value for x or y coordinate, the original value replaces the new one automatically. I can move the object with the arrows but only by large increments. Anyone have an idea on how to solve that?

    Your description is not clear but I guess that you are trying to set coordinates when the unit is set to centimeters.
    Due to the fact that this unit is not a multiple of 72 (the default resolution) we can't use all values with two decimal digits.
    But it seems that it was a problem of the past.
    I made tests with the version 4.0.1 and every values with two decimals are now correctly applied and kept.
    Yvan KOENIG (from FRANCE jeudi 14 mai 2009 20:57:26)

  • Position objects by percent in AS3?

    I have been working with this .FLA file that has been given to me.
    The buttons are all set up in Action Script and not placed on the timeline at all.
    Here is the code for postion on the buttons.
    I do not want to move the buttons by Pixels
    I would like to move the buttons by Perectage so it will look the same on all computer monitors.
    The person that I am editing the file for would like them in the bottom left of the screen.
    Here I have moved them by Pixels but these buttons do not appear in the same place on all monitors.
    Could you please let me know what code I would have to insert to move them by Percentage?
    ///////let's set the position of the buttons across the bottom of the screen
                b1.move(-350,150);                                                //PLAY/PAUSE
                b2.move((b1.width+5)-350,150);                                    //STOP
                c1.move(((b1.width+b2.width)+10)-350,150);                        //Jump to section
                s1.move(((b1.width+b2.width+c1.width)+15)-350,150);                //VOLUME
                //b3.move(((b1.width+b2.width+c1.width+s1.width)+25)-350,150);    //MUTE
    Thanks,
    Travis

    How would I type that into Action Script3?
    Right now I can move the X and Y of my buttons by Pixels.
    How would the script look if I wanted to move it by percentage?
    Could you give me an example
    Thanks

Maybe you are looking for

  • Idsyncwin does not invalidate old passwords

    I am using Identity Synchronization for Windows (part of DSEE 11g) to replicate MSAD accounts into an organization maintained in DSEE, one-way. This works acceptably, except for one nit, which may be a problem to complete the POC demonstration: a cha

  • How to invisible perticular row of a table column?

    Hi All, I want to set invisible or blank in perticular row of table column. I have a table, contains 2 row in that , one of the column contains button. If i clik on this button(ex: 1st row button ) it add new row with different data, it contains butt

  • Need help naming photo files in a sequence?

    I want to name a group of files in a sequence. For example, I have 10 photo's from Joe's birthday party. I want to name the files JoeBirthday with a number after them (JoeBirthday1, JoeBirthday2, and so on.). I cannot figure out how to do this. Can s

  • Pricing recalculation in ECC - how it is done and Exit to change the logic

    Hi all, I have  a issue relatedto PO's created(rather replicted) in ECC system from SRM system.When the PO's are replicated from SRM,the pricing is recalculated in R/3 based on DEAFULT setting.Nw when the tax code is changed in SRM PO,the changes are

  • Ebusiness suite and BI Publisher

    Hi, We have oracle ebusiness suite which includes BI publisher server version 5.6.3 could someone tell me what is the roadmap for BI publisher as part of the Ebusiness suite? The reason why I am asking I am aware of OBIEE that is a separate product a