« first day (1522 days earlier)      last day (2952 days later) » 

12:10 AM
@kirma Is it common for people in bars to have laptops, to begin with? :)
 
 
1 hour later…
1:18 AM
This is making me insane; I upgraded to Mma 10.3 today, and it broke a small piece of my code, so I googled the error, it's about adding Method->"Queued" to a button
so I did, but now clicking the button just does nothing
This is what I'm trying to run:
sdi = {}; DialogInput[
DialogNotebook[{Button["Choose file",
AppendTo[sdi, SystemDialogInput["FileOpen"]], Method -> "Queued"],
Button["Finished", DialogReturn[sdi], Method -> "Queued"]}]];
earlier today (with 10.0) that worked great. Now I need to add Method->"Queued" and it pops the dialog window up. But when I click on either of the buttons, nothing happens. What's causing this?
 
1:53 AM
I have a bunch of polygons that fit neatly together like this:
The white thin lines (you may have to click on the image to see them) indicate the boundaries of the polygons. Is there a way to get the points that make up the boundary of the union of all polygons?
 
2:09 AM
@Pickett This is a bit convoluted. But, I think it might be straightforward:
    bdr = BoundaryDiscretizeRegion@
      RegionUnion@{Polygon[{{0, 0}, {1, 0}, {0, 1}}],
        Polygon[{{1, 0}, {1, 1}, {0, 1}}]}

    MeshPrimitives[bdr, 2]
which gives
{Polygon[{{0., 1.}, {0., 0.}, {1., 0.}, {1., 1.}}]}
 
2:23 AM
@rcollyer Thank you, I like that approach but unfortunately it seems like my polygons are too complicated for it to work.
Here is a notebook with polygons that can be used as a test case: Import["http://goo.gl/NaH6rM"]["http://i.stack.imgur.com/GEnXA.png"]
 
2:48 AM
@Pickett I thought that might be a difficulty. I'll play with it and see what I can make it do.
@Pickett I've never used it before. It's clever, and a bit insane. :)
 
 
1 hour later…
3:58 AM
@rcollyer ok, these polygons represent municipalities and the union represents the province that they make up, so if I can't find a way I can find a way to merge them I can probably find better data somewhere (maybe I can even use the built in geo tools in Mathematica.) But it would be nice if it was possible to merge them :)
 
 
4 hours later…
8:09 AM
@Pickett Try this:
With[{g =
    Graph@Flatten@
      Map[UndirectedEdge @@@ Partition[#, 2, 1, 1] &,
       polygons /. Polygon -> List, {2}]},
  Polygon[#[[All, 1]]] & /@
   FindCycle[
    VertexDelete[g,
     v_ /; VertexDegree[g, v] > 2 &&
       Min[VertexDegree[g, #] & /@ AdjacencyList[g, v]] >
        2], \[Infinity], All]] // Graphics
It removes shared border edges by using graphs, and reconstructs polygons.
Although there is nagging of graph functionality having bugs, it's really lots of help on this kind of things.
Of course if there are visual edges which are geometrically the same but constructed differently (basically, different amount of vertices on the same line), this doesn't work out of the box.
Hmm... it doesn't handle holes either. Groan...
 
 
1 hour later…
9:42 AM
@Leonid I started a comment on your answer to the "general strategies to write big code in Mathematica", but it became too big. But I think that my suggestion is of interest to many people, and eventually on topic for a meta topic. Well here it is:
Besides the fact that I would definitely be willing to participate on a a la kickstarter project for an actualisation of your current book, and its extension (second volume) into the topics you have informally added through this site, during the last couple of years, I wonder if you would be interested on giving a course (or two) on some of these topics on the next WTC2016.
I generally take one or two pre-conference courses. This year, some emphasis is (rightfully) given to introduction to the language, but I bet that a course (or two) presented by you would have a full-house. Also, since theses are paid, it would definitely cover for your presence at the conference...
(and would somehow take you into the barebones organization of the book :-)
 
 
3 hours later…
12:45 PM
@kirma Works well on the test case but it runs forever on some other very similar sets of polygons.
 
That could be FindCycle at work. There's a chance it could be simplified.
 
 
1 hour later…
1:54 PM
@P.Fonseca I agree with this. I've been to the last two WTC and I find detailed attention on how to organise large projects for reuse is not given any attention. Last year I asked for a pre-conference Workbench course (an all day one) whose purpose would be to create a deployable Player Pro CDF from scratch that used encrypted packages (authored in the course) and accessed external data (could use ExampleData or Imort as a proxy for a databasee).
I didn't get a response.
 
2:25 PM
"On March 19, 1916 Albert Einstein submitted his “Foundation of the General Theory of Relativity” for publication in the journal Annelen Der Physik."
(Really noticed it on local tabloid, "today in history" ...)
Annalen Der Physik of course....
 
2:57 PM
Hi everyone, quick question: Let's say I have a set of GeoPositions, a and b. I would like to find a bearing to go from a to b. I know that GeoDestination can take a location and a bearing to provide an "endpoint", but I'd like to go the other way around.
 
@kirma And of course "Der" is an article an needs to be written in lowercase :)
 
@halirutan Heh, true. :)
Only two typos in a three-word name... :I
 
3:22 PM
10
Q: How to find the outline of a country given the imperfect outlines of its administrative subdivisions?

SzabolcsI have a larger outline divided into several regions. While my data represents something else, let us think of this as the provinces/counties of a country, for the sake of simplicity. This is, for example, a 90 degrees rotated Uzbekistan I made for illustration purposes: What I have is the p...

 
Nevermind, got it figured out
 
@R.M. Ah, that' my question exactly. Thank you.
 
 
3 hours later…
6:00 PM
@Edmund I would definitely have taken the course you suggested them!!
 
 
2 hours later…
8:22 PM
0
Q: "[not so] Elementary Introduction[s] to the W.L." at the WTC2016

P. FonsecaIn the sequence of the following conversation: ... Leonid... your answer... "general strategies to write big code in Mathematica" [...] I wonder if you would be interested on giving a course (or two) on some of these topics on the next WTC2016 and ... Last year I asked for a pre-conference Wor...

 

« first day (1522 days earlier)      last day (2952 days later) »