Short question in Java3D!

Hello,
I learn completely newly Java and Java3D programming, because of this I have questions on it.
My current question is an automatic scaling.
I have partly solved it but it has not quite worked!
At first I explain the whole task to you briefly so that you can understand this small question.
The task is around calls of an editor side (.txt) in Java3D.
This list contains numbers of 3 components points (x, y, z).
e.g.: (1, 2, 3)
(2, 4, 6)     
(3, 5, 7)     
etc.
After calling the editor side these points shall be recorded as little balls (with minute radii).
I have completely taken care of it!
But the remained problem is:
Some Editor pages contain 3 components numbers, these sew from each other so are.
e.g.: (0.01, 0.02, 0.03)
(0.011, 0.021, 0.031)
(0.0111, 0.0211, 0.0311)
etc.
Only one roll because of this see the balls in the graphic on each other as. i.e:
We see only one ball.
I need an automatic scaling for it so that the programme supplies us with the correct drawing to every list
I must calculate min and Max at this automatic scaling first.
I have found that the right solution starts me with the following orders:
Code:
float minDistance = Float.MAX_VALUE;
for (int i=0; i<positionen.size(); i++)
for (int j=i+1; j<positionen.size(); j++)
Point3f p0 = positionen.get(i);
Point3f p1 = positionen.get(j);
minDistance = Math.min(minDistance, p0.distance(p1));
float faktor = minDistance / (2 * r);
But I still lack it the correct drawing a small step further, with that me
get can. Perhaps you have idea as I can make it further?
The whole program is in the appendix (Hello.zip) on the following internet page. (Hello.java)
http://rapidshare.com/files/28536450/Hello.java.html
I have uploaded only the Java page of ball production here.
I have not uploaded the other Java page of calls of the Editorseite.
I think we do not need it for this problem.
But, if it is necessary, I can upload it later.
Please, somebody can help me at it?
And as I have already written I am a whole beginner in programming, primarily in Java3D.
Because we learn very little programming in my course of study "electrical engineering".
But I learn it as a voluntary traineeship.
I am immediately available for further explanations.
I am address within reach also under the following e-mail:
[email protected]
Yours
Angelo

My Dear Friend, you posted your question in wrong forum,
Please Post your question here.
forums.java.net/jive/forum.jspa?forumID=70
you will find many very good devlopers who can help you...

