« first day (120 days earlier)      last day (4361 days later) » 

R.M
1:00 AM
0
Q: Implementing a first person view of 3D objects in a scene

R.MI've created the following scene with a Chinese-style building surrounded by trees, and a horse and a rabbit grazing on the grass in Mathematica (don't ask me why there's a bust of Beethoven in there...). The Chinese-style roof was created using J. M.'s equations in this answer. The code to creat...

@JM I bailed on the fancy tangent/intersection... Eyeballing it was simpler ;)
 
Oh well... :)
@EliLansey The reference I remember offhand deals with $\cot\,x=\kappa\,x$, but the techniques there should also be applicable to your transcendental equation...
@RM Begin["NonProprietaryCode"];` - tsk, tsk... :P
 
R.M
@JM :P
Wow, it looks fantastic. Do you mind if I mention it during the next Tuesday's Mathematica Live Experts session? — Yu-Sung Chang 4 mins ago
 
@RM Good job; Yu-Sung likes your question...
 
R.M
Uhh.. I guess I need to polish up the rough edges now, huh?
 
@RM You just have to make sure it's something other people won't point and laugh at, no? :)
 
R.M
1:17 AM
@JM Well, then I call it a day :)
 
Just a little thing: ArcSin[colRad/Norm[{colRad, colOff}]], I'd probably simplify to ArcTan[colOff, colRad]...
 
R.M
@JM d' oh. That's why you never fiddle around with intersections of surfaces late at night... :) fixed now
 
Like I said, just a little thing. :) The other parts look fine. :)
(On that note, due to the convenience of two-argument arctangent, a lot of times I try checking if I can use it instead of other inverse trigonometric functions...)
 
1:40 AM
@RM pure reddit pr0n. I love it!
 
R.M
@Verbeia Thanks :)
 
acl
@RM JS Bach, where is Bach?
(fantastic job otherwise:) )
 
1:57 AM
hi all
 
acl
@belisarius that didn't work out very well :)
 
mmm. wikipedia leaks?
ha
Dear All: mr. Ludvig Van
 
acl
but js, where is js
(I only have one hobby horse, let me ride it)
 
@JM what's the reference?
 
@RM Congrats! I'll post it at reddit and facebook.
 
2:05 AM
@EliLansey Gil/Segura/Temme, Numerical Methods for Special Functions. See chapter 7.
@acl Well, the site uses JS... :)
 
2:36 AM
@JM thanks!
 
2:47 AM
For you guys who like bunnies:
 
3:01 AM
 
3:44 AM
I know Vitaliy was kidding, but a Mathematica-based FPS doesn't sound too farfetched these days...
 
R.M
@JM The full question I had written out (which is why the first paragraph says "code at the very end"... currently the "very" seems out of place) included a hawk on the tree eyeing the rabbit... the goal was to move the rabbit around to a position where it's shaded from the hawk's view. more than 10 s in its view and it's dinner.
I removed that part because I felt it might be too much work to expect anyone to do, especially when this is not really a problem that I face
 
That's going to be torture for most graphics cards, I think...
 
R.M
Very likely... I'm sure that the current one by itself is a bit too complex to allow for real time flying on moderate cards...
Hmm... why is a function f considered to be "enclosing" g only when written as f[g[...]] and not as f@g[...] or g[...]//f, even though they're equivalent?
 
@RM The pedantic answer would be that the first bit has enclosing delimiters... :D
the other two are mere affixes.
 
R.M
@JM I was hoping to avoid that :D... but a serious example: items Sowed are collected by the nearest "enclosing" Reap. Yet, the following give different results
Reap[{1, Sow[2, "x"], 3, 4}, "x"]
Reap[#, "x"] &@{1, Sow[2, "x"], 3, 4}
{1, Sow[2, "x"], 3, 4} // Reap[#, "x"] &
{1, Sow[2, "x"], 3, 4}~Reap~"x"
Infix works too
 
4:02 AM
@RM Oh, you meant in that context. Precedence weirdness?
 
Hello
R.M, not sure if it was a question or not, but the ones with Function don't reap anything because the argument is evaluated first, so that format invalidates the HoldFirst of Reap
 
R.M
@JM That's what I thought, but it goes matchfix > prefix > infix > postfix, so didn't seem to fit (at least, not to me...)
 
@Rojo Sounds plausible.
 
R.M
@Rojo Hmm... that's probably it
 
Yeah
Some time ago I started writing functions like this
blablablabacode//
doStuff[#]&//
doMoreStuff[#]&//
...
and I was bitten when I tried to //Reap[#]&
 
R.M
4:12 AM
ClearAll[f]
SetAttributes[f, HoldFirst]
f[1 + 1]
f[#] &@(1 + 1)
(1 + 1) // f[#] &
(1 + 1)~f~2
you're right.
At first, I tried f@(1+1) and (1+1)//f, both of which give f[1+1], which is why it confused me... now I see it's actually due to Function
 
4:29 AM
(joke) I wonder why Lighter[Yellow] and LightYellow don't give the same color...
 
R.M
4:39 AM
@JM I find Lighter@Black and Darker@White more amusing...
 
Heh. Perverse.
 
Or Lighter@Darker@Black and Darker@Lighter@Black
 
Only slightly more seriously, based on what my nephew's doing today: have any of you guys had an occasion to use colors from ColorData["Crayola"]?
(I couldn't afford to buy my nephew the complete set, so I can't compare colors...)
 
Not me
 
R.M
No, not really
 
4:47 AM
Do you know if it's possible to set the shape of the edges in a graph? I'm not into graph stuff
What I want to know if it's possible is
 
R.M
There's EdgeRenderingFunction...
 
to use the graph plotting functions to automatically plot an electrical circuit, represented only by it's node connections
I'll check it out, @RM, thx
Seems very interesting
 
5:15 AM
Hello Vitaliy.
 
R.M
Welcome to chat!
 
 
4 hours later…
9:41 AM
There was a lot of talking on who was going to play Jobs on his biopic (done). Then there was the choice of writer (done). Now that all the small players are chosen, who is going to play S. Wolfram? If he appeared just for a couple of seconds, or if Mathematica was mentioned on the NEXT or the SIRI scene, that would be a huge commercial spot!
 
In case you missed it:
14
Q: Implementing a first person view of 3D objects in a scene

R.MI've created the following scene with a Chinese-style building surrounded by trees, and a horse and a rabbit grazing on the grass in Mathematica (don't ask me why there's a bust of Beethoven in there...). The Chinese-style roof was created using J. M.'s equations in this answer. The code to creat...

 
@Szabolcs It's a great 3D scene. In my wish list (you know I have a huge wish list...), there's bump mapping and real-time raytracing (or at least, for the time being, a faster renderer with shadow casting).
Also, real world physics simulation associated to 2D and 3D objects would be nice... CFD built-in stuff was "promised" for M10...
 
10:00 AM
@PFonseca What do you mean by "CDF built-in stuff"?
 
@Szabolcs not CDF. CFD = computable fluid dynamics
 
@PFonseca Probably not real-time (i.e. synchronized to the clock), but MathModelica might have good performance simulation. I've never seen it. They bought the company making it, so maybe we'll see something in 9? Or it will stay as a separate product ...
@PFonseca Really? Where did you read it was 'promised' for 10?
 
@Szabolcs I no longer remember. But I think it was near the M8 launch. If I remember correctly, they talked about solids FEM kind of stuff probably for M9 (M8 already shows tetgen as a package), and CFD easy kind of stuff, probably just for M10 (they just added the CUDAFluidDynamics toy on M8).
@Szabolcs also, one of the creators of Imtek Mathematica Supplement has been working at WR for some years now.
 
@PFonseca In 8, ?**FEM*` returns many results. I don't know about 7 ... So at some point they were definitely thinking about FEM. I'm curious if 9 will have it. It'd be a big feature.
@PFonseca Does it have more than one creator? :-) He's pretty active on this site too.
@PFonseca See this
 
