<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://jexp.ru/index.php?action=history&amp;feed=atom&amp;title=Java%2F3D%2FMotion</id>
		<title>Java/3D/Motion - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://jexp.ru/index.php?action=history&amp;feed=atom&amp;title=Java%2F3D%2FMotion"/>
		<link rel="alternate" type="text/html" href="http://jexp.ru/index.php?title=Java/3D/Motion&amp;action=history"/>
		<updated>2026-04-05T15:51:26Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://jexp.ru/index.php?title=Java/3D/Motion&amp;diff=6439&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://jexp.ru/index.php?title=Java/3D/Motion&amp;diff=6439&amp;oldid=prev"/>
				<updated>2010-06-01T06:13:43Z</updated>
		
		<summary type="html">&lt;p&gt;1 версия&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Предыдущая&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Версия 06:13, 1 июня 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;text-align: center;&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://jexp.ru/index.php?title=Java/3D/Motion&amp;diff=6438&amp;oldid=prev</id>
		<title> в 18:01, 31 мая 2010</title>
		<link rel="alternate" type="text/html" href="http://jexp.ru/index.php?title=Java/3D/Motion&amp;diff=6438&amp;oldid=prev"/>
				<updated>2010-05-31T18:01:43Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== HelloJava3Dc renders a single, rotating cube ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
 * @(#)HelloJava3Dc.java 1.0 98/11/09 15:07:04&lt;br /&gt;
 * &lt;br /&gt;
 * Copyright (c) 1996-1998 Sun Microsystems, Inc. All Rights Reserved.&lt;br /&gt;
 * &lt;br /&gt;
 * Sun grants you (&amp;quot;Licensee&amp;quot;) a non-exclusive, royalty free, license to use,&lt;br /&gt;
 * modify and redistribute this software in source and binary code form,&lt;br /&gt;
 * provided that i) this copyright notice and license appear on all copies of&lt;br /&gt;
 * the software; and ii) Licensee does not utilize the software in a manner&lt;br /&gt;
 * which is disparaging to Sun.&lt;br /&gt;
 * &lt;br /&gt;
 * This software is provided &amp;quot;AS IS,&amp;quot; without a warranty of any kind. ALL&lt;br /&gt;
 * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY&lt;br /&gt;
 * IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR&lt;br /&gt;
 * NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE&lt;br /&gt;
 * LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING&lt;br /&gt;
 * OR DISTRIBUTING THE SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS&lt;br /&gt;
 * LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT,&lt;br /&gt;
 * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER&lt;br /&gt;
 * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF&lt;br /&gt;
 * OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY&lt;br /&gt;
 * OF SUCH DAMAGES.&lt;br /&gt;
 * &lt;br /&gt;
 * This software is not designed or intended for use in on-line control of&lt;br /&gt;
 * aircraft, air traffic, aircraft navigation or aircraft communications; or in&lt;br /&gt;
 * the design, construction, operation or maintenance of any nuclear facility.&lt;br /&gt;
 * Licensee represents and warrants that it will not use or redistribute the&lt;br /&gt;
 * Software for such purposes.&lt;br /&gt;
 */&lt;br /&gt;
