Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7949375
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T01:58:51+00:00 2026-06-04T01:58:51+00:00

Can someone provide me with an example of how to plot , say 10000

  • 0

Can someone provide me with an example of how to plot , say 10000 random 3D points with x,y,z of range 0..100 in JmonkeyEngine. I was suggested to use Jmonkey instead of java3D. I am new to both.
Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T01:58:53+00:00Added an answer on June 4, 2026 at 1:58 am

    This is made in JMonkey2. The following makes 10000 spheres in 0 to 100. This ends up as an almost full box. Use WASD to control the camera.

    package wall;
    
    import java.util.Random;
    import java.util.concurrent.Callable;
    
    import com.jme.math.Vector3f;
    import com.jme.scene.shape.Sphere;
    import com.jme.util.GameTaskQueueManager;
    import com.jmex.editors.swing.settings.GameSettingsPanel;
    import com.jmex.game.StandardGame;
    import com.jmex.game.state.DebugGameState;
    import com.jmex.game.state.GameStateManager;
    
    public final class SphereExample {
    
        private static final int MAX = 100;
        private static final int TOTAL = 10000;
    
        public static void setupGame() {
            final DebugGameState state = new DebugGameState() {
                @Override
                public void update(final float timeStep) {
    
                    // Update the game state
                    super.update(timeStep);
                }
            };
            final Random random = new Random();
            for (int i = 0; i < TOTAL; i++) {
                final Sphere sphere = new Sphere("sphere", 5, 5, 1);
                sphere.setLocalTranslation(random.nextInt(MAX),
                        random.nextInt(MAX), random.nextInt(MAX));
                sphere.updateRenderState();
                state.getRootNode().attachChild(sphere);
            }
    
            GameStateManager.getInstance().attachChild(state);
            state.setActive(true);
    
        }
    
        public static void main(final String[] args) throws Exception {
    
            final StandardGame game = new StandardGame("Points");
    
            if (GameSettingsPanel.prompt(game.getSettings())) {
    
                game.start();
    
                GameTaskQueueManager.getManager().update(
                        new Callable<Void>() {
                            @Override
                            public Void call() throws Exception {
                                setupGame();
                                game.getCamera() // moves the camera to the middle
                                                 // of the spheres
                                        .setFrame(
                                                new Vector3f(50.0f,
                                                        50.0f, 50.0f),
                                                new Vector3f(-1.0f, 0.0f,
                                                        0.0f),
                                                new Vector3f(0.0f, 1.0f,
                                                        0.0f),
                                                new Vector3f(0.0f, 0.0f,
                                                        -1.0f));
                                game.getCamera().update();
                                game.getCamera().apply();
                                return null;
                            }
                        });
            }
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can someone provide a simple example of how to properly use Html.RadioButtonFor? Let's say
Can someone provide for-dummies example of how to use `MonadRandom'? Currently I have code
Can someone please provide an example on how to use plural forms in a
Can someone provide an example on how to use switch case in Ruby for
Can someone provide just a simple example of how to use wxSockets write, because
Can someone provide an example of how to load a .svg file and display
Can someone provide an example of drawing an iPhone-like turning wheel using Core Graphics
Can someone provide a working example in which stored procedure returns a recordset and
Can someone provide a good example of multiple UpdatePanels being updated by a singe
Can someone please provide a simple example of how to consume a REST service

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.