« first day (2858 days earlier)      last day (1616 days later) » 

12:16 AM
Heck yes fellas! I'll show off some fun stuff after dinner. Y'all rock, these examples are exactly what I was hoping to find!
 
 
3 hours later…
3:09 AM
With[{f = Compile[{{point, _Real, 1}, {r, _Real, 0}},
            Boole[point.point <= r^2], Parallelization -> True,
            RuntimeAttributes -> {Listable}]},
        dm3d[n_Integer, r_Integer] :=
        f[CoordinateBoundingBoxArray[{-{1, 1, 1}, {1, 1, 1}} Max[1, Quotient[n, 2]]], r]]
Another version of halirutan's method.
 
3:57 AM
user image
2
 
What function is this? :)
 
{-2 x (y - 1/5), x^2 - (y - 1/5)^3} (16 - (x^2 + y^2)^2) + {-y,
   x} (x^2 + y^2)^2
Or if you mean the full command:
(* Valentine flow *)
vstyle = Directive[Darker[Red]; Pink, Thick];
LineIntegralConvolutionPlot[{-2 x (y - 1/5),
    x^2 - (y - 1/5)^3} (16 - (x^2 + y^2)^2) + {-y, x} (x^2 + y^2)^2,
 {x, -3, 3}, {y, -3, 3},
 RasterSize -> 400,
 StreamPoints -> {{{{-0.1, 0.65}, vstyle}, {{0.12, 0.7}, vstyle}}},
 ColorFunction -> (Hue[#5^0.4] &)]
 
We were deriving a Lyapunov function for {-2 x y, x^2 - y^3} in class yesterday, and I thought I'd throw up a picture of what we had constructed. And it looked vaguely heart-shaped. Then I tweaked it a bit.
 
{-2 x y, x^2 - y^3} looks vaguely familiar.
 
4:04 AM
I can't place it. It's from Simmon's Diff. Eq. with Historical Notes.
 
I think I recall it as a modification of Hénon-Heiles, but the name of who tweaked it escapes me now.
 
Yes, it's sort of like H-H. I was thinking of it as a modification of {-2 x y, x^2 - y^2}, with y^2 changed to y^3 to make the origin a stable eq. -- a "textbook" example. in other words.
"Textbook" in the sense of contrived to make the construction of the Lyapunov function fairly straightforward.
 
4:25 AM
(Goodnight, J.M. Nice to chat with you. Bedtime here.)
 
See you too.
 
 
8 hours later…
12:21 PM
How do you display text in several fonts within a single Text command?
For example this: This is Arial and Lucida Calligraphy fonts.
 
1:10 PM
StringTemplate["This is ``. This is ``."][ToString[Style["Arial", FontFamily -> "Arial"], StandardForm], ToString[Style["Source Code Pro", FontFamily -> "Source Code Pro"], StandardForm]]
 
Seems like CaptureImage doesn't really take any arbitrary function f for ImageCaptureFunction or ImagePreviewFunction
If you define your own function (even if it returns an image) it gives you eg
ImageCapture::erropts: The value ImageAssemble[ImagePartition[#1,Scaled[0.1]]]& specified for the option ImagePreviewFunction is invalid.
aha, I see, they process the function on a single-pixel image to see if it'll work and so if your function can't handle single-pixel images (eg if it resizes below a single pixel) it will break.
 
1:25 PM
@CarlLange That does beg the question of finding a (cheap?) way to test if a function can accept an image.
 
@J.M.willbebacksoon I would have thought simply checking if the Head was Image...
well, maybe I'm oversimplifying. Even so, I am a bit surprised at this requirement - and even more surprised they don't test the function on a 2x2 image (or 20x20, or the resolution of the camera) rather than 1x1
 
@CarlLange Image[{3.}, "Real"] is certainly a bad input, but its head will still be Image.
Testing on a 2-by-2 looks sound to me.
 
Yes, I'll have to report a bug
Also ImageCapture doesn't appear to correctly respond to ImageSize :<
I guess I'll just need to use Refresh of CurrentImage instead.
Ha, also funny. If you have a disabled ImageCapture and run CurrentImage elsewhere in your code, the ImageCapture will re-enable itself
omg, UpdateInterval doesn't appear to have any effect here: Dynamic[Refresh[CurrentImage[], UpdateInterval -> 10]]
 
posted on November 15, 2019

This package defines the function MosaicPlot that summarizes the conditional probabilities of co-occurrence of the categorical values in a Dataset object or a list of records of the same length.

 
it's because CurrentImage already has its own Refresh so it can act "correctly" for shorthand like Dynamic[CurrentImage[]]
terrible
Does anybody have an idea for how to pass UpdateInterval into that internal Refresh? You can see the one I'm talking about with ResourceFunction["PrintDefinitions"][CurrentImage]
passing it to the external Dynamic doesn't work
CurrentImage also doesn't act correctly in response to ImageSize (when you pass ImagePreviewFunction). Wow, what a frustrating afternoon
 
1:46 PM
This seems to be a situation where you can bunch together bug reports, seeing that things that are supposed to mesh together actually don't.
 
 
1 hour later…
3:28 PM
@J.M.willbebacksoon that's nice. I was stuck trying with the function Text only.
 
 
2 hours later…
6:22 PM
@J.M.willbebacksoon Thank you for telling me this, I've now corrected it.
 
 
3 hours later…
9:31 PM
@J.M.willbebacksoon @anhnha alternately if you want to maintain composability and avoid the intricacies of having Style-d stuff inside a String:
StringForm[
 "This is ``. This is ``.",
 ToString[Style["Arial", FontFamily -> "Arial"], StandardForm],
 ToString[Style["Source Code Pro", FontFamily -> "Source Code Pro"],
  StandardForm]
 ]
 
 
2 hours later…
11:44 PM
Totally thought there was a 3D version of MatrixPlot Or ArrayPlot (that is not ArrayMesh which does not like to represent grayscale values one might get from an FFT) but I guess I was mistaken? Can anyone clarify? Both of your compiled offerings worked wonders btw @halirutan @J.M.willbebacksoon and I still hope to figure out this method that @b3m2a1 alluded to. :D
 
@CATrevillian Just use Image3D.
 
@halirutan I will have to try this, I think that is the one I forget about the most!
On a vastly different note, has anyone seen this, can we improve any base functionality in Mathematica using these conclusions of Eigenvectors from Eigenvalues, or is this not valuable enough as it only (to my understanding) applies to Hermitian matrices? quantamagazine.org/…
 
@CATrevillian The reason is that you cannot really display a 3d matrix. Image3D uses volume rendering which essentially means that you have translucent voxels and the overall image is created by sending lightrays from the camera through the whole volume. Each lightray accumulates its final coloring by going through all the voxels it passes.
Different values in your 3d matrix have different colors that come from the defined colorscheme.
@CATrevillian Terence Tao is one of the prodigies these days in mathematics if I remember correctly.
 

« first day (2858 days earlier)      last day (1616 days later) »