2
votes
0answers
86 views

How to restrict the mouse cursor to stay within a box?

I'm trying to use Mathematica to write small games, and I find that it would help to restrict the player's mouse into the game window (just like other games do). Is there any way to achieve this? ...
2
votes
2answers
118 views

Solving a dynamic program via recursion

I'm trying to use recursion to solve a joint inventory/ dynamic pricing problem as in monahan, petruzzi and zhao 2004. I tried to solve for y[t] and ...
32
votes
2answers
571 views

How safe is the use of Block and Internal`InheritedBlock

For many questions on this site answers are given which suggest to use Block and, especially for more advanced topics, ...
8
votes
2answers
881 views

Dynamic graph visualisation using JLink/Java and GraphStream

Visualising the addition of new nodes and edges to a graph to 'watch it grow' is to something Mathematica is not suited to by default. However this type of animation really helps convey the emergence ...
2
votes
1answer
124 views

Combining two notebooks

I have a notebook which contain all the variables and defined functions. I want to do two tasks. As an example, I want to find the density and energy which have equations in terms of above mentioned ...
106
votes
1answer
21k views

Mathematica Minecraft

Some time ago I asked myself: with all these great graphics and interactive capabilities of Mathematica, what kinds of 3D games can be implemented in it? And the answer which came to mind is ...
5
votes
1answer
281 views

Progress indicator with shared variables

I'm trying to create a custom progress indicator for a parallelized computation, using Dynamic and SetSharedVariables to display ...
4
votes
1answer
145 views

Transform sequential cell operations to programmatic workflow

Let's say I have a workflow that involves importing images and turning them into an animated gif. Here's how I currently have it setup: Import Images: ...
4
votes
3answers
180 views

Is it possible to replicate the “magic” of OptionPatterns[] with DynamicModule's local variables?

Creating richer interactive interfaces that are generated by a DynamicModule invariably requires more complex data structures and in particular, a larger argument ...
2
votes
2answers
244 views

Dynamic lists as function arguments

Suppose I have a function that requires a list is as input. I.e. f[list_]:=DoSomethingWithList Now, if I pass a variable as Dynamic like this ...
0
votes
2answers
597 views

Basic Dynamic Interface Programming that returns variables to nb functions

I have a dynamic module that contains some basic PopupMenu's and Buttons but also need to use the variables returned from these buttons and PopupMenu's in my nb functions outside of this ...
7
votes
1answer
298 views

How to create a multi-selectable setterbar with colored buttons

Background: consider the following code-snippet. ...
7
votes
2answers
203 views

Moving controls from Manipulate to a Palette ( or similar GUI object )

Consider the following snippet as a reference. ...
6
votes
1answer
146 views

How can I make sure all InputFields have values before processing a nb form?

This is a two part problem: I have a form that accepts both numeric and text inputs, then runs a function using a "process" Button. The issue I'm having is users that forget to fill out all of the ...
10
votes
2answers
240 views

ShearingTransform and Dynamic

Background: I have a geometric transformation composed of a RotationTransform, ScalingTransform and ...
2
votes
1answer
87 views

PaneSelector and options in a Module

Consider the following snippet of code: ...
6
votes
1answer
220 views

LocatorPane and multiple EventHandlers, PassEventsDown option

Consider the following piece of code from Heike as an ( accepted ) answer on LocatorPane, selecting multiple Locators - Basically the code implements dragging polygons on a LocatorPane. ...
18
votes
3answers
572 views

LocatorPane and PlotRange

Consider the following snippet from the documentation on LocatorPane ...
27
votes
3answers
2k views

How to create a progress bar?

I would like to create a progress bar tool that allows me to see how my computations are going. I found answers to this question on many sites, I even found a package for it ( ...
2
votes
2answers
210 views

Question about MapThread and Dynamic

I don't understand the following: f[a_, b_] := a + b ls = {1, 2, 3}; MapThread[f, {ls, {10, 20, 30}}] This yields ( as expected ) {11,22,33} If I change ...
5
votes
3answers
252 views

Question about modifying a Slider2D control

Background: I want to develop a custom control, based on a 2D slider. I currently have this ( working ) example. ...
25
votes
4answers
865 views

Question about collections of custom GUI controls for Mathematica

Background: I have only recently begun programming GUIs in Mathematica, so I have a continuous need for custom controls. I needed a scrollable list control and with the help of Google I found a ...
19
votes
2answers
312 views

What is the equivalent of a prototypical Manipulate in lower level functions?

Background: In the Mathematica tutorial 'Dynamic Interactivity' I read that there is a way of developing GUIs in Mathematica that do not use Manipulate. I want to ...
18
votes
1answer
520 views

What is the proper method to load a Mathematica package inside a DynamicModule

I have a DynamicModule that requires loading of Mathematica packages. The usual methods do not seem to apply (...
10
votes
1answer
305 views

Is it possible to use Begin and End inside a Manipulate?

May be someone can explain why I can't use Begin["context`"] and End[] inside a Manipulate ...