3D-Animation with Java?

I want to have a 3D object which I want to let the user turn it with the mousepointer so that he can look at it from all sides. The object uses images, which would be like "textures".
Is this possible with Java? If yes, please give me some clues.

Java3D api allows you to do things like this. Im sure you can find a ton of tutorials for basic stuff. Also, take a look at Selman's book as well, "Java3D Programming".
Cheers,
Greg

Similar Messages

  • Reset CSS Animation With Java?

    I'm having trouble trying to reset my css animation after its clicked. Once the animation is clicked on it will not show the animation if clicked again. How can I have my animation reset after 2 seconds?
    Heres the HTML:
    <a href="software/ASC.exe">
                            <section id="download" title="Download ASC">
                                Download
                            </section>
    Here is the CSS:
    .animated {
    .animated {
        -webkit-animation:fadeOutUp 2s;
        -moz-animation:fadeOutUp 2s;
        -o-animation:fadeOutUp 2s;
        -ms-animation:fadeOutUp 2s;
        animation:fadeOutUp 2s;
    @-webkit-keyframes fadeOutUp {
    0% {
        opacity: 1;
        -webkit-transform: translateY(0);
    100% {
        opacity: 0;
        -webkit-transform: translateY(-20px);
    @-moz-keyframes fadeOutUp {
    0% {
        opacity: 1;
        -moz-transform: translateY(0);
    100% {
        opacity: 0;
        -moz-transform: translateY(-20px);
    @-o-keyframes fadeOutUp {
    0% {
        opacity: 1;
        -o-transform: translateY(0);
    100% {
        opacity: 0;
        -o-transform: translateY(-20px);
    @keyframes fadeOutUp {
    0% {
        opacity: 1;
        transform: translateY(0);
    100% {
        opacity: 0;
        transform: translateY(-20px);
    .fadeOutUp {
    -webkit-animation-name: fadeOutUp;
    -moz-animation-name: fadeOutUp;
    -o-animation-name: fadeOutUp;
    animation-name: fadeOutUp;
    And here is the Java Script
    </script>
    <script language="javascript">
    window.onload = function() {
    var btn = document.getElementById("download");
    btn.addEventListener("click", function(e) {
      this.className = "animated";
    </script>
    Any Help would be greatly appreciated!

    You could use the css pseudo class :focus to fire the animation. That way, if they click on anything after clicking the Download button (like the OK or Cancel box in the download prompt), and then click the button again, it would fire the animation. You'd need to add a tabindex attribute to the link to make it work in -webkit, but that's easy enough. You wouldn't need javascript for it at all.
    <!DOCTYPE html>
    <html lang="en">
      <head>
        <meta charset="utf-8" />
        <title>Quick Animation</title>
        <style>
        .animated { color:green; }
        .animated:focus {
        -webkit-animation:fadeOutUp 2s;
        -moz-animation:fadeOutUp 2s;
        -o-animation:fadeOutUp 2s;
        -ms-animation:fadeOutUp 2s;
        animation:fadeOutUp 2s;
    @-ms-keyframes fadeOutUp {
        0% {opacity: 1;-ms-transform: translateY(0);}
        100% {opacity: 0; -ms-transform: translateY(-20px);}
    @-webkit-keyframes fadeOutUp {
        0% {opacity: 1;-webkit-transform: translateY(0);}
        100% {opacity: 0; -webkit-transform: translateY(-20px);}
    @-moz-keyframes fadeOutUp {
        0% {opacity: 1;-moz-transform: translateY(0);}
        100% {opacity: 0;-moz-transform: translateY(-20px);}
    @-o-keyframes fadeOutUp {
    0% {opacity: 1;-o-transform: translateY(0);}
    100% {opacity: 0;-o-transform: translateY(-20px);}
    @keyframes fadeOutUp {
    0% {opacity: 1;transform: translateY(0);}
    100% {opacity: 0;transform: translateY(-20px);}
    .fadeOutUp {
    -ms-animation-name: fadeOutUp;
    -webkit-animation-name: fadeOutUp;
    -moz-animation-name: fadeOutUp;
    -o-animation-name: fadeOutUp;
    animation-name: fadeOutUp;
    </style>
      </head>
      <body>
        <div id="section_4">
             <a href="#" id="download" class="animated" title="Download ASC" tabindex="1">Download</a>
        </div>
      </body>
    </html>

  • Animation with JAVA

    I am trying to create a simulation to explain TCP/IP protocol but I am having difficulty placing the images on my Applet. I need to sned a message and then show an acknowledgement coming back. Any help and/or information would be greatly appreciated

    why not use power point?

  • I have a problem with Java and an e-procurement system integrating

    I use an e-procurement system at work and yesterday I could not get my parts list from the suppliers web site to display in our in-house eprocurment finance package.
    There is not a problem with the finance package. There is not a problem with the suppliers web site. I have verified both of these by other colleagues being able to complete what I am trying to do.
    The difference between my version of Firefox and my colleagues' is that I am on version 6.0.1 and they are on 6.0.
    I have had problems with Java not displaying certain animations on the suppliers web site but, my colleague does not and I am suspicious that this is the problem. Can anyone verify this please and what can I do about it. My Java updates are up-to-date as of yesterday and are automatic.
    Thanks.

    I was quite amazed I never got a reply to this, in the past people here have been helpful. In any case I was finally able to enter this website on the exceptions list in the Java panel, and I believe it is okay  now.

  • Up an running with Java. What tools to download?

    Hello, I use to work with Java applications about three years ago, but had switched over to another language. Now I need to develop code using Java again. In fact, I need to reuse some of the code I developed a few years ago. The code does alot with animations. So here is my question.
    "What tools do I need to get up and running with Java?"
    1. What compiler to use (recommend the best open source editor, or one that is not that expensive)?
    2. Where is the Java SDK that I need to download?
    3. Will my three year old code still be compatible with the SUN, Java code I wrote 3 years ago?
    Ralph

    Actually Jwenting is right, IntelliJ is by all measures the best IDE.
    I have used textpad, programmers notepad (which I still use for some things), VIM, eclipse for a number of years, intelliJ for a short time, and Netbeans since earlier this year.
    textpad - Great place to learn the basics, but once the basics are down you need to find an IDE.
    Programmers notepad - love it, still use it for some languages, has some features you will find nowhere else
    VIM - You have your vi lovers and your vi haters, I would say I fall into the haters camp but still keep up with it because when you need an editor to make a quick change on some obscure system with very little on it, some version of Vi will undoubtedly be there. Once you get into the flow it is not bad, but there is lots of annoying things about vi and its offspring.
    Eclipse - Great IDE, was the better of the free ones for a long time. For me eclipse's strength became it's albatross. That is plugins ofcourse. There are literally thousands of plugins that can make eclipse do just about anything you want. The problem is there is very little oversite so some plugins are great, some good, some ok, some suck, and some are deliberately hostile. You don't really know what you are going to get until you try it, but removing it can be a pain so sometimes you are stuck. Plus getting the plugins to play nice with each other can be a chore, the more plugins you have the harder it gets to get new ones to play nice. It was after a whole day stint trying to get eclipse to work again after picking a bad plugin that i simply decided to give netbeans 6.0 a try since it had what I wanted packaged in already.
    IntelliJ - Only got to use this for a short time as they went ahead and bought it at my last job after I gave my months notice for leaving. Guess they figured it would be easier to replace me that way. From the little I got to play with it, it was extremely user friendly to the point of being a pleasure to work with, You definitely got what you paid for.
    Netbeans 6.0 and higher - Netbeans pre 6.0 sucked. Even 5.5 was not as good as eclipse at the time of it's release, but was a sign they were headed in the right direction. After releasing version 4 only to have it suck and laughed at in the java community since eclipse was hundreds of times better Sun realized netbeans was making them look bad. So they decided to fix that and decided the best way to fix it was to model netbeans as closely after IntelliJ (which was the best even back then) as legally possible. With each release they get closer to realizing this goal, and since it is free with each release netbeans picks up more and more former eclipse fanbois. It is now at the point where most people following the eclipse vrs netbeans war will agree that netbeans has taken the lead and has more current users than eclipse. I would even wager that most of the people who said netbeans was best in this thread were not long ago eclipse fans. Bottom line, of the free IDEs netbeans is the better choice at this point.
    But I got to ask, when you say a salary of R8,000 - R12,000 do you mean monthly income or annually? If annually can you even survive on about $1,000 in US dollars for a year? I mean I make about 8 times that in a month, after uncle sam takes his portion, and i wouldn't call myself rich by any means.
    Also jwenting have you tried the newer netbeans? I think if you do you will see they are strikingly similar to IntelliJ in many ways.
    JSG
    Edited by: JustSomeGuy on Dec 5, 2008 7:24 AM

  • Screensaver with Java 3D

    Hello,
    How can I make a .scr file with my .class file in Java3D? And, another question is, How can I put the animation in fullscreen to do the screensaver?
    Thanks

    Hi,
    a .scr file is the same a .exe file. In order to create a screen saver with java 3d, you must write a .exe file and rename it to .scr.
    The .exe file has to start your java 3d programm. To do so, it must execute javaw with some command line arguments:
    javaw -Dj3d.fullscreen=REQUIRED <pathToYourClass>orjavaw -Dj3d.fullscreen=REQUIRED -jar <yourJarFile>Note: as i know, the fullscreen mode is only available in the DirectX version.
    Ok. Let's assume the name for your java main class is "saver.SaverMain" and you are programming in C, then the main method would look like this:
    int WINAPI WinMain(HINSTANCE hInstance,
                       HINSTANCE hPrevInstance,
                       LPSTR lpCmdLine,
                       INT nCmdShow)
         MSG msg;
         HANDLE hAccelTable;
         hInst = hInstance;
         if (!InitApplication())
              return 0;
         hAccelTable = LoadAccelerators(hInst,MAKEINTRESOURCE(IDACCEL));
         if ((hwndMain = CreatejavastarterWndClassWnd()) == (HWND)0)
              return 0;
         int aus=(int)ShellExecute(hwndMain,
                                      "open",
                                      "javaw",
                                      "-Dj3d.fullscreen=REQUIRED saver.Savermain",
                                      NULL,SW_SHOWNORMAL);
         return aus;
    }If you are looking for a free C compiler for Windows, then lcc from http://www.q-software-solutions.com is a nice choice.
    Regards,
    Oliver

  • Can be implemented with Java 2D?

    Could anyone tell me what kind of effect in this flash animation? it can be implemented with Java 2D?
    http://www.echt-wahnsinn.de/liebesgesichtflash.htm

    Thanks for your answer.
    so it's not only just for fun but the part of our semester project. :-)
    Could you explian it more in detail, I mean "manipulate the color/brightness values"
    please tell me if the step is right:
    1. load a new image as background pic and another new pic as the small image (using BufferedImage)
    because I will scale(maybe scale = 0.5) the both pics in my UI window.
    . img_org . img_min . img_result .
    2. create the background pic in third ImagePanel automatically and finish the image manipulations.
    at the same time to get the size of img_org, img_min, and color/brightness values, pixels.
    here I am not sure how to implement it effectively. image clipping?
    any suggestion and help are welcome!!
    laue

  • How to synchronize animation with time?

    I want to synchronize animation with time, but I can't determine the current time, because the return value of the System.currentTimeMillis() method is updated only every 10 milliseconds.
    The following example demonstrates it:
    import java.applet.Applet;
    import java.awt.Graphics;
    class TimeStep extends Applet
      long minimalStep=1000L;
      long lastTime=System.currentTimeMillis();
      public void paint(Graphics g)
        g.drawString("Minimal timestep: "+minimalStep,5,30);
        for (int i=25;i-->0;)
          while (true)
             long newTime=System.currentTimeMillis();
             long step=newTime-lastTime;
             if (step>0L)
                 if (step<minimalStep)
                    minimalStep=step;
                 lastTime=newTime;
                 break;
        repaint();
    }It causes flickers by most framerates:
    import java.applet.Applet;
    import java.awt.Graphics;
    class SynchronizedAnimation extends Applet
      static final int FRAME_RATE=90;     // 100 works, 90 flickers
      static final int STEP=5;
      static final int WIDTH=640;
      static final int HEIGHT=20;
      static final long FRAME_TIME=1000L/FRAME_RATE;
      int lastPosition,newPosition;
      long lastTime=System.currentTimeMillis();
      public void paint(Graphics g)
        long waitedTime=lastTime+FRAME_TIME;
        while (waitedTime-System.currentTimeMillis()>0L);
        lastTime=waitedTime;
        newPosition=(lastPosition+STEP)%WIDTH;
        g.drawLine(newPosition,0,newPosition,HEIGHT);
        if (lastPosition!=newPosition)
            g.setColor(getBackground());
            g.drawLine(lastPosition,0,lastPosition,HEIGHT);
            lastPosition=newPosition;
        repaint(0L);
      public void update(Graphics g)
        paint(g);

    On windows 9x its even worse. The timer is only updated every 50/60 milliseconds.
    Instead you could do something like keep the time when the animation starts, and then everytime you want to paint, check how much time has gone since then and calculate where the animation has gone to at this point.
    Even if you can only update every 50 ms, it gives you 20 frames. I don't think its that bad.

  • Sprite animation with double buffering

    Hello, I am writing a game. I am not using swing. Just awt.
    I have several books I am looking at right now. One uses the
    BufferedImage class to create a buffered sprite. The other book instead uses the Image class to impliment double buffering. So, I am really confused now. I do not know if I should use the BufferedImage class or the Image class. Note that
    Please help. Which method is the best to use?
    Val

    These links may assist you in full-screen animation with double-buffering:
    http://www.sys-con.com/java/article.cfm?id=1893
    http://www.meatfighter.com/meat.pdf
    - Mike

  • XSLT Mapping with Java class not working in Integration Repository

    Hi,
    I have an XSLT mapping program with Java enhancement and I was able to successfully tested it in Stylus Studio. However, when I imported the Java class and the xslt program in Enterprise Service Builder and tested it, my program does not compile.
    Here is the error message: "Transformer Configuration Exception occurred when loading XSLT mapping_temp.xsl; details: Could not compile stylesheet".
    My java program is in a zip file containing SOAPHeaderHandler.java and SOAPHeaderhandler.class. My Java has a package com.nga.xslt.
    Here is the declaration of my Java class in the XSLT: xmlns:javamap="java:com.nga.xslt.SOAPHeaderHandler"
    It seems that it could not read the java class. Can you please advice what is wrong?

    Hi ,
    select XMLTOOLKIT option in Operation mapping and execute it.
    I am not sure we can call java program in XSLT Program,but alternative is copy the code and use it in XSLT mapping it self,that means your XSLT program will become with JAVA extensions.
    then in Operation mapping level select SAPXMLTOOL kit option and execute it. i hope it will work. if it is not working then you have deploy some JAXP files on server,because the way execution of XSLT Mpaping program got changed,like when eve you executing XSLT with extnasions( if you are not using XMLTOOL kit option) then you have to use latest version of JAXP.JDK files.
    Regards,
    Raj

  • Sir i am using datasocket read ,i am communicating with java but my problem is that bcz im using while loop to see if value has changed my labview consumes all the processors time ,sir i want a event like thing so that while loop is not in continuous loop

    sir i have given lot of effort but i am not able to solve my problem either with notifiers or with occurence fn,probably i do not know how to use these synchronisation tools.

    sir i am using datasocket read ,i am communicating with java but my problem is that bcz im using while loop to see if value has changed my labview consumes all the processors time ,sir i want a event like thing so that while loop is not in continuous loopHi Sam,
    I want to pass along a couple of tips that will get you more and better response on this list.
    1) There is an un-written rule that says more "stars" is better than just one star. Giving a one star rating will probably eliminate that responder from individuals that are willing to anser your question.
    2) If someone gives you an answer that meets your needs, reply to that answer and say that it worked.
    3) If someone suggests that you look at an example, DO IT! LV comes with a wonderful set of examples that demonstate almost all of the core functionality of LV. Familiarity with all of the LV examples will get you through about 80% of the Certified LabVIEW Developer exam.
    4) If you have a question first search the examples for something tha
    t may help you. If you can not find an example that is exactly what you want, find one that is close and post a question along the lines of "I want to do something similar to example X, how can I modify it to do Y".
    5) Some of the greatest LabVIEW minds offer there services and advice for free on this exchange. If you treat them good, they can get you through almost every challenge that can be encountered in LV.
    6) If English is not your native language, post your question in the language you favor. There is probably someone around that can help. "We're big, we're bad, we're international!"
    Trying to help,
    Welcome to the forum!
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Problem with java installation on Linux

    HI ,
    I am trying to install jdk on Linux..I am new to java and Linux both. I am trying to download the file for the linux installation onto my home PC(windows XP) and then ftp it to my Linux machine. I need to do this because I have a remote login to my Linux machine( a server at school). However when I try to download file my IE jsut crashes. I can see the page for accepting the Agreement but when I click on Accept the next page just stops responding.
    Could someone explain why this is happening.
    thanks,
    G.

    The problem doesn't have to do anything with Java or Linux as far as i can see. It's more likely a problem with Windows XP and IE. Be assured that normally downloading the Linux JDK in windows is not a problem.

  • Problem with Java and Windows (Mainly Vista and UAC)

    Hi all,
    I am having a problem with a program that I've devoloped. The program itself is packaged as a jar and I plan to deploy it across multiple platforms eventually however right now i am only concerned about windows based systems. I have made an installer for a windows baised systems using NSIS to install the software files. I made the installer as I need several java packages to be installed so the program would work (JAI, J3D, JAI ImageIO) and I also require the program to have fileassociations on windows.
    I know that this is not what java is about, however the majority of the users will be on windows baised systems so I've decided that OS specific installers is the best option.
    During the process I have noticed that there are several key problem with java for this type of application!
    The first issue that I have come across is getting file associations to work on java. As a .jar is not an excutable it is not possible to directly associate a filetype with it in java so to overcome this I currently run the program from a .bat files and also the program requires large memory so this also allows me to run the program with -xmx. The batch file that I use is :
    <code>
    cd PATH TO PROGRAM
    start javaw -Dsun.java2d.noddraw=true -Xmn100M -Xms500M -Xmx1000M -jar "PATH TO PROGRAM\program.jar" %1 -vram 134217728
    pause;
    </code>
    Ok so all this appears to work fine and allows windows to have file associations and start the program and thats all works perfectly but this is a non-ideal solution. Has anyone got any advice on improving this?
    The next problem that I have appears to be a problem with Vista and UAC (user access control). When a user installs the program and installs the program into the program files directory I found that the program did not work and kept saying that I did not have access to the files in the current directory. This is a problem as I read and write settings files during program execution.
    On a Vista system UAC prevents file write operations into the Program Files directory unless the program has requested elevated status even if the user is a full administrator. The probem is that there appears to be no real way to achieve this under java that I'm aware of...
    Has anyone else had this probem and has a suitable solution?
    Any advice on these issues would realy be appricated.
    Regards
    Joey

    Ok so i've kinda found a solution, its not ideal but its very good. I found this program called Elevate
    A link to the site I got it was
    http://www.wintellect.com/cs/blogs/jrobbins/archive/2007/03/27/elevate-a-process-at-the-command-line-in-vista.aspx
    This program allows you start java with a UAC dialog for high access using
    Elevate java -jar myjar.jar
    This then allows you to have full access using java... I guess it could be dangerous but it does the job.

  • Problem with java and flex web service

    Hi,
    I have a basic web service written in java using jax ws 2.1
    ri. I need to call it from Flex using the WebService class
    Annotations for the java web method :
    @WebMethod
    public void Login(
    @WebParam(name="server") String serverURL,
    @WebParam(name=AUTHENTICATE_HEADER,header=true,mode=WebParam.Mode.INOUTHolder<Authenticate Header>
    authHeader)
    When I try and call the service from Flex , it can't find the
    login method and attempts to call it fail. If I set the web service
    to RPC based using @SOAPBinding , the method is found but then
    there are issues with the authentication header.
    What do I need to do to get flex web services communicating
    succesfully with java ?
    Are there are any known compatibility issues ? Or guidelines
    for going about this ?
    Any help would be appreciated

    well Shay,
    i've used JDev's tools to developer and to deploy the web service: the war and ear files are automatically generates you to the end of the process.
    I have included all the files java and the compiled classes, but I do not have files jar.
    But don't works: if i create only one java class with all code inside then it works fine!!
    Daniele

  • Problem with java and yahoo games

    hello everyone,
    i have a mac 10.6.8 with java SE 6 1.6.0_33-603-424 and i have problems with yahoo games.... anyone can help me please, i have a mac 10.6.8 with java SE 6 1.6.0_33-603-424 and i have problems with yahoo games.... anyone can help me please

    So here is what comes to pass.
    Recall this started as a Lion Safari/5+ environment that SU took to version 6.
    Two weeks ago I just updated Flash Player. Today I fire up Java Preferences and I am told that I need to download Java. Did so, intentionally hit the "factory reset" button and then installed the Flash Player from teh Adobe site. The most recent install suggests automatic update but I choose "ask first."
    Restart Safari and we seem to be in order
    Thanks

Maybe you are looking for