import java.applet.Applet;&lt;br /&gt;
import java.awt.BorderLayout;&lt;br /&gt;
import java.awt.Frame;&lt;br /&gt;
import javax.media.j3d.Alpha;&lt;br /&gt;
import javax.media.j3d.BoundingSphere;&lt;br /&gt;
import javax.media.j3d.BranchGroup;&lt;br /&gt;
import javax.media.j3d.Canvas3D;&lt;br /&gt;
import javax.media.j3d.RotationInterpolator;&lt;br /&gt;
import javax.media.j3d.TransformGroup;&lt;br /&gt;
import com.sun.j3d.utils.applet.MainFrame;&lt;br /&gt;
import com.sun.j3d.utils.geometry.ColorCube;&lt;br /&gt;
import com.sun.j3d.utils.universe.SimpleUniverse;&lt;br /&gt;
//   HelloJava3Dc renders a single, rotating cube.&lt;br /&gt;
public class HelloJava3Dc extends Applet {&lt;br /&gt;
  public BranchGroup createSceneGraph() {&lt;br /&gt;
    // Create the root of the branch graph&lt;br /&gt;
    BranchGroup objRoot = new BranchGroup();&lt;br /&gt;
    // Create the transform group node and initialize it to the&lt;br /&gt;
    // identity. Add it to the root of the subgraph.&lt;br /&gt;
    TransformGroup objSpin = new TransformGroup();&lt;br /&gt;
    objSpin.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);&lt;br /&gt;
    objRoot.addChild(objSpin);&lt;br /&gt;
    // Create a simple shape leaf node, add it to the scene graph.&lt;br /&gt;
    // ColorCube is a Convenience Utility class&lt;br /&gt;
    objSpin.addChild(new ColorCube(0.4));&lt;br /&gt;
    // Create a new Behavior object that will perform the desired&lt;br /&gt;
    // operation on the specified transform object and add it into&lt;br /&gt;
    // the scene graph.&lt;br /&gt;
    Alpha rotationAlpha = new Alpha(-1, 4000);&lt;br /&gt;
    RotationInterpolator rotator = new RotationInterpolator(rotationAlpha,&lt;br /&gt;
        objSpin);&lt;br /&gt;
    // a bounding sphere specifies a region a behavior is active&lt;br /&gt;
    // create a sphere centered at the origin with radius of 100&lt;br /&gt;
    BoundingSphere bounds = new BoundingSphere();&lt;br /&gt;
    rotator.setSchedulingBounds(bounds);&lt;br /&gt;
    objSpin.addChild(rotator);&lt;br /&gt;
    return objRoot;&lt;br /&gt;
  } // end of CreateSceneGraph method&lt;br /&gt;
  public HelloJava3Dc() {&lt;br /&gt;
    setLayout(new BorderLayout());&lt;br /&gt;
    Canvas3D canvas3D = new Canvas3D(null);&lt;br /&gt;
    add(&amp;quot;Center&amp;quot;, canvas3D);&lt;br /&gt;
    BranchGroup scene = createSceneGraph();&lt;br /&gt;
    // SimpleUniverse is a Convenience Utility class&lt;br /&gt;
    SimpleUniverse simpleU = new SimpleUniverse(canvas3D);&lt;br /&gt;
    // This will move the ViewPlatform back a bit so the&lt;br /&gt;
    // objects in the scene can be viewed.&lt;br /&gt;
    simpleU.getViewingPlatform().setNominalViewingTransform();&lt;br /&gt;
    simpleU.addBranchGraph(scene);&lt;br /&gt;
  } // end of HelloJava3D (constructor)&lt;br /&gt;
  //  The following allows this to be run as an application&lt;br /&gt;
  //  as well as an applet&lt;br /&gt;
  public static void main(String[] args) {&lt;br /&gt;
    Frame frame = new MainFrame(new HelloJava3Dc(), 256, 256);&lt;br /&gt;
  } // end of main (method of HelloJava3D)&lt;br /&gt;
} // end of class HelloJava3Dc&lt;br /&gt;
&lt;br /&gt;
           &lt;br /&gt;
       &amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- end source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Sphere Motion ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * @(#)SphereMotion.java 1.38 02/10/21 13:55:06&lt;br /&gt;
 * &lt;br /&gt;
 * Copyright (c) 1996-2002 Sun Microsystems, Inc. All Rights Reserved.&lt;br /&gt;
 * &lt;br /&gt;
 * Redistribution and use in source and binary forms, with or without&lt;br /&gt;
 * modification, are permitted provided that the following conditions are met:&lt;br /&gt;
 *  - Redistributions of source code must retain the above copyright notice,&lt;br /&gt;
 * this list of conditions and the following disclaimer.&lt;br /&gt;
 *  - Redistribution in binary form must reproduce the above copyright notice,&lt;br /&gt;
 * this list of conditions and the following disclaimer in the documentation&lt;br /&gt;
 * and/or other materials provided with the distribution.&lt;br /&gt;
 * &lt;br /&gt;
 * Neither the name of Sun Microsystems, Inc. or the names of contributors may&lt;br /&gt;
 * be used to endorse or promote products derived from this software without&lt;br /&gt;
 * specific prior written permission.&lt;br /&gt;
 * &lt;br /&gt;
 * This software is provided &amp;quot;AS IS,&amp;quot; without a warranty of any kind. ALL&lt;br /&gt;
 * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY&lt;br /&gt;
 * IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR&lt;br /&gt;
 * NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE&lt;br /&gt;
 * LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING&lt;br /&gt;
 * OR DISTRIBUTING THE SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS&lt;br /&gt;
 * LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT,&lt;br /&gt;
 * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER&lt;br /&gt;
 * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF&lt;br /&gt;
 * OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY&lt;br /&gt;
 * OF SUCH DAMAGES.&lt;br /&gt;
 * &lt;br /&gt;
 * You acknowledge that Software is not designed,licensed or intended for use in&lt;br /&gt;
 * the design, construction, operation or maintenance of any nuclear facility.&lt;br /&gt;
 */&lt;br /&gt;
import java.applet.Applet;&lt;br /&gt;
import java.awt.BorderLayout;&lt;br /&gt;
import java.awt.GraphicsConfiguration;&lt;br /&gt;
import javax.media.j3d.Alpha;&lt;br /&gt;
import javax.media.j3d.AmbientLight;&lt;br /&gt;
import javax.media.j3d.Appearance;&lt;br /&gt;
import javax.media.j3d.Background;&lt;br /&gt;
import javax.media.j3d.BoundingSphere;&lt;br /&gt;
import javax.media.j3d.BranchGroup;&lt;br /&gt;
import javax.media.j3d.Canvas3D;&lt;br /&gt;
import javax.media.j3d.ColoringAttributes;&lt;br /&gt;
import javax.media.j3d.DirectionalLight;&lt;br /&gt;
import javax.media.j3d.Light;&lt;br /&gt;
import javax.media.j3d.Material;&lt;br /&gt;
import javax.media.j3d.PointLight;&lt;br /&gt;
import javax.media.j3d.PositionInterpolator;&lt;br /&gt;
import javax.media.j3d.RotationInterpolator;&lt;br /&gt;
import javax.media.j3d.SpotLight;&lt;br /&gt;
import javax.media.j3d.Transform3D;&lt;br /&gt;
import javax.media.j3d.TransformGroup;&lt;br /&gt;
import javax.vecmath.Color3f;&lt;br /&gt;
import javax.vecmath.Point3d;&lt;br /&gt;
import javax.vecmath.Point3f;&lt;br /&gt;
import javax.vecmath.Vector3d;&lt;br /&gt;
import javax.vecmath.Vector3f;&lt;br /&gt;
import com.sun.j3d.utils.applet.MainFrame;&lt;br /&gt;
import com.sun.j3d.utils.geometry.Sphere;&lt;br /&gt;
import com.sun.j3d.utils.universe.SimpleUniverse;&lt;br /&gt;
public class SphereMotion extends Applet {&lt;br /&gt;
  // Constants for type of light to use&lt;br /&gt;
  private static final int DIRECTIONAL_LIGHT = 0;&lt;br /&gt;
  private static final int POINT_LIGHT = 1;&lt;br /&gt;
  private static final int SPOT_LIGHT = 2;&lt;br /&gt;
  // Flag indicates type of lights: directional, point, or spot&lt;br /&gt;
  // lights. This flag is set based on command line argument&lt;br /&gt;
  private static int lightType = POINT_LIGHT;&lt;br /&gt;
  private SimpleUniverse u = null;&lt;br /&gt;
  public BranchGroup createSceneGraph(SimpleUniverse u) {&lt;br /&gt;
    Color3f eColor = new Color3f(0.0f, 0.0f, 0.0f);&lt;br /&gt;
    Color3f sColor = new Color3f(1.0f, 1.0f, 1.0f);&lt;br /&gt;
    Color3f objColor = new Color3f(0.6f, 0.6f, 0.6f);&lt;br /&gt;
    Color3f lColor1 = new Color3f(1.0f, 0.0f, 0.0f);&lt;br /&gt;
    Color3f lColor2 = new Color3f(0.0f, 1.0f, 0.0f);&lt;br /&gt;
    Color3f alColor = new Color3f(0.2f, 0.2f, 0.2f);&lt;br /&gt;
    Color3f bgColor = new Color3f(0.05f, 0.05f, 0.2f);&lt;br /&gt;
    Transform3D t;&lt;br /&gt;
    // Create the root of the branch graph&lt;br /&gt;
    BranchGroup objRoot = new BranchGroup();&lt;br /&gt;
    // Create a Transformgroup to scale all objects so they&lt;br /&gt;
    // appear in the scene.&lt;br /&gt;
    TransformGroup objScale = new TransformGroup();&lt;br /&gt;
    Transform3D t3d = new Transform3D();&lt;br /&gt;
    t3d.setScale(0.4);&lt;br /&gt;
    objScale.setTransform(t3d);&lt;br /&gt;
    objRoot.addChild(objScale);&lt;br /&gt;
    // Create a bounds for the background and lights&lt;br /&gt;
    BoundingSphere bounds = new BoundingSphere(new Point3d(0.0, 0.0, 0.0),&lt;br /&gt;
        100.0);&lt;br /&gt;
    // Set up the background&lt;br /&gt;
    Background bg = new Background(bgColor);&lt;br /&gt;
    bg.setApplicationBounds(bounds);&lt;br /&gt;
    objScale.addChild(bg);&lt;br /&gt;
    // Create a Sphere object, generate one copy of the sphere,&lt;br /&gt;
    // and add it into the scene graph.&lt;br /&gt;
    Material m = new Material(objColor, eColor, objColor, sColor, 100.0f);&lt;br /&gt;
    Appearance a = new Appearance();&lt;br /&gt;
    m.setLightingEnable(true);&lt;br /&gt;
    a.setMaterial(m);&lt;br /&gt;
    Sphere sph = new Sphere(1.0f, Sphere.GENERATE_NORMALS, 80, a);&lt;br /&gt;
    objScale.addChild(sph);&lt;br /&gt;
    // Create the transform group node for the each light and initialize&lt;br /&gt;
    // it to the identity. Enable the TRANSFORM_WRITE capability so that&lt;br /&gt;
    // our behavior code can modify it at runtime. Add them to the root&lt;br /&gt;
    // of the subgraph.&lt;br /&gt;
    TransformGroup l1RotTrans = new TransformGroup();&lt;br /&gt;
    l1RotTrans.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);&lt;br /&gt;
    objScale.addChild(l1RotTrans);&lt;br /&gt;
    TransformGroup l2RotTrans = new TransformGroup();&lt;br /&gt;
    l2RotTrans.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);&lt;br /&gt;
    objScale.addChild(l2RotTrans);&lt;br /&gt;
    // Create transformations for the positional lights&lt;br /&gt;
    t = new Transform3D();&lt;br /&gt;
    Vector3d lPos1 = new Vector3d(0.0, 0.0, 2.0);&lt;br /&gt;
    t.set(lPos1);&lt;br /&gt;
    TransformGroup l1Trans = new TransformGroup(t);&lt;br /&gt;
    l1RotTrans.addChild(l1Trans);&lt;br /&gt;
    t = new Transform3D();&lt;br /&gt;
    Vector3d lPos2 = new Vector3d(0.5, 0.8, 2.0);&lt;br /&gt;
    t.set(lPos2);&lt;br /&gt;
    TransformGroup l2Trans = new TransformGroup(t);&lt;br /&gt;
    l2RotTrans.addChild(l2Trans);&lt;br /&gt;
    // Create Geometry for point lights&lt;br /&gt;
    ColoringAttributes caL1 = new ColoringAttributes();&lt;br /&gt;
    ColoringAttributes caL2 = new ColoringAttributes();&lt;br /&gt;
    caL1.setColor(lColor1);&lt;br /&gt;
    caL2.setColor(lColor2);&lt;br /&gt;
    Appearance appL1 = new Appearance();&lt;br /&gt;
    Appearance appL2 = new Appearance();&lt;br /&gt;
    appL1.setColoringAttributes(caL1);&lt;br /&gt;
    appL2.setColoringAttributes(caL2);&lt;br /&gt;
    l1Trans.addChild(new Sphere(0.05f, appL1));&lt;br /&gt;
    l2Trans.addChild(new Sphere(0.05f, appL2));&lt;br /&gt;
    // Create lights&lt;br /&gt;
    AmbientLight aLgt = new AmbientLight(alColor);&lt;br /&gt;
    Light lgt1 = null;&lt;br /&gt;
    Light lgt2 = null;&lt;br /&gt;
    Point3f lPoint = new Point3f(0.0f, 0.0f, 0.0f);&lt;br /&gt;
    Point3f atten = new Point3f(1.0f, 0.0f, 0.0f);&lt;br /&gt;
    Vector3f lDirect1 = new Vector3f(lPos1);&lt;br /&gt;
    Vector3f lDirect2 = new Vector3f(lPos2);&lt;br /&gt;
    lDirect1.negate();&lt;br /&gt;
    lDirect2.negate();&lt;br /&gt;
    switch (lightType) {&lt;br /&gt;
    case DIRECTIONAL_LIGHT:&lt;br /&gt;
      lgt1 = new DirectionalLight(lColor1, lDirect1);&lt;br /&gt;
      lgt2 = new DirectionalLight(lColor2, lDirect2);&lt;br /&gt;
      break;&lt;br /&gt;
    case POINT_LIGHT:&lt;br /&gt;
      lgt1 = new PointLight(lColor1, lPoint, atten);&lt;br /&gt;
      lgt2 = new PointLight(lColor2, lPoint, atten);&lt;br /&gt;
      break;&lt;br /&gt;
    case SPOT_LIGHT:&lt;br /&gt;
      lgt1 = new SpotLight(lColor1, lPoint, atten, lDirect1,&lt;br /&gt;
          25.0f * (float) Math.PI / 180.0f, 10.0f);&lt;br /&gt;
      lgt2 = new SpotLight(lColor2, lPoint, atten, lDirect2,&lt;br /&gt;
          25.0f * (float) Math.PI / 180.0f, 10.0f);&lt;br /&gt;
      break;&lt;br /&gt;
    }&lt;br /&gt;
    // Set the influencing bounds&lt;br /&gt;
    aLgt.setInfluencingBounds(bounds);&lt;br /&gt;
    lgt1.setInfluencingBounds(bounds);&lt;br /&gt;
    lgt2.setInfluencingBounds(bounds);&lt;br /&gt;
    // Add the lights into the scene graph&lt;br /&gt;
    objScale.addChild(aLgt);&lt;br /&gt;
    l1Trans.addChild(lgt1);&lt;br /&gt;
    l2Trans.addChild(lgt2);&lt;br /&gt;
    // Create a new Behavior object that will perform the desired&lt;br /&gt;
    // operation on the specified transform object and add it into the&lt;br /&gt;
    // scene graph.&lt;br /&gt;
    Transform3D yAxis = new Transform3D();&lt;br /&gt;
    Alpha rotor1Alpha = new Alpha(-1, Alpha.INCREASING_ENABLE, 0, 0, 4000,&lt;br /&gt;
        0, 0, 0, 0, 0);&lt;br /&gt;
    RotationInterpolator rotator1 = new RotationInterpolator(rotor1Alpha,&lt;br /&gt;
        l1RotTrans, yAxis, 0.0f, (float) Math.PI * 2.0f);&lt;br /&gt;
    rotator1.setSchedulingBounds(bounds);&lt;br /&gt;
    l1RotTrans.addChild(rotator1);&lt;br /&gt;
    // Create a new Behavior object that will perform the desired&lt;br /&gt;
    // operation on the specified transform object and add it into the&lt;br /&gt;
    // scene graph.&lt;br /&gt;
    Alpha rotor2Alpha = new Alpha(-1, Alpha.INCREASING_ENABLE, 0, 0, 1000,&lt;br /&gt;
        0, 0, 0, 0, 0);&lt;br /&gt;
    RotationInterpolator rotator2 = new RotationInterpolator(rotor2Alpha,&lt;br /&gt;
        l2RotTrans, yAxis, 0.0f, 0.0f);&lt;br /&gt;
    bounds = new BoundingSphere(new Point3d(0.0, 0.0, 0.0), 100.0);&lt;br /&gt;
    rotator2.setSchedulingBounds(bounds);&lt;br /&gt;
    l2RotTrans.addChild(rotator2);&lt;br /&gt;
    // Create a position interpolator and attach it to the view&lt;br /&gt;
    // platform&lt;br /&gt;
    TransformGroup vpTrans = u.getViewingPlatform()&lt;br /&gt;
        .getViewPlatformTransform();&lt;br /&gt;
    Transform3D axisOfTranslation = new Transform3D();&lt;br /&gt;
    Alpha transAlpha = new Alpha(-1, Alpha.INCREASING_ENABLE&lt;br /&gt;
        | Alpha.DECREASING_ENABLE, 0, 0, 5000, 0, 0, 5000, 0, 0);&lt;br /&gt;
    axisOfTranslation.rotY(-Math.PI / 2.0);&lt;br /&gt;
    PositionInterpolator translator = new PositionInterpolator(transAlpha,&lt;br /&gt;
        vpTrans, axisOfTranslation, 2.0f, 3.5f);&lt;br /&gt;
    translator.setSchedulingBounds(bounds);&lt;br /&gt;
    objScale.addChild(translator);&lt;br /&gt;
    // Let Java 3D perform optimizations on this scene graph.&lt;br /&gt;
    objRoot.rupile();&lt;br /&gt;
    return objRoot;&lt;br /&gt;
  }&lt;br /&gt;
  public SphereMotion() {&lt;br /&gt;
  }&lt;br /&gt;
  public void init() {&lt;br /&gt;
    setLayout(new BorderLayout());&lt;br /&gt;
    GraphicsConfiguration config = SimpleUniverse&lt;br /&gt;
        .getPreferredConfiguration();&lt;br /&gt;
    Canvas3D c = new Canvas3D(config);&lt;br /&gt;
    add(&amp;quot;Center&amp;quot;, c);&lt;br /&gt;
    u = new SimpleUniverse(c);&lt;br /&gt;
    BranchGroup scene = createSceneGraph(u);&lt;br /&gt;
    // This will move the ViewPlatform back a bit so the&lt;br /&gt;
    // objects in the scene can be viewed.&lt;br /&gt;
    u.getViewingPlatform().setNominalViewingTransform();&lt;br /&gt;
    u.addBranchGraph(scene);&lt;br /&gt;
  }&lt;br /&gt;
  public void destroy() {&lt;br /&gt;
    u.cleanup();&lt;br /&gt;
  }&lt;br /&gt;
  //&lt;br /&gt;
  // The following allows SphereMotion to be run as an application&lt;br /&gt;
  // as well as an applet&lt;br /&gt;
  //&lt;br /&gt;
  public static void main(String[] args) {&lt;br /&gt;
    // Parse the Input Arguments&lt;br /&gt;
    String usage = &amp;quot;Usage: java SphereMotion [-point | -spot | -dir]&amp;quot;;&lt;br /&gt;
    for (int i = 0; i &amp;lt; args.length; i++) {&lt;br /&gt;
      if (args[i].startsWith(&amp;quot;-&amp;quot;)) {&lt;br /&gt;
        if (args[i].equals(&amp;quot;-point&amp;quot;)) {&lt;br /&gt;
          System.out.println(&amp;quot;Using point lights&amp;quot;);&lt;br /&gt;
          lightType = POINT_LIGHT;&lt;br /&gt;
        } else if (args[i].equals(&amp;quot;-spot&amp;quot;)) {&lt;br /&gt;
          System.out.println(&amp;quot;Using spot lights&amp;quot;);&lt;br /&gt;
          lightType = SPOT_LIGHT;&lt;br /&gt;
        } else if (args[i].equals(&amp;quot;-dir&amp;quot;)) {&lt;br /&gt;
          System.out.println(&amp;quot;Using directional lights&amp;quot;);&lt;br /&gt;
          lightType = DIRECTIONAL_LIGHT;&lt;br /&gt;
        } else {&lt;br /&gt;
          System.out.println(usage);&lt;br /&gt;
          System.exit(0);&lt;br /&gt;
        }&lt;br /&gt;
      } else {&lt;br /&gt;
        System.out.println(usage);&lt;br /&gt;
        System.exit(0);&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    new MainFrame(new SphereMotion(), 700, 700);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
           &lt;br /&gt;
       &amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- end source code --&amp;gt;&lt;/div&gt;</summary>
			</entry>

	</feed>