# Rahul Narain

less info
reputation
11543
bio website location age member for 2 years, 7 months seen 1 hour ago profile views 551

# 789 Actions

 Sep3 answered Plotting a piecewise function with strange subdomains Sep3 comment Finding length of intersection of two surfaces How come the RegionPlot of a space curve is a 2D plot? Sep3 comment Behavior of Commonest when there is an even split between the elements of the list it is given Why not just First[Commonest[{0, 1, 1, 0}]]? Sep3 comment How to blend two photos in Mathematica? I'm glad you have found a method that works for you, but there are a few factual errors in this answer... Sep3 comment How to blend two photos in Mathematica? Wait, the wavelet transform is linear, so adding the wavelet coefficients is equivalent to just adding the pixel values. Indeed your result looks identical to @paw's answer using ImageAdd directly on the images. Sep2 comment How to blend two photos in Mathematica? The "screen" blending mode is equivalent to the negative of the "multiply" blending mode applied to the negatives of the images, so you can do ColorNegate[ImageMultiply[ColorNegate[forest], ColorNegate[tiger]]] and it should be identical to what Photoshop gives. Sep1 comment FindClusters giving wrong groupings The problem is that the distance between the left and right clusters is about 0.5 while the distance between the top and bottom of either cluster is over 1000... Aug30 comment Plotting spherical surfaces The InterpolationOrder in ListPlot3D is a red herring; the appearance of the plot does not change if you change the order to $1$. Mathematica does not support higher-order interpolation on unstructured data yet. The reason it still looks like a smooth surface is because the shading is being interpolated when the surface is rendered. Aug29 revised Is there a reason why some specific arrangement of scattered grid points would yield bad RBF (Obtuse package) interpolation results? added 48 characters in body Aug29 comment Implementing an algorithm for finding the largest circle that contains a single point in a set (and no other point) +1 It's a bit of a relief to see that my algorithm actually works! "I have only proved it correct, not tried it." --Don Knuth Aug29 comment A topoplot function for Mathematica Neat trick for generating a random function. Aug27 revised plotting a trig functions along with its envelope edited body Aug26 comment Find maximum value of interpolation function - obviously wrong result Probably the only foolproof way would be to peer into the internal structure of the InterpolatingFunction: it does a piecewise polynomial interpolation, and one might be able to reliably find the maximum of each piece. Unfortunately I'm afraid I don't know how to do that. Aug26 comment How to do a region plot with many functions Although no one's posted Michael E2's Ordering-based solution at the previous question. Aug23 comment How to generate random points in a region? @RunnyKine: Thanks, added! Aug23 revised How to generate random points in a region? cleaned up the code a bit (thanks RunnyKine) Aug23 answered How to generate random points in a region? Aug22 awarded Nice Answer Aug22 comment Horizontally compress a picture with varying compression ratio I'm not sure I understand correctly what you're asking, but try d = f /. First@NDSolve[{f'[x] == c[x], f[0] == 0}, f, {x, 0, 1}]; ImageForwardTransformation[image, {d@#[[1]], #[[2]]} &, PlotRange -> All] Aug21 comment How to vary line thickness to add a sense of perspective? Not exactly what you asked for, but since you want to make the 3D arrangement of lines easier to see, this previous question may be useful.