Image Rotation and 3D/2D objects

Hello Group,
I have a continuing question that has yet to be answered. I
have two other posts (sorry for multiple posting), with the same
topic, but, alas, no one seems to like my topic. Perhaps this topic
is not a Flash topic? Being very new to flash, I am not quite sure
where to look for answers. If this is the incorrect forum to post
this topic please advise.
my topic is below:
I would like to create (assuming Flash is the correct tool
for this) a 3D-like rotateable image.
There is a good example of what I would like to re-create at:
http://cingular.com, here the user
can select a cell phone,
see an image of the phone and select a 360 degree demo of the
phone, where you can open it, see the top, see the
bottom, and rotate the phone from side to side. This is done
using the mouse, etc.
I checked the source code for the site, and see that they are
using a *.swf file. Of course, they may not have used Flash to
create this object, but some other tool, that exports to Flash.
Any ideas on how to do this type of graphics??
Thanks
eholz1

Hello Group,
I have a continuing question that has yet to be answered. I
have two other posts (sorry for multiple posting), with the same
topic, but, alas, no one seems to like my topic. Perhaps this topic
is not a Flash topic? Being very new to flash, I am not quite sure
where to look for answers. If this is the incorrect forum to post
this topic please advise.
my topic is below:
I would like to create (assuming Flash is the correct tool
for this) a 3D-like rotateable image.
There is a good example of what I would like to re-create at:
http://cingular.com, here the user
can select a cell phone,
see an image of the phone and select a 360 degree demo of the
phone, where you can open it, see the top, see the
bottom, and rotate the phone from side to side. This is done
using the mouse, etc.
I checked the source code for the site, and see that they are
using a *.swf file. Of course, they may not have used Flash to
create this object, but some other tool, that exports to Flash.
Any ideas on how to do this type of graphics??
Thanks
eholz1