@Szabolcs I would love to have this kind of functionality. Not that I'm expecting it to compete, in production environment, with tools like openFoam (or Ansys stuff), but at least, on my personal interest of learning a little bit more on the subject, this would be great!
@Szabolcs I don't know if there was more than an author, so I tried to stay politically correct...
 
10:12 AM
Exactly! I learned a bit about image processing through Mathematica. I'm sure there are better packages out there, but Mma made it easy to get started
 
But we never know... This type of computations are difficult to implement, more on the attach all together aspect, than exactly on the difficulty of it (whatever that means). So, being M a great integration package, probably it can be made into a pretty useful 3D open surface simulator (my subject of interest...)
and instant CUDA is a very interesting aspect...
 
 
1 hour later…
11:40 AM
@PFonseca Bump mapping would be nice. Surfaces already take normals...
 
 
2 hours later…
1:40 PM
How do I get this
from this:
I mean ... unknown POV, unknown cylinder radius ...
 
1:54 PM
@belisarius Have you just considered pealing it off of the jar? :P
If you really need the image in a computer, then you can scan it in.
 
@rcollyer Yes, but I only own the photo :)
 
It looks like a very difficult problem...
 
It's a projection, shouldn't be THAT difficult
 
@belisarius I figured a little bit of humor was in order, as I have no idea how to accomplish it.
 
