How to make a rectangle at say 75 degrees to simulate as branch of a tree

I am making a game, I need to make a tree with branches with which, leaves can be attached. I am using rectangle as trunk of tree. What I want now is to use rectangles as branches of tree. I need to make rectangle like structure that is biased to say 75 degrees & attach it with trunk.
How to make a rectangle that is biased to 75 degree OR is there any other object in java that I can use for this purpose.
Thanks a lot for any help.

Darryl.Burke wrote:
AffineTransform#createTransformedShape
dbarr db, thankya. I was looking for that one.

Similar Messages

  • How to make one rectangle box line curved

    Hello:
    have started using Illustrator and love it but am unsure of how to do something.  What I have done is create a basic business card that has a white background.  I would like the bottom half of the card to be a different colour so I added a block of blue using the rectangle tool. That looks great but I would like the top line of the rectangle, which is in the middle of the card, to be in a wave like shape.
    How does one do that please ? Thank you.

    Effect >> Distort And Transform >> Zig Zag
    Make a rectangle shape for your mask
    Select the rectangle and the wave. Command 7 (Ctrl 7 on windows)to make a mask

  • How to make a rectangle in a XY graph & this rectangle can be Drag and Zomm by Mouse

    I have a curve display in a XY graph, that is simple.
    But
       My customer want one or tree rectangle display in this graph also, these rectangle can be drag, Zoom,  such as below pic,
    the problem is how to use mouse control these Rect, Drag to move, Drag corner to Zoom.  thanks a lot

    Hi,
    First learn how to plot your rectangles (several segments).
    Then use a structure event with XYGraph => mouse down to check when user begin the drag
    Use the same structure event with XYGraph => mouse move to update your graph during movement.
    Best Regards
    V-F

  • How to make a rectangle around activeDocument.selection?

    Hi,everyone!
    Recently I met a awful problem. I want to make a rectangle around current selection, but Not success.
    Could you help me or give some clues? Thanks!

    Try the following code.
    Cheers Daniel
    boundingbox();
    function boundingbox()
        // zet nulpunt linksonder
        app.activeDocument.pageOrigin = Array(0,0);
        app.activeDocument.rulerOrigin = Array(0,0);
        // set variable
        var breedte = app.activeDocument.width;
        var hoogte = app.activeDocument.height;
        var doc = app.activeDocument;
        // omrekenfactor
        var omf = 2.834645;
        // maak lijnkleur aan
        var newRGBColor = new RGBColor();
        newRGBColor.red = 0;
        newRGBColor.green = 255;
        newRGBColor.blue = 0;
        var black = new GrayColor();
        black.gray = 100;
        var layercheck = 0;
        var targetDocument = app.activeDocument;
        var layerCount = targetDocument.layers.length;
        var a=1;
        for (var i=1 ; i < 2; i++) {
            if (a==1){var txt = ''; var layname = 'BB';};
            var layercheck = 0;
            for (u = layerCount -1; u >= 0; u--){
                targetLayer = targetDocument.layers[u];
                var layerName = new String (targetLayer.name);
                    if (layerName.indexOf(layname) == 0){
                    targetDocument.layers[u].visible= true;
                    targetDocument.layers[u].locked= false;
                    var layercheck = 1;
            if (layercheck == 0){
                newlayer = documents[0].layers.add();
                newlayer.name = (layname);
                newlayer.color = newRGBColor;   
        alignType = 'top';
        mySelection = activeDocument.selection;
            if (mySelection.length > 0) {
                anchorBounds = getPosition(mySelection[0]);
                var artLayer = doc.layers['BB'].groupItems.add();
                targetDocument.layers['BB'].preview = false;
                var breedte = bnds[2] - bnds[0];
                var hoogte = bnds[1] - bnds[3];
                var rect = artLayer.pathItems.rectangle ((bnds[1] + (20*omf)),(bnds[0] - (20*omf)), breedte + (40*omf), hoogte + (40*omf));
                rect.filled = false;
                rect.stroked = false;
            } else {
                anchorBounds = getDocPosition();
                var doc = app.activeDocument;
                var omtrekartwork = app.activeDocument.geometricBounds;
                var leftartwork = omtrekartwork[0];
                var topartwork = omtrekartwork[1];
                var rightartwork = omtrekartwork[2];
                var bottomartwork = omtrekartwork[3];
                var origin = doc.rulerOrigin;
                var leftpage    = -origin[0];
                var toppage    = -origin[1] + doc.height;
                var rightpage    = -origin[0] + doc.width;
                var bottompage    = -origin[1];
                var centerxpage    = -origin[0] + doc.width/2;
                var centerypage    = -origin[1] + doc.height/2;
                var bleedleft = leftpage - leftartwork;
                var bleedright = rightartwork - rightpage;
                var bleedtop = topartwork - toppage;
                var bleedbottom = bottompage - bottomartwork;
                var breedteartwork = rightpage - leftpage;
                var hoogteartwork = toppage - bottompage;
                if (bleedleft <= 0 && bleedright <= 0 && bleedtop <= 0 && bleedbottom <=0){
                        var artLayer = doc.layers['BB'].groupItems.add();
                        targetDocument.layers['BB'].preview = false;
                        var rect = artLayer.pathItems.rectangle ((toppage + (20*omf)),(leftpage - (20*omf)), (breedteartwork + (40*omf)), (hoogteartwork + (40*omf)));
                        rect.filled = false;
                        rect.stroked = false;
                } else {
                        if    (bleedleft >= bleedright){
                            var bleedx = bleedleft + (20*omf);
                        } else {
                            var bleedx = bleedright + (20*omf);
                        if    (bleedbottom >= bleedtop){
                            var bleedy = bleedbottom + (20*omf);
                        } else {
                            var bleedy = bleedtop + (20*omf);
                        var artLayer = doc.layers['BB'].groupItems.add();
                        targetDocument.layers['BB'].preview = false;
                        var rect = artLayer.pathItems.rectangle ((toppage + bleedy),(leftpage - bleedx), (breedteartwork + (2*bleedx)), (hoogteartwork + (2*bleedy)));
                        rect.filled = false;
                        rect.stroked = false;
    function getBounds(obj) {
        var vbounds = new Array();
        if( obj.typename == 'TextFrame' ) {
            objcopy=obj.duplicate().createOutline();
            vbounds = objcopy.visibleBounds;
            objcopy.remove();
        else if( (obj.typename == 'GroupItem') && !obj.clipped ) {
            vbounds = getBounds(obj.pageItems[0]);
            for( n=1; n<obj.pageItems.length; n++  ) {
                vgb = getBounds(obj.pageItems[n]);
                if( vbounds[0] > vgb[0] ) vbounds[0] = vgb[0];
                if( vbounds[1] < vgb[1] ) vbounds[1] = vgb[1];
                if( vbounds[2] < vgb[2] ) vbounds[2] = vgb[2];
                if( vbounds[3] > vgb[3] ) vbounds[3] = vgb[3];
        else if( (obj.typename == 'GroupItem') && obj.clipped && (obj.pageItems.length > 1) ) {
            vbounds = getBounds(obj.pageItems[0]);
            cvgb = getBounds(obj.pageItems[1]);
            objleft = cvgb[0];
            objtop = cvgb[1];
            objright = cvgb[2];
            objbottom = cvgb[3];
            obj.pageItems[0].stroked ? so = 0 : so = 1;
            for( n=so; n<obj.pageItems.length; n++ ) {
                cvgb = getBounds(obj.pageItems[n]);
                if( objleft > cvgb[0] ) objleft = cvgb[0];
                if( objtop < cvgb[1] ) objtop = cvgb[1];
                if( objright < (cvgb[2]) ) objright = cvgb[2];
                if( objbottom > (cvgb[3]) ) objbottom = cvgb[3];
            if( vbounds[0] < objleft ) vbounds[0] = objleft;
            if( vbounds[1] > objtop ) vbounds[1] = objtop;
            if( vbounds[2] > objright ) vbounds[2] = objright;
            if( vbounds[3] < objbottom ) vbounds[3] = objbottom;
        else {
            vbounds = obj.visibleBounds;
        return vbounds;
    function getPosition(obj) {
        var b = new Array();
        bnds = getBounds(obj);
        b['left']    = bnds[0];
        b['top']    = bnds[1];
        b['right']    = bnds[2];
        b['bottom']    = bnds[3];
        b['centerX']    = bnds[0] + (bnds[2]-bnds[0])/2;
        b['centerY']    = bnds[1] - (bnds[1]-bnds[3])/2;
        return b;
    function getDocPosition() {
        var b = new Array();
        doc = activeDocument;
        var origin = doc.rulerOrigin;
        b['left']    = -origin[0];
        b['top']    = -origin[1] + doc.height;
        b['right']    = -origin[0] + doc.width;
        b['bottom']    = -origin[1];
        b['centerX']    = -origin[0] + doc.width/2;
        b['centerY']    = -origin[1] + doc.height/2;
        return b;

  • How to make ROUNDED rectangle default style cp8?

    Hi,
    I want my smart shape style to be rounded rectangle, not squared. I have set up my object styles with color and all that good stuff, but there is no way I can see to make it the rounded shape instead of the squared off shape.  I also tried to change one on the properties panel thinking I could "apply to all" but that option is not available.  I am trying to use smart shapes as my captions in recording and it sure would be nice not to have to touch every single one and change it to rounded - defeats the purpose of styles, yes?
    Using CP8, latest version (I checked and there are no updates available), on a windows machine, 64 bit.
    Thanks!!!
    Kelly

    Rick, that option has effect on the captions inserted while creating a software simulation.
    @LMS_90 About which shapes as Text container are you talking? Object styles for Shapes do not include the 'form' of the shape. And at this moment, you cannot set such a form as being included in the default style, with the one exception that Rick points out: added text during a simulation capture.
    Even for Success/Failure/Hint shapes you cannot define that it always has to be a rounded rectangle. For Question slides, you can set them up in the master slides, and if you use always master slides with placeholders it is also possible. Quite a lot of the default themes have rounded rectangle shapes as text container for Title and Subtitle.
    Also in the Properties the 'form' is not part of the style: if you apply the default Shape Style that includes Stroke, Fill, Character properties, Margins, Shadow...but not the shape itself. That is the reason why 'Apply to all' cannot be used for the shape form.
    This is probably not the answer you expected, I try to change as much as possible in the Master slide.

  • How to make sold to party to only order and ship to party to only delivered

    Dear friends.
    How to make sold to party say 123456 to only  order goods and should not be delivered goods if made ship to party in particular sales order.(customer 123456 is defined in customer master as both sold to party and ship to party).Similarly how to make ship to party xyz to be only delivered GOODS and should never order goods when made sold to party in particular order.(customer XYZ is defined in customer master as both ship to party and sold to party).
    I created delivery block for Customer 123456 and ordering block for XYZ ,but it does not work?
    Please give your views
    Thanks
    Ranganathan V

    Hi Amit,
    you are right,why should we define sold to party as ship to party when you do not want it be delivery or ship to part as sold to party when you don't want it to order?
    but situation is like this ,my sap customer has clients which are defined as both sold to party and ship to party.In one sales order it will be sold to party ,but in other order it will be ship to party.
    in these conditions how do we go about ?
    is there any settings available in customer hierarchy ?
    please let me know
    Thanks
    regards
    Ranganathan V

  • How can I make a line at 40 degree angle in Keynote 6

    How can you make a line of 40 degrees (or anywhere between 40 to 45) angle in the new Keynote 6.2.2. It seems they took away that nice feature from the previous version. When I move one end of a line, it locks onto 45 when I get near that angle, and jumps off directly to 34 when I try to move away. Previously you could click on a line to transform the ends into red spots, and move them independently to any angle or length. Now it locks onto 45, or 135 or 90 etc. I don't have any of the guides on or any other feature. This is supposed to happen only when holding shift key (which is also a great feature). If it locks onto the magic angles without holding shift, then there is no sense if having that feature at all.

    Press the command key when dragging, this switches off snapping and allows continuous placement.
    If you like numerical control:     Inspector > Format > Arrange > Rotate

  • I have an Ipad using 5.0.01 and am new to the experience. When I click on the icon for calendar, I get the calendar presentation but do not no how to make an entry.  The tutorials all say you click on the " " sign, but there is no such sign in the lower r

    I have an ipad with 5.0.1 and trying to learn how to use it.  When I click on the icon Calender, I get the calendar  presentation but I do not know how to make an entry.  Every tutorial I have looked at says that you click on a + sign in the lower right corner and then make your entry.  I do not have a + sign on my screen.  Can some one help me.

    You can download a complete iPad 2 User Guide here: http://manuals.info.apple.com/en/ipad_user_guide.pdf
    Also, Good Instructions http://www.tcgeeks.com/how-to-use-ipad-2/
     Cheers, Tom

  • Broken 4s screen and no display. Siri worked to make calls but now says "Siri not available connect to internet" still waiting on new phone and need to make calls. How can I get Siri to work again?

    I broke my iPhone 4s screen and display. Siri worked to make calls but now says "Siri not available, connect to the internet". How do I make Siri work again till I get my new phone?

    If not connected to the Internet, either through WiFi or 3G, you can't.

  • My acrobat pro x pdf maker stopped working. Says my certificate has expired. how do I update it?

    my acrobat pro x pdf maker stopped working. Says my certificate has expired. how do I update it?

    First thing to try: check the date and time on your computer, especially the year. Let us know if that's correct.

  • How to make the servo motor to move in steps of set degrees and stop

    how to make the servo motor to move in steps of set degrees and stop

    Hi,
    I think the following document would be a good starting place: NI Developer Zone Tutorial: Single Axis Moves It includes links to several example programs that you may find useful for your application. Keep in mind that there are many motion examples that ship with LabVIEW as well.
    I strongly recommend that you check out the following documents as well:
    NI Developer Zone Tutorial: Simple Point to Point Motion
    NI Dev
    eloper Zone Tutorial: Hands-On Motion
    NI Developer Zone Tutorial: Axis Settings for Motion Controllers
    These tutorials will help give you a good foundation for understanding motion control systems.
    Best wishes!
    Dawna P.
    Applications Engineer
    National Instruments

  • When i deleted movies off my computer to make room it now says a majority of the storage usage is in backup. how can i clean it out

    when i deleted movies off my computer to make room it now says a majority of the storage usage is in backup. how can i clean it out

    Connect your external drive and allow the backup to run, and the "snapshots" will be removed.

  • How to make a 2nd player in this racing game.

    I'm using this tutorial to learn how to make games in Flash for a class, but it doesn't say how to make a 2nd player.
    If somebody can show me the code to make alternative controls (W,S,A,D) for a 2nd car that'd be fantastic!
    Thanks a lot,
    Dd
    http://www.emanueleferonato.com/2007/05/15/create-a-flash-racing-game-tutorial/

    if (_root["car"+who].code == "player") {           
    if (Key.isDown(Key.DOWN)) {
                   this["speed"+who] -= _root.backSpeed;
              //steer left - well, we could simply add or subtract a fixed angle (in degrees) to/from the car's rotation, but that's not good enough. In order to simulate a natural movement, steering must depend on speed, otherwise you will be able to rotate your car even if it's almost stopped and it will look like a propeller
              if (Key.isDown(Key.LEFT) && this["speed"+who]>0.3) {
                   _root["car"+who]._rotation -= _root.rotationStep*(this["speed"+who]/_root.maxSpeed);
              //steer right - you already know what happens here
              if (Key.isDown(Key.RIGHT) && this["speed"+who]>0.3) {
                   _root["car"+who]._rotation += _root.rotationStep*(this["speed"+who]/_root.maxSpeed);
    You basically have to make a second conditional clause that starts:
    if (_root["car"+who].code == "player2") {           
    if (Key.isDown(/*Insert KeyCodeValue of the Key you want to use*/)) {....
    The AS2 keycodes can be found here:
    http://www.adobe.com/livedocs/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00001136.html

  • How to make a pressure sensitive brush in CS3?

    Hi!
    Is there someone out there who knows how to make a brush similar to this? I've been trying to figure it out for several hours now, but nothing works!
    Daniel

    Sorry but you aren't going to get something that looks like that from a pressure sensitive brush in Illustrator.
    The colors and groupings of blocks are too random to be a repeating pattern (a simple one, anyway) and the order is too consistent to be something like a scatter brush. That said, you *can* do this with a brush but it won't be pressure sensitive and it will require a degree of setup.
    Start by building a row of blocks. Mine is a simple pattern with a few pieces removed and not terribly interesting looking but hopefully it'll give you the idea of what I mean:
    Group everything and then go up to Effect> 3D> Rotate
    Set your X, Y, And Perspective parameters to taste. Keep the Z axes (the blue one) at zero:
    Go to Object> Expand Appearance You'll notice that Illustrator has put a clipping mask around your squares (transparent rectangle) Delete it.
    Take everything you have and drag it over to the brush panel and make a new Art Brush:
    Now you can select that brush and paint with it though you'll get better results by stroking a path you've drawn with the pen tool:
    A couple of things to keep in mind:
    You'll need to consider your ultimate length when creating the brush. Longer or more wavy lines will require more squares. My squares look a little skewed because I didn't bother to make my pattern very long. A longer row will improve the look of this but hopefully my example is enough to give you the idea.
    For generating the square colors, you might want to try the random fills script available from James talmage's page and then use live color to tint everything for you.

  • I was able copy the hardrive of my old macbook from "My Passport" onto the desktop on an older iMac. but i dont know how to make my hardrive and user name be the main one since someone had used it in the past and had their info on the comp. please help!

    I recently broke my 2008 macbook. i was able to use an external hardrive to back up my data onto My Passport. I was going to buy a new computer but a friend told me sher had an older version of the iMac. (not sure how old but it doesnt have a camera if that helps) i was able to hook it up and turn it on but i ran into a few problems. 1) the "authentic" user or whatever it says is someone who previously used the computer. i added me as a user but im not sure how to make me the main user. 2) after hooking up My Passport, i was able to drag my files and copy them to the desktop.(i think i did it correctly) now, i dont know how to make my hard drive and applications and iformation the "main " info. The current apps on the iMac are super old versions of iTunes and iPhoto and such. 3) while trying to open the apps from my macbook on the iMac, it said it didnt have the right software to open these apps.
    I am so computer illiterate so someone please help!!! Also, i do not have internet in my new apartment yet so if there is a way to make this happen without using the internet that would be preferred. sorry for the horrible spelling and poorly written paragraph.
    THANK YOU!!

    You are not going to be able to run your old system from the backup on this old computer as the hardware is incompatible.
    You need to get a new computer or a refurbished one.

Maybe you are looking for

  • "DBSTATUS_UNAVAILABLE" Error while importing Excel File

    Hello, I am getting following error while importing data from Excel 2003 to SQL server using SSIS 2008,  [Excel Source [1]] Error: There was an error with output "Excel Source Output" (9) on component "Excel Source" (1). The column status returned wa

  • Mobile Account - How to Map Share Point Locally on Server?

    Hello, Using mobile accounts on a mac mini server, this is a small home network. Primary reason for server was to use mobile accounts allow the various computers and laptops to be accessed by all family and guests with data linked to login. All work

  • Easy Setup

    Hello, I'm trying to figure out which easy setup format to choose. I initially had a dvd with vhs footage. Via Toast I converted it to an mpeg-4 format(640x480). 29.97 fps. In the drop down list I don't see mpeg as an option. I've been constantly ren

  • Opening of PDF file

    Hi all, I want to open a PDF file which is saved in local PC...can u mention some FM used to achieve this Thanks

  • Is 2 INIT possible with selective data

    Hi I m havg around 50000 consumer data, and in cube it's not uploading the whole data in one go, can i do 2 INIT with SELECTIVE UPLOADING means 25000 consumer first time and 25000 consumer 2nd time only through INIT. Gaurav