# Rahul Narain

less info
reputation
11543
bio website location age member for 2 years, 6 months seen 45 mins ago profile views 528

# 745 Actions

 19h 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. 1d 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. Aug21 comment Convex hull of a large data set of 3D points I second user21's question; there is no standard notion of a "smooth convex hull". If you really really want an ellipsoid, you could try finding the minimum-volume ellipsoid enclosing your set of points. Aug21 comment How to make a depth map from a 3D model? You should probably incorporate the code from Timothy Wofford's answer as well, otherwise you're still colouring by the original $z$-coordinates of the model rather than the depth from the camera. i.stack.imgur.com/wFmRm.png Aug18 comment Transparency in a 3D plot You're trying to specify PlotStyle twice, which doesn't work (the second one is ignored). Use Directive to combine them instead: PlotStyle -> Directive[RGBColor[1., 0.9, 0.14], Opacity[0.9]] Aug15 revised Extending a ternary plot to a tetrahedron (using ListPlot) added 80 characters in body Aug15 comment How to “merge” various graphics 2d into one 3d graphic? Can you give some more details on how you generated the 2D graphics?