I'd say to ask it at dsp.SE, but I can't seem to find that weird-looking mod to confirm that it's hunky-dory there...
 
1:56 PM
@rcollyer Ok. In that case I'll share my photo with you so you can spread it on some buttered bread :D
 
Although, the pov can be estimated by examining the deviation from vertical for the sides of the jar. Similarly, the the angle above horizontal could be estimated by looking at the eccentricity of the top of the jar.
@JM yes, the tri-dactyl one does not appear to be around at the moment.
 
I mean, it is effectively an image processing question...
 
@rcollyer me perhaps in dsp.se should try
 
@JM Absolutely. Personally, I'd like to see it kept on mma.se, though. :)
@belisarius but not in dsp.se we trust?
 
Do you believe I could post it as a Q here ...?
 
1:59 PM
@rcollyer That would be "how the hell do I implement their suggestion @ dsp.SE in Mathematica?"
 
@JM true, or more simply: how would I do this in Mathematica?
 
I did not research the problem. I am lazy today
 
Then we will eat you alive when you post it. Any condiments you prefer?
 
@rcollyer Still... how many image processing guys hang around here? :)
 
@rcollyer Just leave me my liver. I need it to drink beer
 
2:02 PM
@JM at least one.
@belisarius Will do. I don't like liver any way.
 
@belisarius There's always the option of basting you in beer before they consume you...
 
Ok. Posting it. Just don't ask "What have you tried?" :D
@JM Sounds beautiful
 
@belisarius sometimes the answer to that is simply you don't know where to even begin. And, I am okay with those questions.
@JM Or, we could do the traditional Polynesian pig roast.
After, the beer soak, first, of course.
 
Ah, there he is...
 
Speak of the devil ... er tridactyl one
 
2:05 PM
@Jagra ping me when you're here.
 
@belisarius yes, yes, you should :)
Although, our top image processing guys all hang out at mma.se... (halirutan, matthias odisio, nikie...)
 
@yoda Then why not post it here?
 
@rcollyer It's a slightly more generic problem methinks...
Maybe there is already some image processing application somewhere specialized for these things.
 
@JM True. Just jealously guarding our territory, and trying to gather as much additional territory as I can. :)
 
(Reminds me of those CSI episodes where they get clear images from glancing reflections... :P )
 
2:09 PM
@rcollyer Well, I'd like to see dsp.se grow too... but I've grown distant with the site. We really lack some good image processing experts (we're doing good in the signal processing part)
 
@yoda Well if you must. :P
 
@JM you'll need to build a GUI in Visual Basic and ENHANCE!
2
 
Actually, you're probably right. The "how do I do in this in mma" can always be asked here later.
 
@belisarius Can you give me a bigger photo?
 
Or, given as an answer there.
 
2:11 PM
0
Q: Cylindrical / Plane projection inverse (plus some image processing)

belisariusHow do I get (using Mma) this: from this: Unknown POV, unknown cylinder radius, unknown jar content.

 
Too late...
 
@belisarius Traitor!
3
 
As an aside: Vitaliy's answer to RM's view point question will probably earn him another silver.
 
@belisarius Bigger image please!!
 
Reminds me of the old joke: "This is an old picture of my grandfather. Yes, he is behind the cow he is milking. Could you maybe remove the cow, so I can find out what my grandfather looked like?"
 
2:13 PM
@JM that is funny!
 
@yoda I just don't like keeping track of many sites. Migrate the Q if you find it better
 
R.M
@JM speaking of jokes (and apt for you)... Q: How do you tell a chemist from others? A: Ask them to pronounce the word unionized :)
 
