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

  • SEARCH
  • Home
  • 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 5965151
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T19:33:41+00:00 2026-05-22T19:33:41+00:00

I want to add interactivity to Mathematica 3D graphics, other than with Manipulate which

  • 0

I want to add interactivity to Mathematica 3D graphics, other than with Manipulate which is cool but has its limitations. Think four example of a demo of the four cubes problem in Mathematica, a click on one of the cubes rotates a cube.

Questions.

  1. Is it possible to catch MouseEvents in Mathematica graphics ( for example with using a Java class or otherwise? )

  2. Or is the use Java then call Mathematica from Java the advised route?

  3. Or ( I hope not ) is developing interactive graphics programs beyond of what one should do with Mathematica?

  • 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-05-22T19:33:42+00:00Added an answer on May 22, 2026 at 7:33 pm

    EventHandler can be used to catch various mouse events (mouse up, mouse down, mouse clicked, mouse dragged). Use MousePosition to add some intelligence.

    Example:

    DynamicModule[{col1 = Green, col2 = Blue}, Graphics[
      {
       EventHandler[
        Dynamic[{col1, Disk[]}, 
         ImageSize -> 
          Tiny], {"MouseClicked" :> (col1 = 
            col1 /. {Red -> Green, Green -> Red})}],
       EventHandler[
        Dynamic[{col2, Disk[{1, 1}]}, 
         ImageSize -> 
          Tiny], {"MouseClicked" :> (col2 = 
            col2 /. {Blue -> Yellow, Yellow -> Blue})}]
       }
      ]
     ]
    

    enter image description here

    The circles can be clicked independently. An action is defined for each object separately.

    Amazingly, this even works for 3D Graphics:

    DynamicModule[{col1 = Green, col2 = Blue}, 
     Graphics3D[
      {
       EventHandler[
        Dynamic[{col1, Sphere[]}, 
         ImageSize -> 
          Tiny], {"MouseClicked" :> (col1 = 
            col1 /. {Red -> Green, Green -> Red})}], 
       EventHandler[
        Dynamic[{col2, Sphere[{1, 1, 1}]}, 
         ImageSize -> 
          Tiny], {"MouseClicked" :> (col2 = 
            col2 /. {Blue -> Yellow, Yellow -> Blue})}]
       }
      ]
     ]
    

    enter image description here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want add a separator in Blackberry Listfield inside drawListRow with graphics.drawLine Method but
I want to add interactivity like clicks, hover, onpage load() to a webpage, if
I am working in jQuery script.But a little bit problem i want add the
I want add two textview with orientation vertical(One below other) in a table row
i want add a new user in lotus notes using java program but i
I want Add Select Activity values as first values of HTML dropdown, but when
I have an application that I want add some cool animations to show state
I want add alias to my .irbrc similary like alias q exit (work). But
I want add multiple images in my own project like 7 images but in
I have an image of polyline but I want add this poly line image

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.