If you ever wanted to get something similar to Matlab's plot interactivity in Mathematica, there's now ResourceFunction["InteractiveGraphics"], with support for zooming, dragging, and data-tip placement:
@zhk, one thing I forgot to mention: you can simplify the NeumannValues quite a bit by using, for example, NeumannValue[ha*(Tp[t, x, y, z] - Tinf), y == 0 || y==Lap || ...] and the DirichletCondition[{Tp[t, x, y, z] == Tc, Tn[t, x, y, z] == Tc}, x == 0] etc.
Quick Dynamic question. It's been a couple of years since I've used more than it's most basic use cases, and I've been deep in the Typescript/React world for UI this year. If I want like a 50x50 grid of squares and clicking on one of them changes the color, can I do that without redrawing the full set of squares? Do I need to make each square depend on a separate symbol instead of the shared array?
I can of course do it with the full redraw, but it takes about a second to update.
Maybe if I switch to ArrayPlot or something instead of Graphics and Rectangles.
It's interesting to compare React to Dynamic. I remember someone doing a brief comparison to Angular I think. You have to manually specify which data the UI depends on as a whole in React, and it recalculates those dependencies with each change, but it is smart about the redrawing smaller sections. If the recalculated dependency has the same value for a particular section of the UI, it doesn't redraw that section (update the HTML). So that's the part where it is a bit smart/fast/automatic.
The "hooks" syntax is pretty short and clean. Pretty productive and flexible system.
But I don't think people use it for 3D graphics. Use separate libraries that wrap HTML Canvas.
But I have used charting libraries that wrap HTML Canvas and play nicely with React. Including built-in subtle animations and such.
@MichaelHale The fastest approach is likely to make each square itself a Dynamic object. and give it a special TrackedVariable that allows you to control when it updates. The whole Dynamic system is clunky & I'd try to avoid it were I you
@b3m2a1 Yeah. The above is the best I got. It is as fast as I wanted. I don't understand why some slightly simpler variations of that didn't work. But it does give the fast performance and let me read the data back out from the original array.
I thought I could just let "trigger" be some dummy variable, but it seems important to use it meaningfully in the expression. So maybe TrackedSymbols isn't just any symbol, but selecting from those used in the Dynamic.
But it's way better than leaving TrackedSymbols off.
I definitely still think Dynamic is cool. This was just messing around, but I'm certainly one of those people in the group Wolfram talks about about who uses Mathematica behind the scenes for random tasks at my job.