acl
@belisarius done
 
@RM :)
 
@RM No, I'd ask first where he saw that word... :)
 
2:16 PM
@RM Although, I don't know what onions have to do with anything.
 
@Szabolcs ping
 
@rcollyer I would say both onions and unions can make higher-ups cry...
 
@JM territorial disputes aside, I think I agree with you and @yoda, that @belisarius question should be migrated.
@JM that's the truth. But, it is easier to throw onions.
 
If that comment I left there gets five votes, I'll migrate it.
 
Already got mine.
 
2:18 PM
How can I downvote yoda's comment? :)
 
acl
@rcollyer I am not sure. if, for instance, we know that the label has a rectangle on it, perhaps this amounts to a) a routine to shift perspective (which I think mma includes), b) a routine to "unwrap" the label, which sounds like a point transformation, c) optimizing the inputs to those two in order to get a rectangle
so it is a mma question, if we view it like this, isn't it?
 
@acl I think it would be good on either site.
 
@acl Yes, we may assume it is rectangular, I answered your comment
 
@Jagra Hi there
 
@Szabolcs Greetings. Thoughts?
 
2:20 PM
I should get some work done. Bye all.
 
@Jagra Well, I'm not doing a lot of parallel stuff right now, so I stopped working on this. Are you working on a cluster or a multiprocessor machine?
 
acl
@rcollyer right, so all we need now is a routine to "unwrap" and one to check how rectangular the various rectangle-like features are!
hmmm, shame I have to spend the next few hours doing bureaucratic chores
 
@Szabolcs -- I have 2 Xserves each with 8 processors + 2 processors on a desktop machine
 
@acl That is science!
 
@acl Poor you...
 
acl
2:22 PM
thanks for the ecnouragement, guys!
 
@Jagra Is that some kind of Mac? Okay, so you're using only one at a time, I guess.
 
@Szabolcs -- Mac indeed. No, I utilize all 18 processors at a time. A nice little grid.
 
@acl I know the feeling ... :| Band structures to draw.
@acl That's what I'm thinking ...
Bye.
 
@Jagra Nice. I was using a not-too-crowded cluster, and I tried to let Mathematica manage how many kernels (i.e. how many processors) were in use at any given time. It used all processors if no one else had jobs in the queue and it shut down some to use only 1/3 or 1/4 of the processors if people wanted to run their own jobs
@Jagra It was quite hackish, and I would never have thought of doing this on a crowded cluster with long queues or many users. Fortunately I knew all the other people using it, and at that time it wasn't 100% used.
 
@Szabolcs -- Nice. The recession has proved a boon to me. Fewer people around, but more computers for me.
 
2:29 PM
@Jagra And cheaper housing :)
 
@Jagra In my program I was shutting down and starting up new kernels only after a full parallel operation (usually ParallelMap or ParallelTable) has finished running
@Jagra Thne question was about: what if I do this in the middle of a ParallelTable running? It seems that sometimes if I interrupt the whole thing (Alt-,), launch more kernels, then resume (Return[]), then it will use the new kernels. I'm not sure how safe this is.
So I didn't really do it much (since I had to make sure my program works reliably)
 
@Szabolcs -- Yep, I've come to the save thing.
 
The bigger question is: what if I kill kernels instead of starting up new ones?
I didn't figure this out completely
there's a setting somewhere controlling what should happen, and it is different for different situations (cluster, grid, local multicore machine, etc.)
let me see ...
sometimes it re-launches new kernels and tries to use them
For my application I had to prevent re-launching new kernels, and somehow try to force it to redistribute the jobs among the running ones. I didn't manage to do it reliably, and I wouldn't feel safe about doing it...
but experimenting is always interesting :-)
 
@Szabolcs -- I know, while Wolfram, may have worked all of this out, it seems like we don't have all the documentation we need to both understand and control these kinds of things.
 