Similar Messages

  • Short question about the nano controls

    Hi. I'm probably going to buy a 4Gb nano today, but first I'd like to ask a short question about the << >> buttons on the click wheel.
    I read in a forum that the << & >> buttons are actually 'skip' buttons (only used to play the previous or next song respectively), and that it's impossible to rewind or fast-forward within the track you're listening to. This is extremely important for me as I have several 2-3 hours mp3, and I need to be able to access different parts of the file quickly (eg. not having to actually wait 1 hour to listen to my favorite part). I found this to be an important feature, and I can't believe Apple hasn't thought about it.
    Anyway, I've never used an iPod, that's why this question may sound plain stupid.
    Thanks for you replies!

    The iPod fast charges to about 80% and then trickle charges the rest of the way to prevent damaging the battery/iPod. A full charge takes more than an hour or two though the battery indicator will show full. The best way to tell if a full charge has occurred is to unmount the iPod from the computer but keep it connected. The screen will show an animation of a battery. When the animation stops the battery is fully charged.
    Also, as your battery discharges the indicator will eventually show red indicating the battery is about to run out...in an hour or two. After you've owned your iPod for a couple months you'll figure out how much time you have left when the indicator turns red - it depends on a number of factors including play volume, equalizer use, etc. In real world use I'm getting over 11 hours.
    The headphones are...average. If they didn't hurt my ears I'd find them acceptable for my pop music but not so acceptable for acoustic and symphonic nor music with booming bass - because they don't boom the bass.
    I encode the majority of my music at 256 AAC and I've noticed no distortion caused by the EQ. This, plus your complaint about the earphones, leads me to think perhaps you got a bum set of phones. Borrow a pair from someone else and see what happens.

  • N95-3 two short questions

    Hi, yesterday received my new unlocked N95-3 (bronze, like it more than black). But I have two short questions:
    1. Is there anyway to end a call closing the slider? In my N80ie when I close the slider it ends the call (N80 is intelligent enough to know that if it is a BT headset connected closing the slider not end the call...).
    2. In Forum Nokia N95-3 specifications under Extra Features it´s listed PoC (Push To Talk over Cellular), in my N80 the feature is under "connectivity", but in my N95 where is the feature, I cannot find it...
    Thanks in advance.

    Right Darla, noticed that, but sinces Windows Live client still works don´t need for this one.
    By the way, my device arrived yesterday, so I don´t have much time to play with it, but, I could guess that after installed Y-Brownser if I make a search surely will find the PTT executable...
    Right now, the much missed feature to me is the chance to end a call closing the slider as in my N80ie (yeah, just today forgot it and ended up with a 20 minutes call...in my pocket, and yeah, with my girlfriend, lucky me I was driving alone and not talking with anybody). And sure perfect world if I could have the N80 screen resolution in N95 screen size...
    Last issue, with the N80 when I press the middle of the volume button of my BH-800 headset it mutes the line, anoying thing this don´t seems to work with N95...

  • Short questions about the focused item

    Hi,
    Short questions about the focused item:
    - How can I check if a specific item has the focus?
    - How can I check in my code which arbitrary item on my form has the focus?
    I need to know this because I have a checkbox and when it become unchecked, I disable an item on my form. But when this item has the focus, disabling this item will fail. Does anyone knows a solution for this problem?
    Greetz
    Eddy

    Hi Eddy!
    I suppose you should make an "event trigger" for the event "et_GOT_FOCUS" in your ItemEvent-handler and store there the item, which initiate that event. It can be like following:
    SBOApp_ItemEvent(FormUID, pVal, BubbleEvent)
    if (pVal.EventType == SAPbouiCOM.BoEventTypes.et_GOT_FOCUS)
       strCurrItemInFocus = pVal.ItemUID;
    do someth..
    if (strCurrItemInFocus == "chbxMyCheckbox1")
       // disabling this item will fail
    else
       // disable an item on my form
    I hope it helps..

  • Two short questions on timecode

    Hello,
    I've got two short ones on timecode.
    1) These days, I get quite a lot of HDV tapes. Since most of my other footage is shot on DV, I convert HDV to DV. However, when capturing that footage, I do get lots and lots of timecode breaks (I capture whole tapes), but the TC seems to be fine in the HDV player (Sony HVR-ME10). Does anybody else find that HDV tapes have TC breaks?
    2) Totally unrelated, I just read that using Capture Now means that FCP ignores the TC that is on the tape and creates its own on. Is that true? Or is it true only when I choose Device Settings>Non-Controllable Device? I'm just curious, and also it could one day get me in trouble....
    If anyone has any thoughts on these two questions, I'd be thankful.
    And now the best part of the day: LUNCHBREAK!!!
    Cheers,
    Colin
    PowerMac G5 2.5GHz DP and PowerMac G4 500MHz DP
    PowerMac G5 2.5GHz DP and PowerMac G4 500MHz DP    

    It all depends on the project. I have a client who will mark up a transcription of an interview, numbering sections in the intended order. I zip thru the clip putting in markers, naming them with the appropriate numbers (and marking an out for the marker - a very useful feature). I simply turn the markers into subclips (by dragging them into another bin), do a sort by name and drag to the timeline. Very, very fast.
    Oh and a hint. If you're intending to do a numeric sort, always add leading zeros to your clip names (if you have 99 clips, make sure 1 thur 9 are number 01 - 09 - if you have a 100 to 999 clips, make sure you add another leading zero).
    FCP has many, many possible workflows. In my old avid days, I used to obsess about figuring out the fastest way to do things. Now, I concentrate more on doing the creative stuff. But everyonceinawhile, I do have a aha! moment.

  • A short question ????

    Hi guys...
    I am trying to write a program that takes a source file and displays the data the source file contains into a browser.
    Do you guys know if there is such a thing as invisible tabel on html couse I am trying to list the data and arrange them like in the tabel but I dont whant the table to be seen...
    Is there any way to do it...
    Thank...

    for a moment i thought that i understood what you wanted to do... but it's gone now.
    you say you want to take source files, and display data from within them in browser. right?
    but you want it to be displayed like the data was in table. right?
    so... let me see if i interpret that thing correctly.
    you want to create one totaly uber-cool killler app, that takes your java source files, maybe adds some clorification to them, and then displays it in regular web browser, like IE or NS or Konqueror or whatever. right?
    but youwant to display that source code (or data) so, that each letter, that is under some other letter in your notepad, would be under it in browser as well...
    for example:
    iiiii five chars
    MMMMM five longer chars
    you don't want to see your code formated so that i is shorter char than M...
    now...
    you see how i interpreted your question...
    was that the thing you wanted to do?
    if not, then please, think about explaining your thoughts further :)
    thankyou.

  • Few short questions

    Hello Scott, could you please give me short answers to my questions!
    1) Is EPS limit and Netflow limit enforced in software or just recommendation?
    2) How do you lock performance of restricted boxes?
    3) Are you supporting virtualization yet?
    4) Where can I find out amount of RAM different boxes have - it's not in datasheet...
    Thank you and best regards!

    Martin;
      Here are answers to the questions you posted:
    1) The EPS/Netflow numbers are recommendations.  Once the incoming EPS/Netflow exceeds the performance capabilities of the system then CS-MARS will begin dropping events and in extreme cases may start thrashing at high CPU/memory usage.
    2) The performance processing for restricted boxes is limited by the license and in turn through the software.
    3) There is currently no support for virtualization of the CS-MARS appliance.
    4) For currently available appliances:
         210: 8GB
         110/110R: 4GB
         55/25/25R: 2GB
    Scott

  • Two short questions on Interactive reports

    Hello,
    I have two questions on passing filter to an Interative report
    1) the text that I send to the filter can contain commas. Is it possible to work around this? (comma is interpreted as splitting the filter values)
    e.g. f?p=104:19:::NO:19,RIR:IR_BUS1_NAME,IR_IS_OPEN:*Corporate, Other and Eliminations*,Yes
    %2C%20other%20and%20eliminations,No,Yes
    --> in this case it get messed up when passing to the IR page.
    2) anyone know if it is possible to send a IN parameter to an interactive report?
    Brgds
    Christian

    1 \value\ should do the trick
    2 Yes, I think so (only done it with ordinary reports and too lazy to check right now!).
    Build your string of value1,value2.. in an item then use the &ITEM. syntax in the SQL
    HTH,
    Chris

  • Pacman - short question about usage

    Hi,
    while searching the database with "pacman -Ss foobar", is it possible to show which of the resulting package names are already installed? In Debian it's shown via "aptitude search foobar", but I can't find the corresponding option for pacman in its man page.
    Thanks for your answer.

    Sorry, I've forgot to mention - but I think "repo-add" is more elegant solution. Personaly, I use a script which I call "auri" based on "aur-install", too. It also builds packages.
    If anyone likes it you can improve
    #!/bin/bash
    #/usr/local/sbin/auri
    # Author: Luis Useche <[email protected]>
    # Modified by: aris002 (no warranty and no reponsabilty for the damages to your system)
    # Date: 10/20/2006
    # License: GPL
    # aur-install is a tool to install any AUR package in one command. It is needed
    # to pass the url of the tarball package. It allows to see the code of both
    # PKGBUILD and install file beforme performing the installation.
    ABS_LOCAL_DIR="/var/abs/local"
    WGET="/usr/bin/wget"
    UNTAR="/bin/tar xzf"
    MAKEPKG="/usr/bin/makepkg"
    PACMAN_INSTALL="/usr/bin/pacman -U"
    REMOVE="/bin/rm -rf"
    READER="/bin/less"
    ADD_TO_MY_REPO="/usr/bin/repo-add"
    HOME_REPO_DIR="/home/myrepo"
    HOME_REPO_NAME="myrepo"
    AUR_URLPKGS="http://aur.archlinux.org/packages"
    # Function that make a yes or no question a return true in case of
    # yes otherwise false
    ask_question() {
    echo -n "$1(y/n)[y]: "; read ANSWER
    while [ -n "$ANSWER" ] && [ "$ANSWER" != "y" ] && [ "$ANSWER" != "n" ]; do
    echo -n "\"y\" or \"n\": "; read ANSWER
    done
    return `[ "$ANSWER" = "y" ] || [ -z "$ANSWER" ]`
    # Verifying root permisions
    if [ `id -u` != "0" ]; then
    echo "You need root to execute this script"
    exit 1
    fi
    # Veryfing parameters
    if [ -z "$1" ]; then
    echo "You need to pass an aur package URL or aur package name as an argument"
    echo "Usage: aur-install <pkgname>|<package tarball URL>"
    exit 1
    fi
    # Verifying if the argument is a URL or a pkg name
    if echo $1 | grep -q "http://"; then
    URL_PKGTAR=$1
    TAR_FILE=`basename $1`
    PKGNAME=`basename $1 .tar.gz`
    else
    URL_PKGTAR="$AUR_URLPKGS/$1/$1.tar.gz"
    TAR_FILE="$1.tar.gz"
    PKGNAME="$1"
    fi
    # Changing directory
    pushd $ABS_LOCAL_DIR > /dev/null
    # Download the file and place it in abs dir
    #aris002 TODO check if exists!!!
    $WGET $URL_PKGTAR
    # Untaring tar file
    $UNTAR $TAR_FILE
    # Removing the file
    #aris002 KEEP???
    $REMOVE $TAR_FILE
    # Go inside package directory
    pushd $PKGNAME > /dev/null
    # Verifying the packages
    if ask_question "Do you want to look the PKGBUILD file in case of malicious code?"; then
    $READER PKGBUILD
    # Continue?
    if ! ask_question "Do you want to continue?"; then
    exit 1
    fi
    fi
    # Including PKGBUILD
    source PKGBUILD
    if [ -n "$install" ] && ask_question "Do you want to look the $install file in case of malicious code?"; then
    $READER $install
    # Continue?
    if ! ask_question "Do you want to continue?"; then
    exit 1
    fi
    fi
    #repair (insert) arch=('i686') in PKGBUILD
    sed -i.BAK -e '/^arch/d' -e '/^pkgdesc/a \arch=('\''i686'\'')' $ABS_LOCAL_DIR/$PKGNAME/PKGBUILD
    echo "Making and installing the package..."
    # Making Package
    $MAKEPKG
    #aris002 repo-add
    $ADD_TO_MY_REPO "$HOME_REPO_DIR/$HOME_REPO_NAME.db.tar.gz" "$HOME_REPO_DIR/$pkgname-$pkgver-$pkgrel-i686.pkg.tar.gz"
    # Installing with pacman
    $PACMAN_INSTALL "$HOME_REPO_DIR/$pkgname-$pkgver-$pkgrel-i686.pkg.tar.gz"
    # Returning to the original directory
    popd > /dev/null
    popd > /dev/null

  • Simple question of java3d

    Dear all,
    I am trying to make a sphere and cube on the same graph. I try to modify the code from http://www.vrupl.evl.uic.edu/LabAccidents/java3d if you run the following code, you can see only a cube. However, if you change the size of sphere from 0.1f to 0.7f, then you will only see a blackscreen. Could anyone please tell me what wrong of the code. The problem should be under createSceneGraph function.
    Thanks
    package java3d01;
    // First we import packages that I use for Java3D
    import java.awt.Frame;
    import java.applet.Applet;
    import java.awt.*;
    import java.awt.event.*;
    import com.sun.j3d.utils.applet.MainFrame;
    import com.sun.j3d.utils.geometry.*;
    import com.sun.j3d.utils.universe.*;
    import javax.media.j3d.*;
    import javax.vecmath.*;
    public class Tools extends Applet { // notice'lesson01', which is also the name of the file : lesson01.java
        SimpleUniverse simpleU; // this is the SimpleUniverse Class that is used for Java3D
         public Tools (){  // this constructor is sometimes needed, even when empty as in here   
         public void init() {
         // this function will be called by both applications and applets
         //this is usually the first function to write       
         setLayout(new BorderLayout()); // standard Java code for BorderLayout
         // Canvas3D is where all the action will be taking place, don't worry, after adding it
         // to your layout, you don't have to touch it.         
            Canvas3D c = new Canvas3D(SimpleUniverse.getPreferredConfiguration());
         // add Canvas3D to center of BorderLayout
             add("Center", c);   
         simpleU= new SimpleUniverse(c); // setup the SimpleUniverse, attach the Canvas3D
         //This is very important, the SceneGraph (where all the action takes place) is created
         //by calling a function which here is called 'createSceneGraph'.
         //The function is not necessary, you can put all your code here, but it is a
         //standard in Java3D to create your SceneGraph contents in the function 'createSceneGraph'
             BranchGroup scene = createSceneGraph();
         //set the ViewingPlatform (where the User is) to nominal, more on this in the next lesson
            simpleU.getViewingPlatform().setNominalViewingTransform();
         // this will optimize your SceneGraph, not necessary, but it will allow your program to run faster.
            scene.compile();
            simpleU.addBranchGraph(scene); //add your SceneGraph to the SimpleUniverse  
        public BranchGroup createSceneGraph() {     
         //Here we will create a basic SceneGraph with a ColorCube object
            BranchGroup objRoot = new BranchGroup();
         TransformGroup cctg = new TransformGroup();      // a TransformGroup for the ColorCube called cctg
         ColorCube c = new ColorCube(0.1f);     // create a ColorCube object
             cctg.addChild(c);                // add ColorCube to cctg
         Sphere sphere = new Sphere(0.1f);
         cctg.addChild(sphere);
            Transform3D cc3d = new Transform3D(); // a Transform3D allows a TransformGroup to move
         cc3d.setTranslation(new Vector3f (0.5f ,0.2f ,0.0f )); // set translation to x=0.8, y=1.0, z= -2.0
         cctg.setTransform(cc3d); //
            objRoot.addChild(cctg);
         return objRoot;
        public void destroy() {     // this function will allow Java3D to clean up upon quiting
         simpleU.removeAllLocales();   
        public static void main(String[] args) {
         // if called as an application, a 500x500 window will be opened   
            Frame frame = new MainFrame(new Tools(), 1000, 1000);   
    }

    Don't use char and switch in this case.
    String answer = JOptionPane.showInputDialog("A/B?");
    if (answer.equalsIgnoreCase("A")) {
    } else if (answer.equalsIgnoreCase("B")) {
    } else {
    }

  • Short question. How do I turn off the auto indent in Pages?

    I'm trying to write test answers between the questions. When I type in the answers, they indent to the indention point of the question. Then the second line of my answer also indents the same amount; I can't get it to move out to the left margin.

    Questions regarding Word are best posted on Microsoft's own forums for their Mac software:
    http://www.officeformac.com/productforums

  • Short question of Detector Interactive mode.

    Hi..
    I have a question of detector interactive mode.
    when I run the detector with interactive mdoe, the pps exceeded and then the recommanded filter is enabled
    next, I go to the pending filter menu , in there , I can choose the action as accept accept always, always ignore.
    If the filter activated with SRC IP, and I always accept it. if so the that SRC IP enabled always?, Not All SRC IP?
    Is there command to check always accept filter in detector module? cmd or wbm

    Hi,
    If you read it again it says that you can't mount the Intel machine on your Powerbook, but you can do it the other way round. So if you connect the computers, and start your powerbook in Traget Disk Mode it will mount on the Intel machine, and you can transfer your files to the powerbook.
    Regards

  • Short question about Zen Mi

    Is it possible to display my Mp3's in a folder structure with the Zen Micro
    so that i can chose songs or albums like in Windows Explorer?

    Yes, use Creative Media Source Organizer, you can sort by Album, Artist, Genre, etc. Also you can browse in Windows Explorer if that works better for you.

  • Short question about networking, Threads and  web services..

    Lets say I got 2 classes, Midlet A and Thread B.
    I created Thread B because web services (jsr-172) uses networking and It has to be done in a separate thread other then the Midlet A.
    So, in Thread B, I have the run(), where I do all my stuff, and some getSomething() methods.
    I need to have run() complete before calling getSomething(), so I used something like this in Midlet A:
    while(true){
        if(b.isAlive())
            getSomething();
    }Problem is, Thread B only runs to completion when I don't call b.isAlive(). (I know from System.out.println I placed in it) When I do use any methods like wait() or join() or isAlive(), Thread B stops at the web service call.
    I really don't understand what's the problem. I've tried various ways to only call getSomething() when the thread finishes running, but all of them made my WTK emulator hang at the part where it asks for permission to access the network.
    If I don't use getSomething(), which is the purpose of starting the thread in the first place, it runs fine in the emulator and doesn't hang anywhere. Oh the irony.

    Bump!
    Anyone got even half a clue what's wrong? =O
    Hmm. I think that having the midlet wait for the thread causes the midlet to hang because the thread will then wait for the midlet for permission to access the network, but the midlet is waiting for the thread to finish it's code. Damn.
    Message was edited by:
    lonereaction

  • Short question about system-id

    Hi everybody,
    how can I get information about the server-id, my web dynpro-application is running on? I need something like sy-sysid in APAP
    Thanks
    Jan

    HI
    String ID = System.getProperty("SAPSYSTEMNAME");
    Try this thread,
    Retrieveing SID programmatically !
    Regards
    Saravanan K

Maybe you are looking for

  • DataSource for FBL5N - Customer Line Items

    Hello, Could someone please let me know if there is any Business Content DataSource existing for fetching data from FI transaction - FBL5N for Customer Line Items? Many thanks. Regards, Sri.

  • Billing Document Cancellation

    Dear All, I am facing an issue with the billing document cancellation. I am aware that when we create a billing document then an accounting document gets created automatically in the background and then when we cancel the billing document then anothe

  • Shared services vs essbase security

    we upgraded from v7 to sys 9 recently.. when we used V7 essbase security was maintained by maxl scritps..? creation of filters granting access and everything was using maxl.. How can i do the same now? I think I cannot grant access to the cube or a f

  • Safari 4.0.3 and Google

    I just updated to 10.5.8 and Safari 4.0.3 (or whatever it is, the latest one). Every time I try to access Google with Safari, Safari crashes. I tested with another browser (Camino) and it's working fine. So, in some way it does have to do with Safari

  • How do I determine correct media encoder settings for Blu-Ray

    I am successfully producing Hi Def Blu-Ray disks by using one of the presets available in Premiere media encoder. Actually using the HDTV 1080i 25 High Quality setting. They playback in beautiful high definition but I think I was just lucky. I would