2
votes
1answer
74 views

How to program a clickPanel for chemical elements (like a periodic table)?

The command ColorData["Atoms", "Panel"] indicates RGBColors of "Atoms" by clicking a panel. As I don't want to reinvent the wheel, I asked myself: How to ...
0
votes
2answers
86 views

How to localize the symbols x,y, A, B in the following program? [closed]

I see a example in Paul Wellin's Programming with Mathematica An Introduction, 4th edition: ...
4
votes
1answer
150 views

DynamicModule inconsistent behavior; was: DynamicModule persistent UI changes

Update: I'll restate the question in hopefully more terse and clearer terms. To illustrate the issue, run this and save the resulting notebook: ...
1
vote
1answer
88 views

Scope of variables within a Manipulate expression [duplicate]

I have a problem in defining the local variables. I have this code: ...
3
votes
0answers
118 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
143 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 ...
33
votes
2answers
617 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
1k 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
148 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 ...
112
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
320 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
152 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
189 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 ...
3
votes
2answers
287 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
630 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
346 views

How to create a multi-selectable setterbar with colored buttons

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

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

Consider the following snippet as a reference. ...
6
votes
1answer
155 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
249 views

ShearingTransform and Dynamic

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

PaneSelector and options in a Module

Consider the following snippet of code: ...
6
votes
1answer
249 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
646 views

LocatorPane and PlotRange

Consider the following snippet from the documentation on LocatorPane ...
31
votes
3answers
3k 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
228 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
287 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
972 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 ...
21
votes
2answers
336 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
575 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 (...
13
votes
1answer
358 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 ...