Oh, and the cluster kernel launching documentation and package (ClusterIntegration) was not very pleasant to work with ... I ended up reading the code a lot, and changing some things in the package ... (i.e. just hacking a solution together)
 
2:36 PM
@Szabolcs -- I'd think that Wolfram would have built in support for losing kernels and re-aquiring them during calculation. Even the earliest parallel computing infrastructures supported this. If so, killing a kernel, shouldn't present a problem.
 
@Jagra Did you see the option Preferences -> Parallel -> Try to relaunch failed kernels?
@Jagra What I can say is that in a very basic test, when I had something like ParallelTable[Pause[1]; $KernelID, {20}, Method -> "FinestGrained"], I could interrupt, launch/close kernels, and everything seemed to work fine. But when I tried some more involved things, such as calling a shared function (shared functions always evaluate on the main kernel) from a subkernel that might close/launch kernels, bad things started to happen.
 
@Szabolcs -- Sounds like something to revisit. One of the nuisance problems I have is when I try to abort an evaluation in the front end because I've done something wonky in the code and it won't stop running or it just keep generating errors. I frequently need to restart my servers. Do you know a way to specifically abort processing on the remote kernels?
 
@Jagra I don't remember exactly when went wrong but I do remember that I didn't feel safe closing/launching in the middle of a parallel evaluation. So instead I just split up the parallel evaluations and closed/launched inbetween.
 
@Szabolcs -- Yep, I've come to the same conclusion.
 
@Jagra Why do you need to restart? Can't you just kill them? I remember that when things went wrong during an abort, sometimes they went very wrong, and some subkernels generated huge expressions that filled up memory, and it was necessary to restart the machine (they didn't respond because of swapping)
So I made sure that the computation would abort completely on any message generated
this can be annoying
but at least the machines won't lock up ... (it was a problem for me because I didn't hav the key to the server room)
14
Q: How to abort on any message generated?

SzabolcsMathematica is a bit unusual as a programming language because it never stops on messages, regardless of whether the message is an error, a warning or just an informative message. It simply prints the message and continues with evaluation. This can cause an avalanche of messages and unpredictabl...

The fact is, I didn't have much time, so I just had to get the work done. I didn't have time to go figure out all the details.
 
2:49 PM
@Szabolcs -- In my experience, in situations where I wanted to start over by killing the remote kernels, I would some pretty serious degradation of performance after restarting the remote kernels, as if some buffer didn't clear. Also, sometimes an abort didn't seem to reach through to the remote kernels.
@Szabolcs --You gave me a couple of ideas to pursue. Thanks. Gota run now. Best, J
 
@Jagra If you find something interesting, please let me know! I'm still interested..
 
@Szabolcs -- Will do.
 
Anyone want to watch a live lecture by Peter Higgs? webcast.web.cern.ch
 
The boson guy?
 
Yep.
 
acl
2:59 PM
@Jagra so am I, please announce whatever you find somewhere
 
 
2 hours later…
4:32 PM
I posted an answer on StackOverflow that gave an index of all the "New in version X" pages for Mathematica, but now I cannot find it. Does anyone recall what question this was in reply to?
 
4:47 PM
Hello @rcollyer
 
@MrWizard Hola!
I don't recall that answer. Maybe in the ToolBag?
 
No, I think not. I'm hoping it wasn't deleted; I want to reference it.
 
Well, that's what you get for posting 391 answers. :)
 
:-) --- in my search I did find this; read the comments for some of belisarius' humor.
 
I don't quite think the NKS question is on-topic, but I don't want to vote unilaterally...
 
4:52 PM
@MrWizard That's hysterical!
 
@J.M. I hadn't seen that question yet; how fitting for the present discussion! lol
 
@JM I think it is to open-ended. There isn't a correct answer. And while there are 1000+1 ways of doing things in MMA, they're all "correct" in a sense that doesn't apply to that question.
 
@MrWizard I think that might've been closed just after you posted that answer, and I might've voted to delete it too...
It essentially was a what's the list of pros/cons/changes between versions or soemthing like that.. (if I remember correctly)
Nothing of value is lost, really... it was a link to a website then and you might as well link to the same website now instead of linking to your answer which links to... you get the drift
 