Similar Messages

  • Lightroom 3 Beta-Image Rotate and Crop Tool

    Good Morning Adobe,
    First of all let me say Lightroom 3 is fantastic! I do have a couple of suggestions that might make the image editing more efficient. I find that I use the image rotate and crop tools frequently and think that possibly locating these 2 features below the image in the tool bar with the loupe view/zoom fit/before and after will allow the user to edit the images more efficiantly.
    I believe that this is an incredible program and can't wait to see the finished product!
    I will offer more suggestions as they evolve.
    Thank you Adobe! You are the BEST!
    D.A.    

    Thank you...I discovered this answer online from another post last night and tried it.  (Since I didn't re-size the thumbnails, I wasn't aware that you could do this.)  After re-starting Lightroom and my computer, the crop issue corrected itself.  Thank you very much for your response.  It worked!

  • How to rotate and translate an object at the same time??

    Hi, I have a problem with rotation and translation of an object at the same time. I wrote a behovior class for my object (a cylinder). When some conditions are true the cylinder is added to a robot arm. Then it is translated so that the cylinder would be very close to the arm (looks like the robot is holding it). And now the behavior should also rotate the cylinder because the angle is 0 and it should be 90. I can translate the object or I can rotate the object but when I'm trying to do it at the same time (I want to combine rotation and translation) it doesn't work.
    Could anyone help me, please :)

    You can used to Matrix3f
    This object is a rotation and translate matrix
    for example:
    private void componerTransformada(){
    Quat4f rot = new Quat4f((float) this.getRotacionSobreX(),(float) this.getRotacionSobreY(),
    (float) this.getRotacionSobreZ(),1.0f);
    Vector3f tras = new Vector3f(-4.0f,-4.0f,(-1)*this.getDistanciaDeLaCamara());
    this.setTransformacion(new Transform3D(new Matrix4f(rot, tras, 1.0f)));
    Quat4f is a matrix of ratation
    vector3f is a direction vector
    Transform3d is building with Quat4f and Vector3f.
    That is work i use this to situe the view of point.
    good locky

  • Working with images - Rotation and Movement

    Hello there,
    I have this problem that I cant seem to solve:
    I need to be able to move an image arround and there are restrictions to where image should be able to move: at any given time, when dragging, image should always cover whole body of a given border_container, this is simply achieved by sending a rectangle to the startDrag function, which will specify where the image is allowed to move. I got that part right, and its working, the problem arrise when I try to rotate the border_container (with the image), it should still be only possible to drag image so it all the time covers the body of the border_container, but I don't know how to do it.
    Code I use looks something like this:
    image.startDrag(getImageDragRectangle());
    protected function getImageDragRectangle():Rectangle
         return new Rectangle(
              this.width-image.contentWidth + x,
              this.height-image.contentHeight + y,
              Math.abs(this.width-image.contentWidth),
              Math.abs(this.height-image.contentHeight));
    Edit: image is not inside the border_container (not sure how relevant it is..)
    Could anyone help me out here and give me any hints or suggestions how I could fix it?

    You would have to write the image to a temporary file so that the browser could read it off the server. Browsers do not have access to the database, so there's no way to get the image from the database to the browser without using some sort of interim solution.
    ~Jer

  • Fast image rotation and contrast adaptation

    First: I'm new in vision processing.
    I'm using LabView 8.0 with the IMAQ Vision development module. The aim is to control the angle and the contrast of a precalculated image (a greyscale wedge) in a fast loop with a framerate of 60 or 100Hz. Currently I use the time-consuming IMAQ rotate and IMAQ BCG functions. All these function works very fine but a litle bit to slow for my application. I have measure: IMAQ rotate with 40ms and IMAQ BCG with 15ms for an image with 1024 x 768 pixels (8-bit greyscale) on a new PC. I know that an arbitrary rotation is a processor intensive task.
    Please correct me, but i assume that with IMAQ rotate the image rotation will be carried out in the PC RAM. Afterwards the recalculated image will be written in the grafic memory. In a final step the image will be displayed on the monitor by mean of the grafic processor.
    I can imagine there exist a solution or some ideas in the LabView community to use the high end 3D very fast grafic card processor for the rotation and contrast tasks. I hope the approach will accelerate the time of calculation.
    Thanks for your help.
    Best regards
    Ivo Buske

    And of course, the rambling about IMAQ image pointers isn't relevant. (Skip all IMAQ.)
    You might as well send the image once (each time it changes), and rotate it with opengl.
    "Wiebe@CARYA" <[email protected]> wrote in message news:[email protected]...
    Hi,
    If I understand correctly, you just want a gradient screen to rotate, and to be able to adjust it's contrast.
    This can be done a lot easier without an image. If you use OpenGL, you can just draw two triangles with there color set correctly. (You'd be able to make nice rainbow pictures as a bonus.)
    An C/C++ application, or dll, could be made in a few hours by someone experienced with opengl and c++. You could even create an opengl window, and control it with LabVIEW. In other opengl applications there are some practical problems, but some might not matter to your application. Biggest problem is getting feedback (mouse clicks, close, move, resize window etc.) from the OpenGL window to LabVIEW.
    Opening a opengl window, rotating a few polygons, adjusting color, closing window certainly doable.
    Regards,
    Wiebe.
    "ibstein74" <[email protected]> wrote in message news:[email protected]...
    Hi Wiebe, I have a fixed image, created before with array functions, that contain a pure linear greyscale gradient (left side: white / right side: black). I used this image to control a "spatial light modulator". This device is connected to the second DVI graphic card output. The main task of the "spatial light modulator" is to shift the local phase of the reflective light. It works as an spatial resolved "adaptive mirror".&nbsp; The local phase shift correspondes directly to the applied grey level of the image. To change the direction in both dimensions of the reflective light I need to rotate this image (= rotate the phase wedge) Thereby the contrast can adjust the absolute angle of reflection.After I had calculated my greyscale gradient image and applied it to the second DVI output, I want only control the contrast and rotation. I think the graphic card function are very fast. But I have to control the graphic card directly per DLL or C-function node. It must be possible because I can tune the contrast and adjust the rotation manually with the nvidea driver in the windows system manager. I'm&nbsp; waiting for a couple of weeks of an answer from nvidea but it seems that contrast and rotation of an 2D-image is not a real problem for these 3-D guys. :-(I hope of an answer or new ideas.Ivo Buske

  • Images rotate and resize when relinking after collect for output

    I just started using CS5 and have run into an issue that is very disturbing to me. When I relink my files from the collected folder that I send to printer, images that have been rotated in Indesign rotate to their actual size and rotation. This is not a good thing! We should not have to rotate all of our images outside of indesign.. Please Help!!!

    OK, we were cross posting, and I've now looked at your file.
    One key piece of information you didn't tell us before is that the file was created in CS3 and converted. There are a lot of reports of strange behavior with legacy files. This one seems to be somewhat corrupt at this point. I don't know how much of that was introduced form the conversion, and how much from the previous recycling.
    The best approach when converting a CS3 file is often to export as .inx from CS3 and open that in CS5. The other thing that helps is to open the old file iin CS5, then immediately export to .idml, then open that and save as a new .indd and work with that. Since I don't have the original CS3 version I don't know how that behaved or if .inx will help, but exporting this one to .idml seems to clear up problems with all the photos except the one at the top of page 4 which rotates 180 degrees when relinked.
    For best results you should probably rebuild this file from scratch in CS5, then save as a template. Starting each new editon from a template is more reliable than resaving an old issue and removing unwanted content. Although ID is more stable than most programs when you do this, creeping corruption is always a problem with long-term resaving of the same document and you often don't see it until you are hard up on deadline and your file goes south.

  • Rotate and move multiple objects

    Hiya!
    I'm looking for a way for the user to be able to freely move
    by clicking and dragging objects and also have the ability for the
    user to rotate that object once in place. Any ideas, dudes?

    Look into startDrag(), stopDrag(), and the _rotation property
    (rotation if you're using AS3).

  • Rotating and Animating an Object

    I'm trying to animate an object so that it rotates counterclockwise up to a certain point but the falls back down to the original postion. Can anybody explain to me how to do this? I've tried using keyframes, but they do not seem to work. Thanks!

    Everytime I move a few frames forward and rotate the car, a key frame is not added. When I play back the video, the car stays in the same position where I left off. Could you also explain why the car does not have a solid look to it? It looks a bit ghostly.
    Where would I find the graph editor? I'm really new to After Effects.

  • Ease of rotating and cropping images in CS6

    There is much I like about the new crop: Rotating the image instead of the box is SO much easier and the straighten option is a great time saver.
    But in one instance, I'm finding cropping in CS6 to be harder: Cropping images that are not correctly oriented in the first place.  Rotating an image 90-degrees was a snap in CS2: Alt-I/E/0.  The shortcut keys are gone in CS6, so using the rotation command is no longer quick.
    But I can do it in the crop box, right?  True -- but not easily.  The image is landscape, the crop box is portrait.  With the crop tool selected, holding the shift key down to get fixed-increment rotations doesn't work: Pressing the SHIFT key changes the cursor from rotation to the crop cursor.  To get the rotation, I have to start rotating the image and then press SHIFT to get 15-degree increments.  A few moments later, I have rotated the image into portrait orientation -- and the crop box is now centered on the image, but it is set to crop the middle.  I have to drag the handles out to get approximately what I want: The full image in the crop box.  (What I want is what I would get if I rotate the image with the Rotate command, then control-zero to fill the screen, and then select the crop tool.)
    We rotate a lot of images.  It's easy to do in CS2 and the two approaches I've found for CS6 are both awkward.  The new crop tool has replaced the dual arrows in older versions (to swap the horizontal and vertical sizes) with a rotation arrow.  I think you should restore the arrows (and their function) -- then use the rotate button to rotate the image, not the crop box.  (Isn't that the design center for the new crop box?  We're moving the image, not the crop box.)

    Howard, thanks for the tip about the X key; didn't realize it worked that way when the crop tool is active.  But in this case I had set the crop box dimenions, so the crop box starts out with the correct orientation.  Having played with this for a day, I conclude that the best approach for this task is to restore the old keyboard conventions for image rotation and rotate the image before launching the crop tool.
    I stand by my observation that the rotate key should affect the image, not the crop box because that is consistent with the new cropping paradigm: We rotate the image, not the crop box.  I realize making a change this late in the development cycle is awkward -- but if CS6 ships with this behavior, it will become even harder to change later -- and the user interface should be as consistent as possible.
    Noel, you are correct: The images are coming from scanned film.  All frames get scanned with the same orientation.  I want to avoid the "Patient: Doctor, it hurts when I do this.  Doctor: Then don't do that!" scenario.  Granted: If images are "correctly" oriented, this issue doesn't arise.  But not all images are oriented correctly and CS6 should be at least as graceful in handling the task as previous versions.

  • Turn off wacky rotate and enlarge feature

    I'm not sure if I asked about this in the past or not. Forgive me if I have.
    When using PSCS4 on both my tower and my MBP I tend to end up with my image rotated and enlarged on screen without knowing I'm doing it. I try to be careful but it happens all the time, particularly when I work on my MacBook Pro. I tried to find a way to disable this in the Preferences but didn't have much luck.
    Can someone set me straight on this? It is annoying and I can never get my image back to normal without closing and reopening the file.
    Thanks!
    Linda

    I did a search, found the plug-in and have installed it on the MBP. I take it I might be mistaken about this behavior on my tower. It sounds like it's only related to the trackpad.
    Thank you very much for your quick reply Chris!

  • 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

  • Problem in rotating and moving image at the same time

    the problem is that im making a car game(2D) in which u have upper view of car.
    i have make the car rotate bt problem is that i canot move it forward or backward correctly
    .wen i move it forward or backward i goes wrong...
    nd another problem is that i cannot both rotate and move the car at same time
    example if i press both up nd right arrow keys i doesnt move nd rotate..
    nd also plz tell me the accelerate nd reverse method so i can speedup my car like other car games
    here is the code
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.awt.geom.*;
    import java.applet.*;
    import java.net.URL;
    public class RaceGame extends JComponent
    static int x=560;
    static int y=410;
    static int currentAngle=0;
    static double hspeed,vspeed;
    static int carspeed=1;
    Image car;
    //int angle=car.getAngle();
    Image getImage(String filename)
    URL url = getClass().getResource(filename);
    ImageIcon icon = new ImageIcon(url);
    return icon.getImage();
    //Rectangle2D.Float rect=new Rectangle2D.Float(x,y,30,30);
    //Rectangle rect=new Rectangle(x,y,30,30);
    public RaceGame()
    car=getImage("car1.jpeg");
    public void CreateBase()
    JFrame frame=new JFrame("Dare2Race");
    frame.setBounds(70,30,650,500);
    frame.setVisible(true);
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    Container c=frame.getContentPane();
    c.add(new RaceGame());
    frame.addKeyListener(new adapter());
    c.setBackground(Color.BLACK);
    //JLabel finish=new JLabel("FINISH");
    //c.add(finish);
    public void rotate()
    currentAngle+=1;
    if(currentAngle>=360)
    currentAngle=0;
    repaint();
    public void paint(Graphics g)
    super.paint(g);
    Graphics2D g2d=(Graphics2D)g;
    AffineTransform origXform=g2d.getTransform();
    AffineTransform newXform=(AffineTransform)(origXform.clone());
    newXform.rotate(Math.toRadians(currentAngle),x,y);
    g2d.setTransform(newXform);
    g2d.drawImage(car,x,y,this);
    g2d.setTransform(origXform);
    g.setColor(Color.WHITE);
    g.drawLine(640,380,420,380);
    g.drawLine(640,460,320,460);
    g.drawLine(420,380,420,300);
    g.drawLine(320,460,320,380);
    g.drawLine(420,300,125,300);
    g.drawLine(320,380,230,380);
    g.drawLine(230,380,230,460);
    g.drawLine(230,460,2,460);
    g.drawLine(125,300,125,370);
    g.drawLine(125,370,105,370);
    g.drawLine(2,460,2,180);
    g.drawLine(105,370,105,300);
    g.drawLine(2,180,450,180);
    g.drawLine(105,300,105,250);
    g.drawLine(105,250,550,250);
    g.drawLine(550,250,550,20);
    g.drawLine(550,20,275,20);
    g.drawLine(450,180,450,100);
    g.drawLine(450,100,360,100);
    g.drawLine(360,100,360,160);
    g.drawLine(360,160,10,160);
    g.drawLine(10,160,10,30);
    g.drawLine(275,20,275,90);
    g.drawLine(275,90,110,90);
    g.drawLine(110,90,110,30);
    repaint();
    class adapter extends KeyAdapter
    public void keyPressed(KeyEvent e)
    switch(e.getKeyCode())
    case KeyEvent.VK_LEFT:
    currentAngle--;
    repaint();
    break;
    case KeyEvent.VK_RIGHT:
    currentAngle++;
    repaint();
    break;
    case KeyEvent.VK_UP:
    carspeed++;
    hspeed=((double)carspeed)*Math.cos(currentAngle);
    vspeed=((double)carspeed)*Math.sin(currentAngle);
    x = x - (int) hspeed;
    y = y - (int) vspeed;
    repaint();
    break;
    case KeyEvent.VK_DOWN:
    carspeed--;
    hspeed=((double)carspeed)*Math.cos(currentAngle);
    vspeed=((double)carspeed)*Math.sin(currentAngle);
    x = x + (int)hspeed;
    y = y + (int)vspeed;
    repaint();
    break;
    public static void main(String[]args)
    RaceGame race=new RaceGame();
    race.CreateBase();
    //race.setDoubleBuffered(true);
    }

    the problem is that im making a car game(2D) in which u have upper view of car.
    i have make the car rotate bt problem is that i canot move it forward or backward correctly
    .wen i move it forward or backward i goes wrong...
    nd another problem is that i cannot both rotate and move the car at same time
    example if i press both up nd right arrow keys i doesnt move nd rotate..
    nd also plz tell me the accelerate nd reverse method so i can speedup my car like other car games
    plz help me
    here is the code
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.awt.geom.*;
    import java.applet.*;
    import java.net.URL;
    public class RaceGame extends JComponent
    static int x=560;
    static int  y=410;
    static int currentAngle=0;
    static double hspeed,vspeed;
    static  int carspeed=1;
    Image car;
    //int angle=car.getAngle();
    Image getImage(String filename)
    URL url = getClass().getResource(filename);
    ImageIcon  icon = new ImageIcon(url);   
    return icon.getImage();
    //Rectangle2D.Float rect=new Rectangle2D.Float(x,y,30,30);
    //Rectangle rect=new Rectangle(x,y,30,30);
    public RaceGame()
    car=getImage("car1.jpeg");
    public void CreateBase()
    JFrame frame=new JFrame("Dare2Race");
    frame.setBounds(70,30,650,500);
    frame.setVisible(true);
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    Container c=frame.getContentPane();
    c.add(new RaceGame());
    frame.addKeyListener(new adapter());
    c.setBackground(Color.BLACK);
    //JLabel finish=new JLabel("FINISH");
    //c.add(finish);
    public void rotate()
    currentAngle+=1;
    if(currentAngle>=360)
    currentAngle=0;
    repaint();
    public void paint(Graphics g)
    super.paint(g);
    Graphics2D g2d=(Graphics2D)g;
    AffineTransform origXform=g2d.getTransform();
    AffineTransform newXform=(AffineTransform)(origXform.clone());
    newXform.rotate(Math.toRadians(currentAngle),x,y);
    g2d.setTransform(newXform);
    g2d.drawImage(car,x,y,this);
    g2d.setTransform(origXform);
    g.setColor(Color.WHITE);
    g.drawLine(640,380,420,380);
    g.drawLine(640,460,320,460);
    g.drawLine(420,380,420,300);
    g.drawLine(320,460,320,380);
    g.drawLine(420,300,125,300);
    g.drawLine(320,380,230,380);
    g.drawLine(230,380,230,460);
    g.drawLine(230,460,2,460);
    g.drawLine(125,300,125,370);
    g.drawLine(125,370,105,370);
    g.drawLine(2,460,2,180);
    g.drawLine(105,370,105,300);
    g.drawLine(2,180,450,180);
    g.drawLine(105,300,105,250);
    g.drawLine(105,250,550,250);
    g.drawLine(550,250,550,20);
    g.drawLine(550,20,275,20);
    g.drawLine(450,180,450,100);
    g.drawLine(450,100,360,100);
    g.drawLine(360,100,360,160);
    g.drawLine(360,160,10,160);
    g.drawLine(10,160,10,30);
    g.drawLine(275,20,275,90);
    g.drawLine(275,90,110,90);
    g.drawLine(110,90,110,30);
    repaint();
    class adapter extends KeyAdapter
    public void keyPressed(KeyEvent e)
      switch(e.getKeyCode())
        case KeyEvent.VK_LEFT:
        currentAngle--;
        repaint();
        break;
        case KeyEvent.VK_RIGHT:
        currentAngle++;
        repaint();
        break;
        case KeyEvent.VK_UP:
        carspeed++;
        hspeed=((double)carspeed)*Math.cos(currentAngle);
        vspeed=((double)carspeed)*Math.sin(currentAngle);
        x = x - (int) hspeed;
        y = y - (int) vspeed;
        repaint();
        break;
        case KeyEvent.VK_DOWN:
        carspeed--;
        hspeed=((double)carspeed)*Math.cos(currentAngle);
        vspeed=((double)carspeed)*Math.sin(currentAngle);
        x = x + (int)hspeed;
        y = y + (int)vspeed;
        repaint();
        break;
    public static void main(String[]args)
    RaceGame race=new RaceGame();
    race.CreateBase();
    //race.setDoubleBuffered(true);
    }and there is no compile time error in this code
    the only error that occurs when u write java RaceGame is because of the car image which compiler doesnt found and throughs exception if u place any image in ur bin folder adn name it car.jpg it wont generate error

  • Rotation of images imported and exported from Aperture

    Hi all,
    Recently whilst on Holiday I used my iPad as a storage for the camera via the camera kit. When I got home I synced the iPad with the Mac to get the images into iPhoto, and then imported them into Aperture.
    This is where the first problem occurred. A large number of the portrait orientated images came into Aperture upside down ????
    So I selected and rotated all the incorrect ones in Aperture then carried on to sort and process them. Mostly removing the "raw, iphoto image" keywords and some cropping and tinting etc.
    Then I went to iTunes and did a sync of the photos in Aperture back to the iPad (I had wiped them from the iPad after the import into iPhoto).
    Again a large number of the images rotated themselves so that now they are upside down on the iPad.
    It would appear that either the import or sync to iPad, or both has got something wrong.
    Does anyone have any idea what to do? The images look correct now in Aperture, but are incorrect on the iPad.
    Grrr!

    Not easy to explain as i don't understand fully the details of what goes on myself, but the basics. Most cameras sense rotation, but only add a marker to tell the computer how to display the image, Some programmes see this, some don't, so you then rotate in iPhoto, then move to Aperture, and the programme now may see multiple instructions on how to display the image. Yours and the cameras. I have had this kind of problem in the past and it is very frustrating.
    The Masters only have one set of information or none on older cameras. If you use the masters to put in to Aperture then do your edits you should not have this problem. If you correct this by exporting and re importing the jpeg you will loose image quality.
    Allan

  • Rotate and move image

    Hi,I'm trying to make a game kinda like gta or asteroids whereyou have top view. I am using an image to be the player and, I want to rotate that image using left and righ keys and with the up key move the player to the direction whereit is rotated.
    The problem is that i cannot display the rotation and movement at the same time.
    I'm using a code like this.
    AffineTransform transform = new AffineTransform
    public void checkGameInput(){
         float velocityX=0;
         float velocityY=0;
         if(rotateLeft.isPressed()){
               angle1+=angle2;    
              transform.rotate(-angle2, player.getWidth()/2, player.getHeight()/2);
    // similar for rightkey
       if (moveFront.isPressed()){
               velocityX=_Player.SPEED*Math.cos(angle1),
               //same for velocityY
    }the problem is when i try to print on the sceen.
    I can update position
    public void draw(Graphics 2D g){
    g.drawImage(player. getImage(), Math.round(player.getX()), Math.round(player.getY()),null)  // player.getX(9 returns position of playeror update rtation
    public void draw(Graphics 2D g){
    g.drawImage(player.getImage(),transform, null);is there a way to join this to drawImageso I can rotate ane move the rotatyed image?
    thank you very much for any kind of help.
    Edited by: Muninn on Nov 29, 2008 3:13 AM

    Use the transform to do both rotation and translation (multiple transform operations can be concatenated)
    transform.rotate(-angle2, player.getWidth()/2, player.getHeight()/2);
    transform.translate(player.getX(), player.getY());

  • Rotate and Shift 16-bit Image

    I would like to rotate and shift a 16-bit RGB image (U64 in LabVIEW).  The IMAQ rotate and shift functions don't accept this image type, but they do accept a 16-bit grayscale image (I16 in LabVIEW).  Unfortunately, this clips all values in my original image since it runs from -32,767 to + 32,767.  The ExtractColorPlanes function requires a 16-bit image to be wired as the desination image but the IMAQ create VI does not allow U16 image to be created.
    Any ideas?
    Solved!
    Go to Solution.

    SJT a écrit:
    I would like to rotate and shift a 16-bit RGB image (U64 in LabVIEW).  The IMAQ rotate and shift functions don't accept this image type, but they do accept a 16-bit grayscale image (I16 in LabVIEW).  Unfortunately, this clips all values in my original image since it runs from -32,767 to + 32,767.  The ExtractColorPlanes function requires a 16-bit image to be wired as the desination image but the IMAQ create VI does not allow U16 image to be created.
    IMAQ Create can create U16 images, but the standard Image Type input lack the appropriate value. This is bug n°1 . As workaround, you can either wire directly a con,stant with value 7 or dig into the Vision palettes and get a better typed constant from the IMAQ Cast Image VI.
    However, this is not the solution to your problem, since there is the n°2 bug in the IMAQ ExtractSingleColorPlane VI : it doesn't accept U16 or U64 as destination images, and coerce the output to a I16 default image type.
    A workaround is to create your own color plane extraction function. First convert the U64 image into an array, then extract the desired plane, as shown on the diagram below.
    Message Edité par chilly charly le 12-30-2008 08:31 AM
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        
    Attachments:
    Extract Color Plane U64.vi.zip ‏15 KB
    U16 ExtractSingleColorPlane.vi.zip ‏13 KB
    U16 ExtractSingleColorPlane_BD.png ‏10 KB

Maybe you are looking for