« first day (3199 days earlier)      last day (40 days later) » 

12:35 AM
@CarlLange Haha, yeah I didn't know what to expect, but worth the cut-and-paste
 
1:22 AM
I am trying to take intersections of several three-dimensional regions by using regionplot3d command.
Currently thinking how to use looping to take intersections for several 3-D regions.
RegionPlot3D[
x - 2*(A/8)^(i) - p^(i)*(y + z) < 0 &&
x + (A/8)^(i) - p^(i)*(y + z) > 0 &&
x - 2*(A/8)^(i) - p^(i)*(y + z) < 0 &&
x + (A/8)^(i) - p^(i)*(y + z) > 0, {x, -2, 2}, {y, -2, 2}, {z, -2,
2}, Mesh -> None, PlotPoints -> 100]
The region after taking i = 4,5,6,...,20
any idea of looping?
A =3, p =0.5
 
 
7 hours later…
7:58 AM
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:
6
 
 
2 hours later…
9:32 AM
@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.
 
 
5 hours later…
2:47 PM
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.
 
3:08 PM
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.
 
3:37 PM
@MichaelHale Take a look at this for an example of Dynamic and grid updating.
 
3:49 PM
@RohitNamjoshi Thanks. Unfortunately, it's not any faster than my current solution.
 
@MichaelHale "current solution" in React or WL Dynamic?
 
WL. I haven't done this exact thing in React. That's just been influencing my thinking from my day job this year.
 
 
3 hours later…
7:15 PM
@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
 
7:29 PM
Mathematica almost mentioned in a great University Challenge episode: youtu.be/mKJLqpQAF-8?t=661
 
 
2 hours later…
10:11 PM
@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.
 
10:39 PM
@MichaelHale It's gotta be in the expr but can be like
Dynamic[
 trigger;
 some actual expr,
 TrackedSymbols:>{trigger}
 ]
Whenever I do UI work I find myself doing stuff like that
 
10:51 PM
@b3m2a1 Works. Thanks.
 

« first day (3199 days earlier)      last day (40 days later) »