@yoda any chance you could find the deleted topic? I had to find some of those links creatively and I'd rather just copy the list.
 
@MrWizard oh, hmm... didn't know those were hard to find links.
 
4:56 PM
not a big deal, just a minor annoyance really
I closed the NKS question.
 
@Wizard: I was hoping to let these fine people vote, but never mind... :)
 
@MrWizard well, you could just ask an SO mod to do a search for "user:618728 [mathematica] deleted:1 is:answer +new +version" (without the quotes) and see if it's there..
 
@JM It seems pretty clear to me. Do you think it would be OK to migrate to meta, or is that a bad precedent?
I'm just trying to be polite...
 
@MrWizard It doesn't seem like it'd fit meta either; it's not really discussing the site, and NKS is more or less independent from Mathematica...
 
OK.
 
5:02 PM
@JM While, yes it is, I think the question could be recast to be answerable in terms of the site.
Speaking of which, we should honestly update the FAQ with what is considered On v. Off-topic.
 
@rcollyer We had a meta discussion on this, right?
 
R.M
@rcollyer I don't quite see how...
 
@JM we did, but not much came from it.
 
@RM Ditto.
 
@RM I leave that up to the OP.
My biggest issue is how broad in scope the question is, and is hence not answerable. A narrower scope may be able to bring it within range of what we can answer within the scope of Mathematica.
 
R.M
5:10 PM
@MrWizard wolfram.com/mathematica/quick-revision-history.html Just left you a comment too.
 
@RM That should do, thanks. I seem to remember there were pages outside of that list that I found useful, but it is no matter.
@RM I remember finding all of these pages too: reference.wolfram.com/mathematica/guide/…
(or maybe it was these)
Anyway, like I said, thanks. :-)
 
R.M
@MrWizard the links are standardized, so you can replace 70 with 60 for v6.0 (maybe that's how you found them in the first place...)
but only for 6 and above, I see...
 
Forgive me for posting this, but a little physics humor from reading [this](http://arstechnica.com/science/2012/05/the-state-of-particle-physics-a-report-from-pheno-2012/) :

> SUSY pairs each particle of the SM with a supersymmetric partner. These have unfortunately comic names: quarks are paired with squarks, W bosons are partnered with winos (pronounced "WEEnos"), and so forth.
 
R.M
5:26 PM
@all: any thoughts on reopening this? It is a reasonable question and not very different from most other questions asked (re: implementing some functionality) and it seems like the close votes were piled on after F'x's comment (which wasn't very off the mark either — Alan does have a habit of issuing "calls for implementation")
@MrWizard This might also come in handy at times: reference.wolfram.com/mathematica/tutorial/…
 
@RM I voted to close because I felt the same as Fx.
 
R.M
@belisarius I'm not disagreeing... just there's a valid question, since quantile functions always give the smallest x for the given p and intervals might be useful (I've had a use for them at some point). I'll cut through the fluff and trim it down to just that
 
I've reopened for the time being.
 
R.M
@JM thanks
 
It does look like the sort that can be whipped into shape, unlike the NKS query...
 
5:45 PM
@RM Yes, that's what I copied the body of my answer from, the one which you added your comment to.
 
acl
@JM I agree, this NKS stuff is completely independent of mathematica
if I asked "how can I use cellular automata to simulate hydrodynamics", would that be on topic here? because that's a more focussed question (yet still way too broad), and also has nothing to do with mathematica even though it may in fact be answered using mathematica
anyway, I agree with the question being closed (should anyone care)
 
@acl I'd ask that question on scicomp.SE myself...
 
acl
@JM the NKS one you mean?
 
@acl No, "how can I use cellular automata to simulate hydrodynamics". I linked to the second line... ;)
 
acl
@JM oh i see. I'd look here instead prl.aps.org/abstract/PRL/v56/i14/p1505_1
it was a randomly chosen subject actually; my point is that the NKS thing has little to do with mathematica and is too broad
 
5:57 PM
@acl Heh, neat. I didn't mean I will ask it now; just that if I had to ask that question, I'd choose scicomp.SE, not this site. And yes, the NKS thing is independent of Mathematica.
 

« first day (120 days earlier)      last day (4361 days later) »